summaryrefslogtreecommitdiff
path: root/src/database.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-04-25 22:17:49 +0300
committerTimo Teräs <timo.teras@iki.fi>2014-04-25 22:17:49 +0300
commit73a03c2e40b9c429342729d009801751bd0812da (patch)
tree1fdbe242c94e48dbd7d7ca8f2e2e284f3974e310 /src/database.c
parent9f679fa8073717e81ccc8131c02035cc9d5180fe (diff)
downloadapk-tools-73a03c2e40b9c429342729d009801751bd0812da.tar.gz
apk-tools-73a03c2e40b9c429342729d009801751bd0812da.tar.bz2
apk-tools-73a03c2e40b9c429342729d009801751bd0812da.tar.xz
apk-tools-73a03c2e40b9c429342729d009801751bd0812da.zip
db: allow replacing files of origin package is same
basically this makes packager's life simpler as there is no need to list the subpkg names in replaces. this was also very error prone and tedious job to do properly.
Diffstat (limited to 'src/database.c')
-rw-r--r--src/database.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/database.c b/src/database.c
index 7fb700b..356ba22 100644
--- a/src/database.c
+++ b/src/database.c
@@ -2294,6 +2294,9 @@ static int apk_db_install_archive_entry(void *_ctx,
/* Upgrading package? */
if (opkg->name == pkg->name)
break;
+ /* Or same source package? */
+ if (opkg->origin == pkg->origin && pkg->origin)
+ break;
/* Does the original package replace the new one? */
foreach_array_item(dep, opkg->ipkg->replaces) {
if (apk_dep_is_materialized(dep, pkg)) {