diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-06-10 17:57:15 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-06-10 17:57:15 +0000 |
commit | 69d1a01ed750e087d362c43d717ebcec55289357 (patch) | |
tree | 914201db99d3e956eb65ea44254b76411feacab4 /main/apk-tools | |
parent | c98a2c458a939960a2f7164c3f4ee96f7b99f97b (diff) | |
download | aports-69d1a01ed750e087d362c43d717ebcec55289357.tar.bz2 aports-69d1a01ed750e087d362c43d717ebcec55289357.tar.xz |
main/apk-tools: fix triggers
Diffstat (limited to 'main/apk-tools')
-rw-r--r-- | main/apk-tools/APKBUILD | 6 | ||||
-rw-r--r-- | main/apk-tools/triggers.patch | 42 |
2 files changed, 46 insertions, 2 deletions
diff --git a/main/apk-tools/APKBUILD b/main/apk-tools/APKBUILD index c8672ac979..0fafb00356 100644 --- a/main/apk-tools/APKBUILD +++ b/main/apk-tools/APKBUILD @@ -1,12 +1,13 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=apk-tools pkgver=2.0.3 -pkgrel=0 +pkgrel=1 pkgdesc="Alpine Package Keeper - package manager for alpine" subpackages="$pkgname-static" depends= makedepends="zlib-dev openssl-dev pkgconfig" source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2 + triggers.patch " @@ -43,4 +44,5 @@ static() { "$subpkgdir"/sbin/apk.static } -md5sums="191938ff9433745a1e24dfab6f8f7249 apk-tools-2.0.3.tar.bz2" +md5sums="191938ff9433745a1e24dfab6f8f7249 apk-tools-2.0.3.tar.bz2 +b4679e85ed85914141312fcbd357bb0f triggers.patch" diff --git a/main/apk-tools/triggers.patch b/main/apk-tools/triggers.patch new file mode 100644 index 0000000000..4702e0f85a --- /dev/null +++ b/main/apk-tools/triggers.patch @@ -0,0 +1,42 @@ +commit 60b537e356dfcd0ed9a3516152c6a170912efcef +Author: Natanael Copa <ncopa@alpinelinux.org> +Date: Thu Jun 10 17:50:11 2010 +0000 + + db: do not free trigger list after package is unpacked + + The triggers are read during apk_db_unpack_pkg(). If we delete the + triggers list after then unpack we delete the triggers which is not + what we want. + + This fixes bug introduced in ce3cf8bff901e7fcacbca640ffedaeea2b3bdf7f + +diff --git a/src/database.c b/src/database.c +index 7421e1b..11864cb 100644 +--- a/src/database.c ++++ b/src/database.c +@@ -2100,6 +2100,12 @@ int apk_db_install_pkg(struct apk_database *db, + + /* Install the new stuff */ + ipkg = apk_pkg_install(db, newpkg); ++ ipkg->flags |= APK_IPKGF_RUN_ALL_TRIGGERS; ++ if (ipkg->triggers->num != 0) { ++ list_del(&ipkg->trigger_pkgs_list); ++ apk_string_array_free(&ipkg->triggers); ++ } ++ + if (newpkg->installed_size != 0) { + r = apk_db_unpack_pkg(db, ipkg, (oldpkg != NULL), + (oldpkg == newpkg), cb, cb_ctx, +@@ -2110,12 +2116,6 @@ int apk_db_install_pkg(struct apk_database *db, + } + } + +- ipkg->flags |= APK_IPKGF_RUN_ALL_TRIGGERS; +- if (ipkg->triggers->num != 0) { +- list_del(&ipkg->trigger_pkgs_list); +- apk_string_array_free(&ipkg->triggers); +- } +- + if (oldpkg != NULL && oldpkg != newpkg && oldpkg->ipkg != NULL) { + apk_db_purge_pkg(db, oldpkg->ipkg, NULL); + apk_pkg_uninstall(db, oldpkg); |