Commit c9a1158c authored by Natanael Copa's avatar Natanael Copa

abuild: remove broken noarch stuff. force CARCH for abuildrepo

parent 3ac0a8e0
......@@ -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)/
......
......@@ -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"
......
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