check_newer() {
pkg=$1
package=$(zpm parse -n "$pkg")
- newer=$(zpm shell "$target" "select 1 from packages_pkgid where '$pkg' > (select max(pkgid) collate vercmp from packages_pkgid where package = '$package')")
+ newer=$(zpm shell "$target" "select 1 from packages_pkgid where '$pkg' > (select max(pkgid) collate vercmp from packages_pkgid where package = '$package') and package = '$package'")
if [ "$newer" = '1' ]; then
return 0;
fi
# TODO file tags and package tags
{
printf ".bail on\n"
- printf ".echo on\n"
printf "attach '%s' as remote;\n" "$pkgfile"
printf "begin;\n"