#!perl -lw
die unless defined ($dir=shift@ARGV);
die unless defined ($sdir=shift@ARGV); # stackage
die unless defined ($fn=shift@ARGV);
open FI,$fn or die;
while(<FI>){
    if(/In order, the following would be installed/){
        $found=1;
        last;
    }
}
die "ERROR $fn : sigil not found" unless $found;
while(<FI>){
    chomp;
    die "ERROR $fn bad line $_" unless /^(.+-[0-9.]+)/;
    unless (-e "$dir/$1" or -e "$sdir/$1"){
        print "INFO $fn not latest because $_";
        $aborted=1;
        last;
    }
}
exit 1 if $aborted;
