[pca] chkmin ignoring obsoletions if an older version of the patch is installed

2011-05-13 Thread Ateeq Altaf
On my system I have the following patches related to 'providing' 124204:

bash-3.00# patchadd -p | grep 124204
Patch: 120473-12 Obsoletes: 117463-05 118890-03 119985-02 120469-07 121006-02 
121278-01 121294-01 122535-01 123330-01 123350-01 123356-02 123911-01 124204-04 
124280-01 125795-01 Requires: 118833-36 122640-05 123839-01 Incompatibles: 
Packages: SUNWcsr SUNWcsl SUNWkvm SUNWtecla SUNWperl584core SUNWperl584usr 
SUNWkrbu SUNWopenssl-libraries SUNWvolu SUNWscpu SUNWzfskr SUNWzfsr SUNWsmapi 
SUNWzfsu SUNWcslr SUNWfmd SUNWdtrc SUNWsndmu
Patch: 124204-03 Obsoletes: Requires: 123839-01 122640-05 118833-25 
Incompatibles: Packages: SUNWzfskr SUNWzfsr SUNWzfsu SUNWfmd


Running chkmin on this system tells me I need to install patch 124204-04 when 
that obviously isn't the case:

bash-3.00# ./chkmin 124204-04
124204-04

I've made the following addition to not overwrite a higher patch rev with a 
lower one in the code, which I think should address the problem but not sure if 
it's too simple and I've missed something:

bash-3.00# diff -u chkmin.orig chkmin
--- chkmin.orig Fri May 13 18:42:26 2011
+++ chkmin  Fri May 13 18:53:46 2011
@@ -10,6 +10,7 @@
   chomp; $_ =~ s/Requires:.*$//;
   foreach my $i (split (/[, ]+/, $_)) {
 next unless ($i =~ /^(\d{6})-(\d{2})$/);
+next if (exists $p{$1} and $p{$1} ge $2);
 $p{$1}=$2;
   }
}

Has anyone else come across this issue?

Thanks
Ateeq

Ateeq A Altaf
Technical Consultant, Capita Software Services
Knights Court, Solihull Parkway
Birmingham Business Park B37 7YB

Office: 0870 400 5440
Fax: 0870 400 5001
email: ateeq.al...@capita.co.uk

Part of The Capita Group plc www.capita.co.uk



This email and any attachment to it are confidential. Unless you are the 
intended recipient, you may not use, copy or disclose either the message or any 
information contained in the message. If you are not the intended recipient, 
you should delete this email and notify the sender immediately.

Any views or opinions expressed in this email are those of the sender only, 
unless otherwise stated. All copyright in any Capita material in this email is 
reserved.

All emails, incoming and outgoing, may be recorded by Capita and monitored for 
legitimate business purposes.

Capita exclude all liability for any loss or damage arising or resulting from 
the receipt, use or transmission of this email to the fullest extent permitted 
by law.


Re: [pca] chkmin ignoring obsoletions if an older version of the patch is installed

2011-05-16 Thread Martin Paul

Ateeq Altaf wrote:

I've made the following addition to not overwrite a higher patch rev with a
lower one in the code, which I think should address the problem but not sure
if it's too simple and I've missed something:


Your fix is perfectly fine, and I've integrated it into my version of "chkmin".

Seems as if you're the first to come across this issue - thanks a lot for 
reporting it and providing a fix!


Martin.