summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-10-21 14:00:09 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-10-21 14:00:09 +0000
commit884c4d94f364f58f5356178d118e96b57317ae7e (patch)
tree226c0366e92018785aa4e912d651a7c55eaea36e /main
parent12d2c8359a12bced158804a24daf9e2184361bc7 (diff)
downloadaports-884c4d94f364f58f5356178d118e96b57317ae7e.tar.bz2
aports-884c4d94f364f58f5356178d118e96b57317ae7e.tar.xz
main/abuild: buildrepo: exit before purging package on broken APKBUILDs
fixes #2290
Diffstat (limited to 'main')
-rw-r--r--main/abuild/0001-buildrepo-exit-early-if-listing-of-packages-for-purg.patch28
-rw-r--r--main/abuild/APKBUILD12
2 files changed, 36 insertions, 4 deletions
diff --git a/main/abuild/0001-buildrepo-exit-early-if-listing-of-packages-for-purg.patch b/main/abuild/0001-buildrepo-exit-early-if-listing-of-packages-for-purg.patch
new file mode 100644
index 000000000..b4de896ef
--- /dev/null
+++ b/main/abuild/0001-buildrepo-exit-early-if-listing-of-packages-for-purg.patch
@@ -0,0 +1,28 @@
+From 7a447caf05ec70c35c9df4d5211b9dd3828e6b6a Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Mon, 21 Oct 2013 13:48:23 +0000
+Subject: [PATCH] buildrepo: exit early if listing of packages for purging
+ fails
+
+Otherwise we might end up purging more packages than expected if an
+APKBUILD has syntax errors
+---
+ buildrepo.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/buildrepo.in b/buildrepo.in
+index a37ab8d..dcba9b6 100755
+--- a/buildrepo.in
++++ b/buildrepo.in
+@@ -146,7 +146,7 @@ do_build() {
+ local purgefiles
+ cd "$repodir/$repo/$CARCH" || return 1
+ trap 'rm -f "$tmp"; exit 1' INT
+- ( listpackages "$1") >$tmp
++ ( listpackages "$1") >$tmp || return 1
+ purge=$(ls *.apk 2>/dev/null | grep -v -w -f $tmp)
+ if [ -n "$purge" ]; then
+ rm -f $purge
+--
+1.8.4.1
+
diff --git a/main/abuild/APKBUILD b/main/abuild/APKBUILD
index 17b8ffc80..29d447f89 100644
--- a/main/abuild/APKBUILD
+++ b/main/abuild/APKBUILD
@@ -3,7 +3,7 @@ pkgdesc="Script to build Alpine Packages"
pkgname=abuild
pkgver=2.17.0
_ver=${pkgver%_git*}
-pkgrel=3
+pkgrel=4
url=http://git.alpinelinux.org/cgit/abuild/
depends="fakeroot sudo pax-utils openssl apk-tools>=2.0.7-r1 libc-utils"
if [ "$CBUILD" = "$CHOST" ]; then
@@ -20,6 +20,7 @@ license=GPL-2
source="http://dev.alpinelinux.org/archive/abuild/abuild-$pkgver.tar.xz
0001-abuild-support-qt5-mkspecs.patch
0001-abuild-add-cmake-files-to-dev.patch
+ 0001-buildrepo-exit-early-if-listing-of-packages-for-purg.patch
"
_builddir="$srcdir/$pkgname-$_ver"
@@ -58,10 +59,13 @@ cpan() {
md5sums="e3000a6841f865a4404733185d9a2eff abuild-2.17.0.tar.xz
7b1b5016e26bdef9f95034724f60d3f2 0001-abuild-support-qt5-mkspecs.patch
-2757c4c799a3732df559a1c50e2996b8 0001-abuild-add-cmake-files-to-dev.patch"
+2757c4c799a3732df559a1c50e2996b8 0001-abuild-add-cmake-files-to-dev.patch
+afe21b41d2dd6d2e5698a333ff9ec98d 0001-buildrepo-exit-early-if-listing-of-packages-for-purg.patch"
sha256sums="9238fedc66e2af99b041cb9096d982027650fa7ece79fcfc22d6abdae11ed6de abuild-2.17.0.tar.xz
7a7e1f63be5da6bf15da272e7043147336a383d4277f6342e0faf8a596d32ef9 0001-abuild-support-qt5-mkspecs.patch
-ca9be2ec6f21891f7129c2e5109e6b258364489b99445bf80813120523d06617 0001-abuild-add-cmake-files-to-dev.patch"
+ca9be2ec6f21891f7129c2e5109e6b258364489b99445bf80813120523d06617 0001-abuild-add-cmake-files-to-dev.patch
+525959f3b4ca1ff74b32680db28becedf3ac3b2aa80cb9963a4d226cdd4b6598 0001-buildrepo-exit-early-if-listing-of-packages-for-purg.patch"
sha512sums="26385f6a3e39851826d170c2b379205a51f034412b03b4a2b86ff61b14e34cbe2300d0f2280a14439d4342c1495d67d07e47910d5cba73c29b44d46d77120635 abuild-2.17.0.tar.xz
91c543695677d34a3353d667d79f302587e72ad13d5c221a930bce5dbb74524933f2d30cdd045cd77539f2526bb25a6d1d1491e396d59c654a3ddd534da06cd4 0001-abuild-support-qt5-mkspecs.patch
-604db060c43d28ebb5b326841daf8e48c132246cd21d556f1269e5b3dcd1c28141046360f33794839a2915b0d05311fb4f8f748448e63e5e668221fd4f7efa2e 0001-abuild-add-cmake-files-to-dev.patch"
+604db060c43d28ebb5b326841daf8e48c132246cd21d556f1269e5b3dcd1c28141046360f33794839a2915b0d05311fb4f8f748448e63e5e668221fd4f7efa2e 0001-abuild-add-cmake-files-to-dev.patch
+e2a4602337eead93364bfccae59d6e2466d2ac5e3510ac4066ab553202683c8305bf7a6efdbe22d0c081a458b7e81bc87940ff1548a02c269f317773027612e3 0001-buildrepo-exit-early-if-listing-of-packages-for-purg.patch"