Commit c2a0126e authored by Natanael Copa's avatar Natanael Copa

abuild: remove broken links in abuild temp repo. sign the control.tar.gz

parent ac09f449
...@@ -453,6 +453,7 @@ create_apks() { ...@@ -453,6 +453,7 @@ create_apks() {
cd "$dir" cd "$dir"
tar -c $(cat "$dir"/.metafiles) | abuild-tar --cut \ tar -c $(cat "$dir"/.metafiles) | abuild-tar --cut \
| gzip -9 > control.tar.gz | gzip -9 > control.tar.gz
abuild-sign -q control.tar.gz || exit 1
# create the final apk # create the final apk
cat control.tar.gz data.tar.gz > "$PKGDEST"/$apk cat control.tar.gz data.tar.gz > "$PKGDEST"/$apk
...@@ -466,17 +467,23 @@ apkcache() { ...@@ -466,17 +467,23 @@ apkcache() {
fi fi
local apk local apk
mkdir -p "$apkcache" || return 1 mkdir -p "$apkcache" || return 1
set -- cd "$apkcache"
# remove broken links
for apk in *.apk; do
if [ -L "$apk" ] && [ ! -f "$apk" ]; then
rm -f "$apk"
fi
done
# create links for this package
for apk in $(listpkg); do for apk in $(listpkg); do
ln -sf "$PKGDEST"/$apk "$apkcache"/$apk ln -sf "$PKGDEST"/$apk "$apkcache"/$apk
done done
# update the apkcache cache here
msg "Updating the cached abuild repository index..." msg "Updating the cached abuild repository index..."
(
local sign=".SIGN.RSA.${SIGN_PUBLIC_KEY##*/}" local sign=".SIGN.RSA.${SIGN_PUBLIC_KEY##*/}"
local oldindex= local oldindex=
cd "$apkcache"
if [ -f APKINDEX.tar.gz ]; then if [ -f APKINDEX.tar.gz ]; then
oldindex="--index APKINDEX.tar.gz" oldindex="--index APKINDEX.tar.gz"
fi fi
...@@ -484,7 +491,6 @@ apkcache() { ...@@ -484,7 +491,6 @@ apkcache() {
msg "Signing the index..." msg "Signing the index..."
abuild-sign -q APKINDEX.tar.gz.unsigned || exit 1 abuild-sign -q APKINDEX.tar.gz.unsigned || exit 1
mv APKINDEX.tar.gz.unsigned APKINDEX.tar.gz mv APKINDEX.tar.gz.unsigned APKINDEX.tar.gz
)
} }
# predefined splitfunc doc # predefined splitfunc doc
......
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