summaryrefslogtreecommitdiffstats
path: root/libopkg/pkg.h
diff options
context:
space:
mode:
authorPaul Barker <paul@paulbarker.me.uk>2014-02-10 07:46:23 (EST)
committer Paul Barker <paul@paulbarker.me.uk>2014-02-23 15:37:19 (EST)
commit410aebda158f8342d5111df8c2ef9161d611145c (patch)
tree19079d9a3e54f8ba52eb9fe34bacf68d73a784e0 /libopkg/pkg.h
parentce979d274826551044f63b51b51b847454cf1367 (diff)
pkg: Add per-package force_reinstall flag
This flag allows two package object to share the same version information but be distinguishable from each other. It is never stored on disk or reported to the user but is used when comparing package versions. A new function, pkg_compare_versions_no_reinstall(), is added to compare versions without caring about this force_reinstall flag. Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
Diffstat (limited to 'libopkg/pkg.h')
-rw-r--r--libopkg/pkg.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libopkg/pkg.h b/libopkg/pkg.h
index 1e3dd3f..45fe890 100644
--- a/libopkg/pkg.h
+++ b/libopkg/pkg.h
@@ -123,6 +123,7 @@ struct pkg
unsigned long epoch;
char *version;
char *revision;
+ int force_reinstall;
pkg_src_t *src;
pkg_dest_t *dest;
char *architecture;
@@ -203,6 +204,7 @@ int pkg_merge(pkg_t *oldpkg, pkg_t *newpkg);
char *pkg_version_str_alloc(pkg_t *pkg);
int pkg_compare_versions(const pkg_t *pkg, const pkg_t *ref_pkg);
+int pkg_compare_versions_no_reinstall(const pkg_t *pkg, const pkg_t *ref_pkg);
int pkg_name_version_and_architecture_compare(const void *a, const void *b);
int abstract_pkg_name_compare(const void *a, const void *b);