]> pd.if.org Git - zpackage/commitdiff
fixup merge bug
authorNathan Wagner <nw@hydaspes.if.org>
Mon, 26 Nov 2018 04:34:22 +0000 (04:34 +0000)
committerNathan Wagner <nw@hydaspes.if.org>
Mon, 26 Nov 2018 04:34:22 +0000 (04:34 +0000)
zpm-merge

index f6529ceba45ca8055c0403d2700f24df888fac75..dc6f51c45f13340ddb5e25ef1e9cc45f99a5f10d 100755 (executable)
--- a/zpm-merge
+++ b/zpm-merge
@@ -164,8 +164,8 @@ 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') and package = '$package'")
-       if [ "$newer" = '1' ]; then
+       newer=$(zpm shell "$target" "select '$pkg' > (select max(pkgid) collate vercmp from packages_pkgid where package = '$package') from packages_pkgid where package = '$package'")
+       if [ "$newer" = '1' ] || [ -z "$newer" ]; then
                return 0;
        fi
        return 1