summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Rees <maxcrees@me.com>2020-03-07 21:18:04 -0600
committerMax Rees <maxcrees@me.com>2020-03-07 21:18:04 -0600
commitbb8ae432864a418e8183603f12201a45c06bfc26 (patch)
treeaf78dfee452ab0917f182c7ded191b218bc3813f
parentd39cb52bcba870e117b833aaec8e7ea1d605c067 (diff)
downloadabuild-bb8ae432864a418e8183603f12201a45c06bfc26.tar.gz
abuild-bb8ae432864a418e8183603f12201a45c06bfc26.tar.bz2
abuild-bb8ae432864a418e8183603f12201a45c06bfc26.tar.xz
abuild-bb8ae432864a418e8183603f12201a45c06bfc26.zip
checkapk: work on ROFS
-rw-r--r--checkapk.in22
1 files changed, 10 insertions, 12 deletions
diff --git a/checkapk.in b/checkapk.in
index cb8abbe..1a7f63d 100644
--- a/checkapk.in
+++ b/checkapk.in
@@ -160,30 +160,28 @@ for i in $pkgname $subpackages; do
repodir=${startdir%/*}
repo=${repodir##*/}
- for filepath in "$PKGDEST"/$pkgfile "$REPODEST"/$repo/$CARCH/$pkgfile "$startdir"/$pkgfile; do
- if [ -f "$filepath" ]; then
+ for newapk in "$PKGDEST"/$pkgfile "$REPODEST"/$repo/$CARCH/$pkgfile "$startdir"/$pkgfile; do
+ if [ -f "$newapk" ]; then
break
fi
done
- [ -f "$filepath" ] || die "can't find new apk $pkgfile"
+ [ -f "$newapk" ] || die "can't find new apk $pkgfile"
# generate a temp repositories file with only the http(s) repos
grep -E "^https?:" /etc/apk/repositories > "$tmpdir/repositories"
- if ! oldapk="$($APK fetch --repositories-file "$tmpdir/repositories" "$_pkgname")"; then
+ if ! $APK fetch --stdout --repositories-file "$tmpdir/repositories" "$_pkgname" > old.apk; then
warning "could not download $_pkgname (network error or new package)"
continue
fi
- [ -n "$oldapk" ] || die "can't determine new apk name"
- oldapk="${oldapk##Downloading }.apk"
- [ -e "$oldapk" ] || die "can't find old apk $oldapk"
+ [ -e "old.apk" ] || die "can't find old apk old.apk"
- pkginfo "$oldapk" "pkginfo-$_pkgname-old"
- pkginfo "$filepath" "pkginfo-$_pkgname-new"
+ pkginfo "old.apk" "pkginfo-$_pkgname-old"
+ pkginfo "$newapk" "pkginfo-$_pkgname-new"
- filelist "$oldapk" "filelist-$_pkgname-old"
+ filelist "old.apk" "filelist-$_pkgname-old"
touch -r "pkginfo-$_pkgname-old" "filelist-$_pkgname-old"
- filelist "$filepath" "filelist-$_pkgname-new"
+ filelist "$newapk" "filelist-$_pkgname-new"
touch -r "pkginfo-$_pkgname-new" "filelist-$_pkgname-new"
diff -u "filelist-$_pkgname-old" "filelist-$_pkgname-new" || true
@@ -195,5 +193,5 @@ for i in $pkgname $subpackages; do
done
[ -n "$soname" ] || msg "No soname differences for $_pkgname."
- rm "$oldapk"
+ rm "old.apk"
done