X-Git-Url: https://pd.if.org/git/?p=zpackage;a=blobdiff_plain;f=zpm-install;h=0a7cf3ed2a8335fe2d2ebede5c095ad264255fca;hp=8d92ff7e5e51baddde1603c6e3c3dd856ebab275;hb=1323381f0eeb38466d8afc185a5295e4b5024bd5;hpb=293e281d6bd4b9c2c1de146184835ed34dc87b05 diff --git a/zpm-install b/zpm-install index 8d92ff7..0a7cf3e 100755 --- a/zpm-install +++ b/zpm-install @@ -10,6 +10,12 @@ die() { exit 1 } +changeall() { + for pkgid in $(zpm list -s $1); do + zpm pkg $pkgid status=$2 + done +} + dryrun=0 verbose=0 runscripts=1 @@ -167,6 +173,8 @@ for pkgid in $pkglist; do else zpm pkg $pkgid status=installing fi + + zpm shell "$ZPMDB" "update packages set status='updating' where status='installed' and package in (select package from packages where status = 'installing')" done # do the sync @@ -184,6 +192,8 @@ if [ "$pkgfile" != "$ZPMDB" ]; then syncopts="$syncopts -f $pkgfile" fi +#zpm shell $ZPMDB 'select * from syncinfo' +#zpm list -v zpm syncfs $syncopts syncrv=$? @@ -213,7 +223,7 @@ fi for pkgid in $pkglist; do package=$(zpm parse -n $pkgid) - current=$(zpm list -s installed "$package") + current=$(zpm list -s updating "$package") if [ $runscripts -gt 0 ]; then zpm script -p post-install $pkgid $current @@ -240,3 +250,5 @@ for pkgid in $pkglist; do fi done + +changeall updating updated