summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-04-04 13:06:32 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-04-04 13:52:17 +0000
commitc9a1158c7914d24c81f3c9196757df49890307fe (patch)
tree6a7c3e089191902a91d81d432c53ad641ed36f46
parent3ac0a8e0825aba542ea254ada47afa8b8a854b56 (diff)
downloadabuild-c9a1158c7914d24c81f3c9196757df49890307fe.tar.bz2
abuild-c9a1158c7914d24c81f3c9196757df49890307fe.tar.xz
abuild: remove broken noarch stuff. force CARCH for abuildrepo
-rw-r--r--Makefile2
-rwxr-xr-xabuild.in26
2 files changed, 7 insertions, 21 deletions
diff --git a/Makefile b/Makefile
index 1979acd..112ebbb 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ VERSION := 2.8.2
prefix ?= /usr
sysconfdir ?= /etc
datadir ?= $(prefix)/share/$(PACKAGE)
-abuildrepo ?= ~/.cache/apks
+abuildrepo ?= ~/.cache/abuild
LUA_VERSION = 5.1
LUA_SHAREDIR ?= $(prefix)/share/lua/$(LUA_VERSION)/
diff --git a/abuild.in b/abuild.in
index cd55865..c7d8814 100755
--- a/abuild.in
+++ b/abuild.in
@@ -773,21 +773,12 @@ create_apks() {
done
}
-# fish out the arch from an apk file
-apk_arch_prefix() {
- apk index -q "$1" | tar -zxO | awk -F: '$1 == "A" { print $2 }'
-}
-
-apk_arch_prefix_compat() {
- tar -zxOf "$1" .PKGINFO | awk -F" = " '$1 == "arch" { print $2 }'
-}
-
clean_abuildrepo() {
local apk
cd "$abuildrepo" || return 1
# remove compat symlink
- for d in "$abuildrepo/$CARCH" "$abuildrepo"/noarch; do
+ for d in "$abuildrepo/$CARCH"; do
[ -L "$d" ] && rm "$d"
done
@@ -800,19 +791,13 @@ clean_abuildrepo() {
}
mklinks_abuildrepo() {
- local apk get_prefix=apk_arch_prefix
- local version=$($APK --version | awk '{print $2}')
- if [ "$($APK version --test $version 2.1)" = '<' ]; then
- get_prefix=apk_arch_prefix_compat
- fi
- mkdir -p "$abuildrepo"/$CARCH "$abuildrepo"/noarch
+ local apk
+ mkdir -p "$abuildrepo"/$CARCH
cd "$abuildrepo" || return 1
# create links for this package
for apk in $(listpkg); do
[ -f "$PKGDEST"/$apk ] || continue
- local prefix=$($get_prefix "$PKGDEST"/$apk)
- mkdir -p "$abuildrepo"/$prefix
- ln -sf "$PKGDEST"/$apk "$abuildrepo"/$prefix/$apk
+ ln -sf "$PKGDEST"/$apk "$abuildrepo"/$CARCH/$apk
done
}
@@ -837,7 +822,8 @@ update_abuildrepo() {
fi
$APK index --quiet $oldindex --output "$index".unsigned \
--description "$repo $(cd $startdir && git describe)" \
- noarch/*.apk $CARCH/*.apk || exit 1
+ --rewrite-arch $CARCH \
+ $CARCH/*.apk || exit 1
msg "Signing the index..."
abuild-sign -q "$index".unsigned || exit 1
mv "$index".unsigned "$index"