[pca] Display reqeusted revision
Martin Paul
martin at par.univie.ac.at
Fri Dec 5 11:33:24 CET 2008
Michael,
> It would be very helpful, if PCA could also display the
> „requested revision“ of a patch.
I've always hesitated to add this as it would pretend to give
information which is actually not there. As there is no information
about past revisions in the xref file, pca can't show that either. If I
start to list the requested revision in pca's output, people will start
to assume that e.g. the synopsis and patch requirements are from that
patch revision as well, and that's not doable.
> In the example given above, I would actually not install
> the patch, because some document (infodoc 72099 in this
> case) requests that at least rev. 07 of 113280 needs to
> be installed. And that requirement is met, when 08 is
> installed and thus I do not need to take any action at
> all (as far as that patch is concerned).
This kind of issue has come up before because of different "minimal
patch revision required" lists (e.g. for installation of Sun Studio),
but I've not yet found a way to integrate such a feature smoothly into
pca. But I've put together an alternative now:
#!/usr/bin/perl -w
my %p;
open (S, "/usr/bin/showrev -p | sort |");
while (<S>) {
next unless ($_ =~ /Patch: (\d{6})-(\d{2}) /);
$p{$1}=$2;
}
close (S);
foreach my $i (@ARGV) {
next unless ($i =~ /(\d{6})-(\d{2})/);
next if ((exists $p{$1}) && ($p{$1} ge $2));
print "$1-$2\n";
}
Save this script as "chkmin.pl" and make it executable. Run it like:
./chkmin.pl 113280-07
If the patch is installed in the specified revision or higher, it will
not be shown. You can specify a complete list of patches and chkmin.pl
will reduce it to those which are not installed in a high enough
revision. You can easily feed this list back into pca, like:
pca `./chkmin.pl 127143-02 127000-06 127001-01`
Let me know if you (or anybody else) find that useful. If so, I'll put
it onto pca's contrib page.
Martin.
More information about the pca
mailing list