2012-07-30 01:17:59 +08:00
|
|
|
#!/usr/bin/perl
|
|
|
|
use warnings;
|
|
|
|
use strict;
|
|
|
|
|
2012-12-22 09:52:24 +08:00
|
|
|
my @lib32_pkgs = `pacman -Sl testing lib32`;
|
|
|
|
my %lib32;
|
2012-07-30 01:17:59 +08:00
|
|
|
|
|
|
|
foreach (@lib32_pkgs) {
|
|
|
|
chomp;
|
2012-12-22 09:52:24 +08:00
|
|
|
next if (! /(?<repo>.+) (?<lib32_pkgname>lib32-.+) (?<lib32_pkgver>.+)-(?<lib32_pkgrel>\d+)/);
|
2012-07-30 01:17:59 +08:00
|
|
|
|
|
|
|
my $lib32_repo = $+{repo};
|
|
|
|
my $lib32_pkgname = $+{lib32_pkgname};
|
|
|
|
my $lib32_pkgver = $+{lib32_pkgver};
|
|
|
|
my $lib32_pkgrel = $+{lib32_pkgrel};
|
|
|
|
|
2012-12-22 09:52:24 +08:00
|
|
|
next if exists $lib32{$lib32_pkgname};
|
|
|
|
$lib32{$lib32_pkgname}="";
|
2012-07-30 01:17:59 +08:00
|
|
|
|
|
|
|
my $pkgname = $lib32_pkgname;
|
|
|
|
$pkgname =~ s/lib32-//;
|
|
|
|
|
|
|
|
my $pkg = `pacman -Ss "^$pkgname\$" | grep -v '^ ' | head -n1`;
|
|
|
|
chomp $pkg;
|
|
|
|
|
|
|
|
next if ( $pkg !~ /(?<repo>.+)\/(?<pkgname>.+) (?<pkgver>.+)-(?<pkgrel>\d+)/ );
|
|
|
|
|
|
|
|
my $repo = $+{repo};
|
|
|
|
my $pkgver = $+{pkgver};
|
|
|
|
my $pkgrel = $+{pkgrel};
|
|
|
|
|
2012-12-22 09:52:24 +08:00
|
|
|
if ("$lib32_pkgver" lt "$pkgver") {
|
2012-07-30 01:17:59 +08:00
|
|
|
print "$lib32_repo/$lib32_pkgname is older than $repo/$pkgname\n";
|
|
|
|
}
|
|
|
|
}
|