File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -34,13 +34,17 @@ infoval() {
3434
3535# fetch and verify package info
3636fetchinfo () {
37- fetch " $REPO " " pkgs/$1 .pkginfo" " $tmpdir /$1 .pkginfo" || return $?
38- fetch " $REPO " " pkgs/$1 .pkginfo.minisig" " $tmpdir /$1 .pkginfo.minisig" || return $?
39- minisign -Vm " $tmpdir /$1 .pkginfo" -p " $LPKGDIR /pubkey.pub" || return 4
40- local iv=" $( infoval " $tmpdir /$1 .pkginfo" NAME) " || return $?
41- if [ " $iv " != " $1 " ]; then
42- echo " Package name mismatch: requested $1 but got $iv " >&2
43- return 4
37+ if [ ( -e " $LPKGDIR /db/$1 /pkginfo.sh" ) -a ( " $UPDATE " -ne 1 ) ]; then
38+ cp " $LPKGDIR /db/$1 /pkginfo.sh" " $tmpdir /$1 .pkginfo" || return $?
39+ else
40+ fetch " $REPO " " pkgs/$1 .pkginfo" " $tmpdir /$1 .pkginfo" || return $?
41+ fetch " $REPO " " pkgs/$1 .pkginfo.minisig" " $tmpdir /$1 .pkginfo.minisig" || return $?
42+ minisign -Vm " $tmpdir /$1 .pkginfo" -p " $LPKGDIR /pubkey.pub" || return 4
43+ local iv=" $( infoval " $tmpdir /$1 .pkginfo" NAME) " || return $?
44+ if [ " $iv " != " $1 " ]; then
45+ echo " Package name mismatch: requested $1 but got $iv " >&2
46+ return 4
47+ fi
4448 fi
4549}
4650
@@ -238,6 +242,7 @@ elif [ "$1" == "install" ]; then
238242 done
239243 tmpcleanup
240244elif [ " $1 " == " update" ]; then
245+ UPDATE=1
241246 setup || fail " Failed to create temporary directory" 2
242247 pins=$( cat " $LPKGDIR /pins.list" ) || fail " Failed to read pin list" 2
243248 transact $pins || fail " Transaction failed" 3
You can’t perform that action at this time.
0 commit comments