From: Samir Benmendil Date: Mon, 21 Jan 2013 14:16:24 +0000 (+0100) Subject: match pkgver correctly even when the package is installed X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/3d22eccf7480d44af3fe7683706fa2c68e8e65fc match pkgver correctly even when the package is installed also output pkgver --- diff --git a/bin/lib32-diff b/bin/lib32-diff index 039d7e1..ccec259 100755 --- a/bin/lib32-diff +++ b/bin/lib32-diff @@ -15,7 +15,7 @@ foreach (@lib32_pkgs) { my $lib32_pkgrel = $+{lib32_pkgrel}; next if exists $lib32{$lib32_pkgname}; - $lib32{$lib32_pkgname}=""; + $lib32{$lib32_pkgname}=$lib32_repo; next if $lib32_pkgname !~ /lib32-/; @@ -26,13 +26,13 @@ foreach (@lib32_pkgs) { my $pkg = `pacman -Ss '^$pkgname\$' | grep "/$pkgname " | head -n1`; chomp $pkg; - next if ( $pkg !~ /(?.+)\/(?\S+) (?.+)-(?\d+)/ ); + next if ( $pkg !~ /(?.+)\/(?\S+) (?[^-]+)-(?\d+)/ ); my $repo = $+{repo}; my $pkgver = $+{pkgver}; my $pkgrel = $+{pkgrel}; if ("$lib32_pkgver" lt "$pkgver") { - print "$lib32_repo/$lib32_pkgname is older than $repo/$pkgname\n"; + print "$lib32_repo/$lib32_pkgname $lib32_pkgver is older than $repo/$pkgname $pkgver\n"; } }