aboutsummaryrefslogtreecommitdiffstats
path: root/main/apk-tools/0001-db-allow-replacing-files-of-origin-package-is-same.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/apk-tools/0001-db-allow-replacing-files-of-origin-package-is-same.patch')
-rw-r--r--main/apk-tools/0001-db-allow-replacing-files-of-origin-package-is-same.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/main/apk-tools/0001-db-allow-replacing-files-of-origin-package-is-same.patch b/main/apk-tools/0001-db-allow-replacing-files-of-origin-package-is-same.patch
new file mode 100644
index 0000000000..5ead3bc5ec
--- /dev/null
+++ b/main/apk-tools/0001-db-allow-replacing-files-of-origin-package-is-same.patch
@@ -0,0 +1,29 @@
+From 73a03c2e40b9c429342729d009801751bd0812da Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
+Date: Fri, 25 Apr 2014 22:17:49 +0300
+Subject: [PATCH] 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.
+---
+ src/database.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+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)) {
+--
+1.9.2
+