summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-06-04 12:25:19 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-06-04 12:25:19 +0000
commit648905598d5dba686c337df4f084dbaaf2491fac (patch)
treef00961fb141de1439e4d2d84f22e79d21e918e4f /core
parent24ae3932ee11e4fa89e9568b04177c2fcb3bd030 (diff)
downloadaports-648905598d5dba686c337df4f084dbaaf2491fac.tar.bz2
aports-648905598d5dba686c337df4f084dbaaf2491fac.tar.xz
core/abuild: fix for buildrepo
Diffstat (limited to 'core')
-rw-r--r--core/abuild/APKBUILD8
-rw-r--r--core/abuild/buildrepo.patch50
2 files changed, 56 insertions, 2 deletions
diff --git a/core/abuild/APKBUILD b/core/abuild/APKBUILD
index bccb6adaf..059fb2979 100644
--- a/core/abuild/APKBUILD
+++ b/core/abuild/APKBUILD
@@ -2,17 +2,21 @@
pkgdesc="Script to build Alpine Packages"
pkgname=abuild
pkgver=1.15.1
-pkgrel=0
+pkgrel=1
url=http://git.alpinelinux.org/cgit/abuild/
source="http://git.alpinelinux.org/cgit/abuild/snapshot/abuild-$pkgver.tar.bz2
+ buildrepo.patch
"
depends="fakeroot file sudo"
license=GPL-2
build() {
cd "$srcdir/$pkgname-$pkgver"
+ patch -p1 < ../buildrepo.patch || return 1
+
make install DESTDIR="$pkgdir"
install -m 644 abuild.conf "$pkgdir"/etc/abuild.conf
}
-md5sums="ad7db0b6112bed7418a8aef97f20aed5 abuild-1.15.1.tar.bz2"
+md5sums="ad7db0b6112bed7418a8aef97f20aed5 abuild-1.15.1.tar.bz2
+465280f43fd69fa0949bc8f1ce67ab39 buildrepo.patch"
diff --git a/core/abuild/buildrepo.patch b/core/abuild/buildrepo.patch
new file mode 100644
index 000000000..4c647d873
--- /dev/null
+++ b/core/abuild/buildrepo.patch
@@ -0,0 +1,50 @@
+commit 896c436e140a4888c59135c7a2238e2ec4861632
+Author: Natanael Copa <ncopa@alpinelinux.org>
+Date: Thu Jun 4 12:22:48 2009 +0000
+
+ buildrepo: check if all files exist before try copy anything
+
+ seems like copy removes destination if source does not exist so
+ we ended up with a buildrepo that removed all packages
+
+diff --git a/buildrepo.in b/buildrepo.in
+index 5b4133d..2be50e1 100755
+--- a/buildrepo.in
++++ b/buildrepo.in
+@@ -28,6 +28,14 @@ listpackages() {
+ done
+ }
+
++all_exist() {
++ while [ $# -gt 0 ]; do
++ [ -e "$1" ] || return 1
++ shift 1
++ done
++ return 0
++}
++
+ build() {
+ local repo="$1" i indexupdate needbuild
+
+@@ -47,15 +55,18 @@ build() {
+ continue
+ fi
+
++ indexupdate="$indexupdate $i"
++
+ # try link or copy the files if they are in the ports dir
+ pkgs=$(abuild listpkg)
+- if cp -p -l $pkgs "$repodir/$repo"/ 2>/dev/null \
+- || cp -p $pkgs "$repodir/$repo"/ 2>/dev/null; then
++ if all_exist $pkgs; then
+ echo ">>> Copying " $pkgs
++ cp -p -l $pkgs "$repodir/$repo"/ 2>/dev/null \
++ || cp -p $pkgs "$repodir/$repo"/ \
++ || needbuild="$needbuild $i"
+ else
+ needbuild="$needbuild $i"
+ fi
+- indexupdate="$indexupdate $i"
+ done
+
+ # build the postponed packages if any