Commit c9a1158c authored by Natanael Copa's avatar Natanael Copa
Browse files

abuild: remove broken noarch stuff. force CARCH for abuildrepo

parent 3ac0a8e0
...@@ -5,7 +5,7 @@ VERSION := 2.8.2 ...@@ -5,7 +5,7 @@ VERSION := 2.8.2
prefix ?= /usr prefix ?= /usr
sysconfdir ?= /etc sysconfdir ?= /etc
datadir ?= $(prefix)/share/$(PACKAGE) datadir ?= $(prefix)/share/$(PACKAGE)
abuildrepo ?= ~/.cache/apks abuildrepo ?= ~/.cache/abuild
LUA_VERSION = 5.1 LUA_VERSION = 5.1
LUA_SHAREDIR ?= $(prefix)/share/lua/$(LUA_VERSION)/ LUA_SHAREDIR ?= $(prefix)/share/lua/$(LUA_VERSION)/
......
...@@ -773,21 +773,12 @@ create_apks() { ...@@ -773,21 +773,12 @@ create_apks() {
done 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() { clean_abuildrepo() {
local apk local apk
cd "$abuildrepo" || return 1 cd "$abuildrepo" || return 1
# remove compat symlink # remove compat symlink
for d in "$abuildrepo/$CARCH" "$abuildrepo"/noarch; do for d in "$abuildrepo/$CARCH"; do
[ -L "$d" ] && rm "$d" [ -L "$d" ] && rm "$d"
done done
...@@ -800,19 +791,13 @@ clean_abuildrepo() { ...@@ -800,19 +791,13 @@ clean_abuildrepo() {
} }
mklinks_abuildrepo() { mklinks_abuildrepo() {
local apk get_prefix=apk_arch_prefix local apk
local version=$($APK --version | awk '{print $2}') mkdir -p "$abuildrepo"/$CARCH
if [ "$($APK version --test $version 2.1)" = '<' ]; then
get_prefix=apk_arch_prefix_compat
fi
mkdir -p "$abuildrepo"/$CARCH "$abuildrepo"/noarch
cd "$abuildrepo" || return 1 cd "$abuildrepo" || return 1
# create links for this package # create links for this package
for apk in $(listpkg); do for apk in $(listpkg); do
[ -f "$PKGDEST"/$apk ] || continue [ -f "$PKGDEST"/$apk ] || continue
local prefix=$($get_prefix "$PKGDEST"/$apk) ln -sf "$PKGDEST"/$apk "$abuildrepo"/$CARCH/$apk
mkdir -p "$abuildrepo"/$prefix
ln -sf "$PKGDEST"/$apk "$abuildrepo"/$prefix/$apk
done done
} }
...@@ -837,7 +822,8 @@ update_abuildrepo() { ...@@ -837,7 +822,8 @@ update_abuildrepo() {
fi fi
$APK index --quiet $oldindex --output "$index".unsigned \ $APK index --quiet $oldindex --output "$index".unsigned \
--description "$repo $(cd $startdir && git describe)" \ --description "$repo $(cd $startdir && git describe)" \
noarch/*.apk $CARCH/*.apk || exit 1 --rewrite-arch $CARCH \
$CARCH/*.apk || exit 1
msg "Signing the index..." msg "Signing the index..."
abuild-sign -q "$index".unsigned || exit 1 abuild-sign -q "$index".unsigned || exit 1
mv "$index".unsigned "$index" mv "$index".unsigned "$index"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment