]> pd.if.org Git - zpackage/commitdiff
fix query bug in merge
authorNathan Wagner <nw@hydaspes.if.org>
Mon, 26 Nov 2018 03:23:25 +0000 (03:23 +0000)
committerNathan Wagner <nw@hydaspes.if.org>
Mon, 26 Nov 2018 03:23:25 +0000 (03:23 +0000)
zpm-merge

index 0505af02163cc502f59a44407ebf6a8eea7cc0fc..5d3692623dfc762be963380f9bfed7fde94d0e41 100755 (executable)
--- a/zpm-merge
+++ b/zpm-merge
@@ -163,7 +163,7 @@ fi
 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