r46200 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r46199‎ | r46200 | r46201 >
Date:14:40, 25 January 2009
Author:river
Status:deferred
Tags:
Comment:
TSpca: update to 20081218-01
Modified paths:
  • /trunk/tools/ts-specs/TSpca.spec (modified) (history)
  • /trunk/tools/ts-specs/ext-sources/pca (modified) (history)

Diff [purge]

Index: trunk/tools/ts-specs/TSpca.spec
@@ -2,7 +2,7 @@
33
44 Name: TSpca
55 Summary: Patch Check Advanced
6 -Version: 20080911-01
 6+Version: 20081218-01
77 Source1: pca
88
99 SUNW_BaseDir: %{_basedir}
Index: trunk/tools/ts-specs/ext-sources/pca
@@ -8,7 +8,7 @@
99 #
1010 # Author : Martin Paul <martin@par.univie.ac.at>
1111 # Home : http://www.par.univie.ac.at/solaris/pca/
12 -my $version='20080911-01';
 12+my $version='20081218-01';
1313
1414 use strict;
1515 use Config;
@@ -52,7 +52,7 @@
5353 "noreboot|n|||0|Install only patches which do not require a reboot",
5454 "minage||i|DAYS|0|List only patches which are at least DAYS old",
5555 "maxage||i|DAYS|0|List only patches which are at most DAYS old",
56 - "syslog||s|TYPE||Log successful patch installs to syslog facility TYPE",
 56+ "syslog||s|TYPE|daemon.notice|Log patch installs to syslog priority TYPE",
5757 "nobackup|k|s@|ID||Do not back up files to be patched for patch ID",
5858 "backdir|B|s|DIR||Saves patch backout data to DIR",
5959 "safe|s|||0|Check locally modified files for safe patch installation",
@@ -94,7 +94,7 @@
9595 use File::Copy;
9696
9797 # Variable declarations
98 -my (%o, %input, %p, %pkgs, %u, %c, %locks, %rloop);
 98+my (%o, %input, %p, %pkgs, %u, %c, %locks, %rloop, %x, %pkga);
9999 my (@plist, @slist, @rlist);
100100 my $conf_dbg=''; my %conf_read;
101101 my $dlfile='';
@@ -106,6 +106,8 @@
107107 my $download_start;
108108 my $stopreached=0;
109109 my $wgetv='';
 110+my $agesum=0;
 111+my $xval=0;
110112
111113 # Force flush to stdout right after every print command without "\n"
112114 $|= 1;
@@ -135,22 +137,23 @@
136138 push (@plist, $id);
137139 }
138140 do_patch_list();
139 - exit 0;
 141+ exit $xval;
140142 }
141143
142144 get_current_xref();
143 -if (!$o{list} && !$o{download} && !$o{install} && !$o{readme}) { exit 0 }
 145+if (!$o{list} && !$o{download} && !$o{install} && !$o{readme}) { exit $xval }
144146
145147 get_uname();
146148 get_installed_packages();
147149 get_installed_patches();
148150 get_current_patches();
 151+set_extra_req();
149152 create_patch_list();
150153 print_header();
151154 do_patch_list();
152155 print_footer();
153156
154 -exit 0;
 157+exit $xval;
155158
156159 # Functions
157160
@@ -232,7 +235,7 @@
233236 ($p{$id}{irev} ne "00") && ($pp="$id-$p{$id}{irev}");
234237 ($p{$id}{crev} ne "00") && ($pp="$id-$p{$id}{crev}");
235238 ($p{$id}{prev} ne "00") && ($pp="$id-$p{$id}{prev}");
236 - $pp || err ("Unknown patch-id $id");
 239+ $pp || errx ("Unknown patch-id $id");
237240 # Remember revised patch id for later use
238241 $p{$id}{pp} = $pp;
239242 if ($o{threads}) {
@@ -255,7 +258,7 @@
256259 print_patch ($id);
257260 }
258261 if ($o{download} || $o{install}) {
259 - out ('info', "\nDownloading $pp ($c{current}/$c{total})");
 262+ out ('info', "\nLooking for $pp ($c{current}/$c{total})");
260263 if ($o{threads}) {
261264 { # wait for the first download worker to tell us it's ready...
262265 lock $download_start;
@@ -287,6 +290,7 @@
288291 install_patch($pp);
289292 if (-x '/var/run/nopatch') {
290293 `/var/run/nopatch`;
 294+ $xval=3;
291295 last
292296 }
293297 }
@@ -310,10 +314,10 @@
311315 printf "Install Summary : %d total, %d successful, ", $c{total}, $c{inst};
312316 printf "%d skipped, %d failed\n", $c{skipinst}, $c{failinst};
313317
314 - if ($c{p_ci}) { out ('info', "\nReconfiguration reboot required (init 6)") }
315 - elsif ($c{p_bi}) { out ('info', "\nReboot required (init 6)") }
316 - elsif ($c{p_c }) { out ('info', "\nReconfiguration reboot recommended (init 6)") }
317 - elsif ($c{p_b }) { out ('info', "\nReboot recommended (init 6)") }
 318+ if ($c{p_ci}) { out ('info', "\nReconfiguration reboot required (init 6)"); $xval || ($xval=4) }
 319+ elsif ($c{p_bi}) { out ('info', "\nReboot required (init 6)"); $xval || ($xval=4) }
 320+ elsif ($c{p_c }) { out ('info', "\nReconfiguration reboot recommended (init 6)"); $xval || ($xval=5) }
 321+ elsif ($c{p_b }) { out ('info', "\nReboot recommended (init 6)"); $xval || ($xval=5) }
318322 }
319323 if ($o{readme} && (@rlist)) {
320324 system ("$pager @rlist");
@@ -336,8 +340,8 @@
337341 } elsif ($s =~ /(\d{6}-\d{2})\.(zip|jar|tar\.Z|tar)$/) {
338342 push (@slist, $1);
339343 } elsif (-f $s) {
340 - if ($fc{$s}) { err ("Recursive file inclusion: $s") } else { $fc{$s}=1 }
341 - open (LIST, "<$s") || err ("Can't open $s ($!)");
 344+ if ($fc{$s}) { errx ("Recursive file inclusion: $s") } else { $fc{$s}=1 }
 345+ open (LIST, "<$s") || errx ("Can't open $s ($!)");
342346 while (<LIST>) {
343347 chomp;
344348 next unless $_;
@@ -345,7 +349,7 @@
346350 $again=1;
347351 }
348352 } else {
349 - err ("Unknown operand: $s");
 353+ errx ("Unknown operand: $s");
350354 }
351355 }
352356 @tlist=@slist;
@@ -446,7 +450,7 @@
447451 }
448452 }
449453 $p{$id}{listed}=1;
450 - push (@plist, $id);
 454+ push (@plist, $id); $agesum+=calculateage($id);
451455 return (1);
452456 }
453457
@@ -505,7 +509,7 @@
506510 # Ignore patches for foreign architectures.
507511 $found=0;
508512 foreach my $j (split (/\;/, $p{$id}{archs})) {
509 - if (($j eq $u{arch}) || ($j eq "all") || ($j eq "Solaris") || ($j eq "$u{arch}.$u{model}")) {
 513+ if (($j eq $u{arch}) || ($j eq "all") || ($j eq "$u{arch}.$u{model}")) {
510514 $found=1; last;
511515 }
512516 }
@@ -514,14 +518,18 @@
515519 # Ignore patches for packages that are not installed.
516520 $found=0;
517521 foreach my $j (split (/\;/, $p{$id}{pkgs})) {
518 - my ($package, $version)= split (/:/, $j);
519 - if ($pkgs{$package} && ($pkgs{$package} =~ /<$version>/)) {
 522+ my ($package, $version)= split (/:/, $j, 2);
 523+ next unless ($pkgs{$package});
 524+ my $iversion=$pkgs{$package};
 525+ $version =~ s/"/./g; $version =~ s/\(/./g; $version =~ s/\)/./g;
 526+ $iversion=~ s/"/./g; $iversion=~ s/\(/./g; $iversion=~ s/\)/./g;
 527+ if ($iversion =~ /<$version>/) {
520528 $found=1; last;
521529 }
522530 }
523531 if (!$found) { next; }
524532
525 - if (!patch_apply_check($id)) { next; }
 533+ if (!chk_extra_req($id)) { next; }
526534 if (!check_rs($s,$id) && ($type != 5)) { next; }
527535
528536 return (5);
@@ -573,8 +581,8 @@
574582 if ($p{$id}{ignore} eq $p{$id}{crev}) { return 0 }
575583
576584 # Check for minage, maxage and pattern
577 - if (($o{minage}) && (calculateage($p{$id}{reldate}) < $o{minage})) { return(0); }
578 - if (($o{maxage}) && (calculateage($p{$id}{reldate}) > $o{maxage})) { return(0); }
 585+ if (($o{minage}) && (calculateage($id) < $o{minage})) { return(0); }
 586+ if (($o{maxage}) && (calculateage($id) > $o{maxage})) { return(0); }
579587 if ($o{pattern}) {
580588 if ($o{pattern} =~ /^!/) {
581589 my $pattern= substr ($o{pattern}, 1);
@@ -591,27 +599,25 @@
592600 my $pp=$_[0];
593601 my ($id, $rev)= split (/-/, $pp);
594602
595 - lock_free($o{patchdir}, "download.$pp", 300) || err ("Another instance of pca is downloading $pp to $o{patchdir} right now");
 603+ lock_free($o{patchdir}, "download.$pp", 300) || errx ("Another instance of pca is downloading $pp to $o{patchdir} right now");
596604
597605 # Check if patch exists
598606 if (-d "$o{patchdir}/$pp") {
599 - buffer_worker_out ($id, 'info', "Skipped (directory exists)"); $c{skipdl}++; return;
 607+ buffer_worker_out ($id, 'info', "Found patch directory"); $c{skipdl}++; return;
600608 }
601609 foreach my $ext ('zip','jar','tar.Z','tar') {
 610+ (-z "$o{patchdir}/$pp.$ext") && unlink "$o{patchdir}/$pp.$ext";
602611 if (-f "$o{patchdir}/$pp.$ext") {
603 - if (-s "$o{patchdir}/$pp.$ext") {
604 - buffer_worker_out ($id, 'info', "Skipped (file exists)"); $c{skipdl}++; return;
605 - }
606 - unlink "$o{patchdir}/$pp.$ext";
 612+ buffer_worker_out ($id, 'info', "Found patch file"); $c{skipdl}++; return;
607613 }
608614 }
609615
610616 # Remember if we downloaded the patch for install only
611617 $o{download} || ($p{$id}{dfori}=1);
612618
613 - (-w $o{patchdir}) || err ("Can't write to patch download directory $o{patchdir}");
 619+ (-w $o{patchdir}) || errx ("Can't write to patch download directory $o{patchdir}");
614620
615 - lock_create($o{patchdir}, "download.$pp", 1) || err ("Another instance of pca is downloading $pp to $o{patchdir} right now");
 621+ lock_create($o{patchdir}, "download.$pp", 1) || errx ("Another instance of pca is downloading $pp to $o{patchdir} right now");
616622
617623 # Try to get patch from local patch server
618624 if ($o{patchurl} =~ /^file:/) {
@@ -734,10 +740,11 @@
735741 sub filetype {
736742 my $fname=$_[0]; my $buffer;
737743
738 - open (F, "< $fname") || err ("Can't open $fname ($!)");
739 - read F, $buffer, 1024;
 744+ open (F, "< $fname") || errx ("Can't open $fname ($!)");
 745+ my $size=read (F, $buffer, 512);
740746 close (F);
741747
 748+ if ($size != 512) { dbg ("Short file: $fname"); return ('unknown') }
742749 if (substr($buffer, 257, 5) eq "ustar") { return ('tar') }
743750 if (substr($buffer, 0, 2) eq "\037\235") { return ('tar.Z') }
744751 if (substr($buffer, 0, 4) eq "PK\003\004") {
@@ -757,7 +764,7 @@
758765 my $opt='';
759766
760767 $patchxdir= "$o{tmpdir}/pca." . time() . $$;
761 - mkdir $patchxdir,0755 || err ("Can't create temporary directory $patchxdir ($!)");
 768+ mkdir $patchxdir,0755 || errx ("Can't create temporary directory $patchxdir ($!)");
762769
763770 if (-d "$o{patchdir}/$pp") {
764771 $?= !symlink ("$o{patchdir}/$pp", "$patchxdir/$pp");
@@ -801,7 +808,7 @@
802809 # Do we need a reboot?
803810 my $p_b=0; my $p_bi=0; my $p_c=0; my $p_ci=0;
804811 if (-f $patchinfo) {
805 - open(PATCHINFO,$patchinfo) || err ("Can't open $patchinfo ($!)");
 812+ open(PATCHINFO,$patchinfo) || errx ("Can't open $patchinfo ($!)");
806813 dbg ("Checking for reboot/reconfig in patchinfo");
807814 while (<PATCHINFO>) {
808815 if (/PATCH_PROPERTIES=.*reconfigimmediate/) { $p_ci=1; last }
@@ -811,7 +818,7 @@
812819 }
813820 close PATCHINFO;
814821 } elsif (-f $readme) {
815 - open(README,$readme) || err ("Can't open $readme ($!)");
 822+ open(README,$readme) || errx ("Can't open $readme ($!)");
816823 dbg ("Checking for reboot/reconfig in README");
817824 while(<README>) {
818825 if (/Reconfig.*immediate.*after.*install/) { $p_ci=1; last }
@@ -825,7 +832,7 @@
826833 # If the patchadd command doesn't exist, try installpatch, which
827834 # comes with patches for Solaris <= 2.5.1.
828835 (-x $o{patchadd}) || ($o{patchadd}="$patchxdir/$pp/installpatch");
829 - (-x $o{patchadd}) || err ("Can't execute patchadd/installpatch");
 836+ (-x $o{patchadd}) || errx ("Can't execute patchadd/installpatch");
830837
831838 # Sun Studio 11 patches on Solaris 10 must be installed with -G
832839 # Patches 119254-34 and 119255-34 fix this in patchadd
@@ -844,7 +851,7 @@
845852 } elsif ($o{pretend}) {
846853 out ('info', "Skipping patchadd (pretend)"); $c{skipinst}++;
847854 } else {
848 - lock_create($o{tmpdir}, "install", 1) || err ("Another instance of pca is installing patches right now");
 855+ lock_create($o{tmpdir}, "install", 1) || errx ("Another instance of pca is installing patches right now");
849856 $o{currentzone} && ($opt .= "-G ");
850857 if (($o{nobackup} =~ /all/) || ($p{$id}{nobackup} eq "00") || ($p{$id}{nobackup} eq $p{$id}{crev})) { $opt .= "-d " }
851858 $o{backdir} && ($opt .= "-B $o{backdir} ");
@@ -943,9 +950,9 @@
944951 open (F, "<$odir/$f"); read (F, my $content, $size); close (F);
945952 print $content;
946953 } else {
947 - err ("$f not found");
 954+ errx ("$f not found");
948955 }
949 - exit 0;
 956+ exit $xval;
950957 }
951958
952959 sub checksoa {
@@ -984,10 +991,10 @@
985992 sub check_prerequisites {
986993 # Must be root to install patches
987994 if ($o{install} && ($< != 0) && !$o{pretend}) {
988 - err ("You must be root to install patches");
 995+ errx ("You must be root to install patches");
989996 }
990997 if ($o{install} && $o{safe} && !$o{proxy} && ($< != 0)) {
991 - err ("You must be root to use safe mode");
 998+ errx ("You must be root to use safe mode");
992999 }
9931000
9941001 # Set umask (esp. for patchxdir)
@@ -1011,7 +1018,7 @@
10121019 $input{xref}="$o{xrefdir}/patchdiag.xref";
10131020
10141021 # Check patch download directory
1015 - (-d $o{patchdir}) || err ("Can't find patch directory $o{patchdir}");
 1022+ (-d $o{patchdir}) || errx ("Can't find patch directory $o{patchdir}");
10161023
10171024 # Check for pager
10181025 $ENV{PAGER} && ($pager=$ENV{PAGER});
@@ -1031,7 +1038,7 @@
10321039 $input{showrev}= "<$o{fromfiles}/showrev.out";
10331040 $input{uname} = "<$o{fromfiles}/uname.out";
10341041 } else {
1035 - err ("Can't find pkginfo/showrev/uname output with prefix $o{fromfiles}");
 1042+ errx ("Can't find pkginfo/showrev/uname output with prefix $o{fromfiles}");
10361043 }
10371044 dbg ("Using $o{fromfiles} as prefix to read .out files");
10381045 } else {
@@ -1139,6 +1146,7 @@
11401147 $wl{120346}="/etc/hba.conf";
11411148 $wl{120410}="/etc/gtk-2.0/gtk.immodules /etc/sparcv9/gtk-2.0/gtk.immodules";
11421149 $wl{120460}="/etc/gtk-2.0/gtk.immodules /etc/sparcv9/gtk-2.0/gtk.immodules";
 1150+ $wl{121308}="/usr/sadm/lib/smc/policy/smcconsole.policy";
11431151 $wl{121430}="/etc/default/lu";
11441152 $wl{122212}="/etc/gconf/gconf.xml.defaults/apps/panel/default_setup/general/%gconf.xml";
11451153 $wl{124393}="/etc/security/auth_attr /etc/security/prof_attr";
@@ -1146,6 +1154,7 @@
11471155 $wl{127127}="/etc/krb5/krb5.conf /etc/logadm.conf /etc/pam.conf /etc/security/audit_warn /etc/security/auth_attr /etc/security/prof_attr /etc/shadow /etc/user_attr /kernel/drv/mpt.conf";
11481156 $wl{127755}="/etc/logadm.conf";
11491157 $wl{137093}="/etc/logindevperm";
 1158+ $wl{137137}="/etc/vfstab";
11501159 $wl{137274}="/etc/mnttab";
11511160 # 10/x86
11521161 $wl{118855}="/etc/logindevperm /etc/security/prof_attr /etc/vold.conf /lib/libc.so.1 /etc/security/device_policy /etc/ipf/pfil.ap /boot/solaris/devicedb/master";
@@ -1161,6 +1170,7 @@
11621171 $wl{120347}="/etc/hba.conf";
11631172 $wl{120411}="/etc/gtk-2.0/gtk.immodules /etc/amd64/gtk-2.0/gtk.immodules";
11641173 $wl{120461}="/etc/gtk-2.0/gtk.immodules /etc/amd64/gtk-2.0/gtk.immodules";
 1174+ $wl{121309}="/usr/sadm/lib/smc/policy/smcconsole.policy";
11651175 $wl{121431}="/etc/default/lu";
11661176 $wl{122213}="/etc/gconf/gconf.xml.defaults/apps/panel/default_setup/general/%gconf.xml";
11671177 $wl{124394}="/etc/security/auth_attr /etc/security/prof_attr";
@@ -1168,13 +1178,13 @@
11691179 $wl{125216}="/etc/wgetrc";
11701180 $wl{127128}="/etc/krb5/krb5.conf /etc/logadm.conf /etc/pam.conf /etc/security/audit_warn /etc/security/auth_attr /etc/security/prof_attr /etc/shadow /etc/user_attr /kernel/drv/mpt.conf";
11711181 $wl{127756}="/etc/logadm.conf";
1172 - $wl{128307}="/etc/security/device_policy";
11731182 $wl{137094}="/etc/logindevperm";
1174 - $wl{137112}="/lib/libc.so.1";
 1183+ $wl{137138}="/etc/vfstab /lib/libc.so.1";
11751184 $wl{137275}="/etc/mnttab";
 1185+ $wl{138270}="/etc/security/device_policy";
11761186
11771187 (-f $readme) || return (1);
1178 - open (README, "<$readme") || err ("Can't open $readme ($!)");
 1188+ open (README, "<$readme") || errx ("Can't open $readme ($!)");
11791189
11801190 FILE: while (<README>) {
11811191 next if ($_ !~ /Files included with this patch:/);
@@ -1207,7 +1217,7 @@
12081218 my $fc=$#tfiles;
12091219 ($fc >= 1023) && ($fc=1023);
12101220 my $pfile="$o{tmpdir}/pca.pkgchk." . time() . $$;
1211 - open (PFILE, ">$pfile") || err ("Can't open $pfile ($!)");
 1221+ open (PFILE, ">$pfile") || errx ("Can't open $pfile ($!)");
12121222 foreach my $f (@tfiles[0..$fc]) { print PFILE "$f\n" }
12131223 close PFILE;
12141224 $out .= `$pkgchk $o{root} -q -i $pfile 2>&1`;
@@ -1223,312 +1233,227 @@
12241234 return (1);
12251235 }
12261236
1227 -sub patch_apply_check {
 1237+sub set_extra_req {
 1238+ $x{113039}=$x{113040}=$x{113041}=$x{113042}=$x{113043}=$x{111095}=$x{111096}=$x{111413}="rpkg=SUNWsan";
 1239+ $x{114046}=$x{119209}="rosrel=5.8";
 1240+ $x{114049}=$x{114050}=$x{119211}=$x{119212}="rosrel=5.9";
 1241+ $x{117765}=$x{117766}="rosrel=5.8"; $x{117767}=$x{117768}="rosrel=5.9";
 1242+ $x{114644}=$x{114645}=$x{114646}=$x{114647}=$x{114648}=$x{114649}="rosrel=5.8";
 1243+ $x{114650}=$x{114651}=$x{114652}=$x{114653}="rosrel=5.8";
 1244+ $x{114816}=$x{114817}=$x{115780}=$x{115781}=$x{117520}=$x{117521}="rosrel=5.8";
 1245+ $x{114686}=$x{114687}=$x{114688}=$x{114689}="rosrel=5.9";
 1246+ $x{114690}=$x{114691}=$x{114692}=$x{114693}=$x{114694}=$x{114695}="rosrel=5.9";
 1247+ $x{114818}=$x{114819}=$x{115782}=$x{115783}=$x{117526}=$x{117527}="rosrel=5.9";
 1248+ $x{114255}="rarch=sparc"; $x{114256}="rarch=i386";
 1249+ $x{115328}="rosrel=5.8";
 1250+ $x{115342}="rosrel=5.9";
 1251+ $x{115343}="rosrel=5.9";
 1252+ $x{119346}="rosrel=5.10";
 1253+ $x{115766}=$x{120879}=$x{120954}="rarch=sparc";
 1254+ $x{120091}=$x{120880}=$x{120955}="rarch=i386";
 1255+ $x{119300}="rosrel=5.8"; $x{119301}="rosrel=5.9"; $x{119302}="rosrel=5.10";
 1256+ $x{113434}="rpkg=SUNWwbsup";
 1257+ $x{109700}=$x{111248}="rosrel=5.6"; $x{109701}=$x{111249}="rosrel=5.7";
 1258+ $x{111250}="rosrel=5.8"; $x{115548}="rosrel=5.9";
 1259+ $x{123200}="rosrel=5.8"; $x{123201}="rosrel=5.9"; $x{123202}="rosrel=5.10";
 1260+ $x{119527}=$x{119530}=$x{119325}="rarch=sparc";
 1261+ $x{119528}=$x{119531}=$x{119326}="rarch=i386";
 1262+ $x{127498}=$x{127499}="rosrel=5.8";
 1263+ $x{136986}=$x{136987}="rosrel=5.8";
 1264+ $x{125950}=$x{125951}="rosrel=5.9";
 1265+ $x{125952}=$x{125953}="rosrel=5.10";
 1266+ $x{123827}="rosrel=5.8"; $x{123828}="rosrel=5.9"; $x{123829}="rosrel=5.10";
 1267+ $x{125760}="rosrel=5.8"; $x{125761}="rosrel=5.9"; $x{125762}="rosrel=5.10";
 1268+ $x{106514}=$x{108049}=$x{108879}=$x{109120}=$x{109413}="rarch=sparc";
 1269+ $x{117784}=$x{118195}=$x{118263}=$x{118950}=$x{123254}="rarch=sparc";
 1270+ $x{106515}=$x{108050}=$x{108881}=$x{109121}=$x{109414}="rarch=i386";
 1271+ $x{117785}=$x{118196}=$x{118264}=$x{118951}=$x{124590}="rarch=i386";
 1272+ $x{126356}="rarch=sparc"; $x{126357}="rarch=i386";
 1273+ $x{117429}="rosrel=5.9";
 1274+ $x{118386}="rosrel=5.6"; $x{118387}="rosrel=5.7"; $x{118388}="rosrel=5.8"; $x{118389}="rosrel=5.9";
 1275+ $x{118828}="rosrel=5.8"; $x{118829}="rosrel=5.9";
 1276+ $x{118836}="rosrel=5.6"; $x{118837}="rosrel=5.7"; $x{118838}="rosrel=5.8";
 1277+ $x{118839}="rosrel=5.9"; $x{118840}="rosrel=5.9";
 1278+ $x{120376}="rosrel=5.6"; $x{120377}="rosrel=5.7"; $x{120378}="rosrel=5.8"; $x{120379}="rosrel=5.9";
 1279+ $x{124689}="rosrel=5.8"; $x{124690}="rosrel=5.9";
 1280+ $x{111857}="rosrel=5.8"; $x{114176}="rosrel=5.9";
 1281+ $x{125445}="rosrel=5.9"; $x{125446}="rosrel=5.10";
 1282+ $x{127553}="rarch=sparc"; $x{127554}="rarch=i386";
 1283+ $x{121708}="rosrel=5.8"; $x{121709}="rosrel=5.9"; $x{121710}="rosrel=5.10";
 1284+ $x{125848}="rosrel=5.8"; $x{125849}="rosrel=5.9"; $x{125850}="rosrel=5.10";
 1285+ $x{115835}=$x{115836}="rpkgs=SUNWgscr";
 1286+ $x{108553}="rosrel=5.8";
 1287+ $x{125276}="rarch=sparc";
 1288+ $x{106533}="rplatform=SUNW,UltraSPARC-IIi-cEngine";
 1289+ $x{106629}="rplatform=CYRS,Superserver-6400";
 1290+ $x{116413}="rplatform=SUNW,Sun-Fire-15000";
 1291+ $x{125277}="rosrel=5.9:rarch=i386";
 1292+ $x{125278}="rosrel=5.10:rarch=i386";
 1293+ $x{124480}="rosrel=5.9:rarch=sparc";
 1294+ $x{124481}="rosrel=5.10:rarch=sparc";
 1295+ $x{124482}="rosrel=5.10:rarch=i386";
 1296+ $x{119380}="rosrel=5.8";
 1297+ $x{110936}=$x{110971}="rosrel=5.6";
 1298+ $x{110937}=$x{110972}="rosrel=5.7";
 1299+ $x{118386}="rosrel=5.6"; $x{118387}="rosrel=5.7"; $x{118388}="rosrel=5.8"; $x{118389}="rosrel=5.9";
 1300+ $x{118828}="rosrel=5.8"; $x{118829}="rosrel=5.9";
 1301+ $x{118836}="rosrel=5.6"; $x{118837}="rosrel=5.7"; $x{118838}="rosrel=5.8"; $x{118839}="rosrel=5.9";
 1302+ $x{127680}="rosrel=5.8"; $x{127681}=$x{127682}="rosrel=5.9"; $x{127683}=$x{127684}="rosrel=5.10";
 1303+ $x{138550}="rosrel=5.8"; $x{138551}=$x{138552}="rosrel=5.9"; $x{138553}=$x{138554}="rosrel=5.10";
 1304+}
 1305+
 1306+sub chk_extra_req {
12281307 my $id=$_[0];
 1308+ my ($major, $minor) = split (/\./, $u{osrel});
12291309
1230 - if ($id =~ /113039|113040|113041|113042|113043/) {
1231 - if (!$pkgs{"SUNWsan"}) { return (0) }
 1310+ if (exists $x{$id}) {
 1311+ foreach my $i (split (/:/, $x{$id})) {
 1312+ my ($opt, $val)=split(/=/, $i);
 1313+ if (($opt eq "rarch") && ($val ne $u{arch})) { return 0 }
 1314+ if (($opt eq "rosrel") && ($val ne $u{osrel})) { return 0 }
 1315+ if (($opt eq "rplatform") && ($val ne $u{platform})) { return 0 }
 1316+ if (($opt eq "rpkg") && !$pkgs{$val}) { return 0 }
 1317+ }
 1318+ return 1;
12321319 }
12331320
12341321 if ($id eq "114045") {
1235 - if ((exists $p{114049}) && ($p{114049}{irev} gt '03')) { return (0) }
 1322+ if ((exists $p{114049}) && ($p{114049}{irev} gt '03')) { return 0 }
12361323 }
1237 -
1238 - if (($id =~ /114046|119209/) && ($u{osrel} ne "5.8")) { return (0) }
1239 - if (($id =~ /114049|114050/) && ($u{osrel} ne "5.9")) { return (0) }
1240 - if (($id =~ /119211|119212/) && ($u{osrel} ne "5.9")) { return (0) }
1241 -
12421324 if ($id eq "114790") {
1243 - if (!$pkgs{"SUNWdcar"} || $pkgs{"SUNWdcar"} !~ "<1.1.0,REV=2002.05.29.15.02>") { return (0) }
1244 - if (!$pkgs{"SUNWcrypr"} || $pkgs{"SUNWcrypr"} !~ "<1.1.0,REV=2002.05.29.15.00>") { return (0) }
 1325+ if (!$pkgs{"SUNWdcar"} || $pkgs{"SUNWdcar"} !~ "<1.1.0,REV=2002.05.29.15.02>") { return 0 }
 1326+ if (!$pkgs{"SUNWcrypr"} || $pkgs{"SUNWcrypr"} !~ "<1.1.0,REV=2002.05.29.15.00>") { return 0 }
12451327 }
1246 -
1247 - if (($id =~ /117765|117766/) && ($u{osrel} ne "5.8")) { return (0) }
1248 - if (($id =~ /117767|117768/) && ($u{osrel} ne "5.9")) { return (0) }
1249 -
12501328 if ($id eq "113332") {
1251 - if (($pkgs{"SUNWhea"}) || ($pkgs{"SUNWmdb"})) { return (1) }
1252 - if (($u{model} eq 'sun4u') || ($u{model} eq 'sun4us')) { return (1) }
1253 - return (0);
 1329+ if (($pkgs{"SUNWhea"}) || ($pkgs{"SUNWmdb"})) { return 1 }
 1330+ if (($u{model} eq 'sun4u') || ($u{model} eq 'sun4us')) { return 1 }
 1331+ return 0;
12541332 }
1255 -
12561333 if ($id =~ /115010|116478/) {
1257 - if (($pkgs{"SUNWhea"}) || ($pkgs{"SUNWmdb"})) { return (1) }
1258 - if ($u{model} eq 'sun4u') { return (1) }
1259 - return (0);
 1334+ if (($pkgs{"SUNWhea"}) || ($pkgs{"SUNWmdb"})) { return 1 }
 1335+ if ($u{model} eq 'sun4u') { return 1 }
 1336+ return 0;
12601337 }
1261 -
12621338 if ($id =~ /109077|109078/) {
1263 - if ((!$pkgs{"SUNWdhcm"}) && (!$pkgs{"SUNWdhcsu"})) { return (0) }
1264 - if ($pkgs{"SUNWj3rt"}) { return (1) }
1265 - return (0);
 1339+ if ((!$pkgs{"SUNWdhcm"}) && (!$pkgs{"SUNWdhcsu"})) { return 0 }
 1340+ if ($pkgs{"SUNWj3rt"}) { return 1 }
 1341+ return 0;
12661342 }
1267 -
12681343 if ($id =~ /118739|116706/) {
1269 - if (!$pkgs{"SUNWtsr"} || $pkgs{"SUNWtsr"} !~ "<2.5.0,REV=2003.04.03.21.27>") { return (0) }
 1344+ if (!$pkgs{"SUNWtsr"} || $pkgs{"SUNWtsr"} !~ "<2.5.0,REV=2003.04.03.21.27>") { return 0 }
12701345 }
12711346 if ($id =~ /118740|116707/) {
1272 - if (!$pkgs{"SUNWtsr"} || $pkgs{"SUNWtsr"} !~ "<2.5.0,REV=2003.04.03.19.26>") { return (0) }
 1347+ if (!$pkgs{"SUNWtsr"} || $pkgs{"SUNWtsr"} !~ "<2.5.0,REV=2003.04.03.19.26>") { return 0 }
12731348 }
12741349 if ($id eq "118741") {
1275 - if (!$pkgs{"SUNWtsr"} || $pkgs{"SUNWtsr"} !~ "<2.5.0,REV=2003.11.11.23.55>") { return (0) }
 1350+ if (!$pkgs{"SUNWtsr"} || $pkgs{"SUNWtsr"} !~ "<2.5.0,REV=2003.11.11.23.55>") { return 0 }
12761351 }
12771352 if ($id eq "118742") {
1278 - if (!$pkgs{"SUNWtsr"} || $pkgs{"SUNWtsr"} !~ "<2.5.0,REV=2003.11.11.20.36>") { return (0) }
 1353+ if (!$pkgs{"SUNWtsr"} || $pkgs{"SUNWtsr"} !~ "<2.5.0,REV=2003.11.11.20.36>") { return 0 }
12791354 }
1280 -
12811355 if ($id eq "110692") {
1282 - if ((exists $p{108806}) && ($p{108806}{irev} ge '01')) { return (0) }
1283 - if ((exists $p{108806}) && ($p{108806}{crev} ge '01')) { return (0) }
 1356+ if ((exists $p{108806}) && ($p{108806}{irev} ge '01')) { return 0 }
 1357+ if ((exists $p{108806}) && ($p{108806}{crev} ge '01')) { return 0 }
12841358 }
1285 -
12861359 if ($id eq "111412") {
1287 - if (!$pkgs{"SUNWmdi"} || $pkgs{"SUNWmdi"} !~ "<11.8.0,REV=2001.01.19.01.02>") { return (0) }
1288 - if (!$pkgs{"SUNWsan"}) { return (0) }
 1360+ if (!$pkgs{"SUNWmdi"} || $pkgs{"SUNWmdi"} !~ "<11.8.0,REV=2001.01.19.01.02>") { return 0 }
 1361+ if (!$pkgs{"SUNWsan"}) { return 0 }
12891362 }
1290 - if ($id =~ /111095|111096|111413/) {
1291 - if (!$pkgs{"SUNWsan"}) { return (0) }
1292 - }
12931363 if ($id eq "111097") {
1294 - if (!$pkgs{"SUNWsan"}) { return (0) }
1295 - if (!$pkgs{"SUNWqlc"}) { return (0) }
 1364+ if (!$pkgs{"SUNWsan"}) { return 0 }
 1365+ if (!$pkgs{"SUNWqlc"}) { return 0 }
12961366 }
1297 -
12981367 if ($id eq "111656") {
1299 - if (!((exists $p{109460}) && ($p{109460}{irev} eq '05'))) { return (0) }
 1368+ if (!((exists $p{109460}) && ($p{109460}{irev} eq '05'))) { return 0 }
13001369 }
13011370 if ($id eq "111658") {
1302 - if (!((exists $p{107469}) && ($p{107469}{irev} eq '08'))) { return (0) }
 1371+ if (!((exists $p{107469}) && ($p{107469}{irev} eq '08'))) { return 0 }
13031372 }
13041373 if ($id eq "111079") {
1305 - if (!((exists $p{105375}) && ($p{105375}{irev} eq '26'))) { return (0) }
 1374+ if (!((exists $p{105375}) && ($p{105375}{irev} eq '26'))) { return 0 }
13061375 }
1307 -
13081376 if ($id eq "107474") {
1309 - if ((exists $p{107292}) && ($p{107292}{irev} ge '02')) { return (1) }
1310 - return (0);
 1377+ if ((exists $p{107292}) && ($p{107292}{irev} ge '02')) { return 1 }
 1378+ return 0;
13111379 }
1312 -
1313 - if ($id eq "106533") {
1314 - if ($u{platform} ne 'SUNW,UltraSPARC-IIi-cEngine') { return (0) }
1315 - }
1316 - if ($id eq "106629") {
1317 - if ($u{platform} ne 'CYRS,Superserver-6400') { return (0) }
1318 - }
1319 - if ($id eq "112780") {
1320 - if (!($u{model} eq 'sun4u')) { return (0) }
1321 - }
 1380+ if (($id eq "112780") && !($u{model} eq 'sun4u')) { return 0 }
13221381 if ($id eq "112327") {
1323 - if (($u{osrel} ne "5.6") && ($u{osrel} ne "5.7")) { return (0) }
 1382+ if (($u{osrel} ne "5.6") && ($u{osrel} ne "5.7")) { return 0 }
13241383 }
1325 -
1326 - if ($id =~ /11464[456789]|11465[0123]|11481[67]|11578[01]|11752[01]/) {
1327 - if ($u{osrel} ne "5.8") { return (0) }
1328 - }
1329 - if ($id =~ /11468[6789]|11469[012345]|11481[89]|11578[23]|11752[67]/) {
1330 - if ($u{osrel} ne "5.9") { return (0) }
1331 - }
1332 -
13331384 if ($id eq "111891") {
1334 - if (!$pkgs{"SUNWutr"} || $pkgs{"SUNWutr"} !~ "<1.3_12.c,REV=2001.07.16.20.52>") { return (0) }
 1385+ if (!$pkgs{"SUNWutr"} || $pkgs{"SUNWutr"} !~ "<1.3_12.c,REV=2001.07.16.20.52>") { return 0 }
13351386 }
1336 -
1337 - if (($id eq "114255") && ($u{arch} ne "sparc")) { return (0) }
1338 - if (($id eq "114256") && ($u{arch} ne "i386")) { return (0) }
1339 -
1340 - if (($id eq "115328") && ($u{osrel} ne "5.8")) { return (0) }
1341 - if (($id eq "115342") && ($u{osrel} ne "5.9")) { return (0) }
1342 - if (($id eq "115343") && ($u{osrel} ne "5.9")) { return (0) }
1343 - if (($id eq "119346") && ($u{osrel} ne "5.10")) { return (0) }
1344 -
1345 - if (($id eq "115766") && ($u{arch} ne "sparc")) { return (0) }
1346 - if (($id eq "120091") && ($u{arch} ne "i386")) { return (0) }
1347 - if (($id eq "120879") && ($u{arch} ne "sparc")) { return (0) }
1348 - if (($id eq "120880") && ($u{arch} ne "i386")) { return (0) }
1349 - if (($id eq "120954") && ($u{arch} ne "sparc")) { return (0) }
1350 - if (($id eq "120955") && ($u{arch} ne "i386")) { return (0) }
1351 -
1352 - if (($id =~ /115835|115836/) && (!$pkgs{"SUNWgscr"})) { return (0) }
1353 -
1354 - if (($id eq "119300") && ($u{osrel} ne "5.8")) { return (0) }
1355 - if (($id eq "119301") && ($u{osrel} ne "5.9")) { return (0) }
1356 - if (($id eq "119302") && ($u{osrel} ne "5.10")) { return (0) }
1357 -
13581387 if ($id =~ /109357/) {
1359 - if ((exists $p{109778}) && ($p{109778}{irev} ge '08')) { return (0) }
1360 - if ((exists $p{109778}) && ($p{109778}{crev} ge '08')) { return (0) }
 1388+ if ((exists $p{109778}) && ($p{109778}{irev} ge '08')) { return 0 }
 1389+ if ((exists $p{109778}) && ($p{109778}{crev} ge '08')) { return 0 }
13611390 }
1362 - if (($id eq "113434") && (!$pkgs{"SUNWwbsup"})) { return (0) }
1363 -
1364 - if (($id eq "109700") && ($u{osrel} ne "5.6")) { return (0) }
1365 - if (($id eq "109701") && ($u{osrel} ne "5.7")) { return (0) }
1366 - if (($id eq "111248") && ($u{osrel} ne "5.6")) { return (0) }
1367 - if (($id eq "111249") && ($u{osrel} ne "5.7")) { return (0) }
1368 - if (($id eq "111250") && ($u{osrel} ne "5.8")) { return (0) }
1369 - if (($id eq "115548") && ($u{osrel} ne "5.9")) { return (0) }
1370 -
1371 - if (($id eq "108553") && ($u{osrel} ne "5.8")) { return (0) }
1372 - if (($id eq "108834") && (($u{osrel} ne "5.5.1") || ($u{osrel} ne "5.6") || ($u{osrel} ne "5.7"))) { return (0) }
1373 - if (($id eq "112125") && (($u{osrel} ne "5.6") || ($u{osrel} ne "5.7"))) { return (0) }
1374 - if (($id eq "112126") && (($u{osrel} ne "5.8") || ($u{osrel} ne "5.9"))) { return (0) }
1375 -
1376 - if (($id eq "123200") && ($u{osrel} ne "5.8")) { return (0) }
1377 - if (($id eq "123201") && ($u{osrel} ne "5.9")) { return (0) }
1378 - if (($id eq "123202") && ($u{osrel} ne "5.10")) { return (0) }
1379 -
1380 - if (($id eq "119527") && ($u{arch} ne "sparc")) { return (0) }
1381 - if (($id eq "119528") && ($u{arch} ne "i386")) { return (0) }
1382 - if (($id eq "119530") && ($u{arch} ne "sparc")) { return (0) }
1383 - if (($id eq "119531") && ($u{arch} ne "i386")) { return (0) }
1384 - if (($id eq "119325") && ($u{arch} ne "sparc")) { return (0) }
1385 - if (($id eq "119326") && ($u{arch} ne "i386")) { return (0) }
1386 -
1387 - if (($id eq "127498") && ($u{osrel} ne "5.8")) { return (0) }
1388 - if (($id eq "127499") && ($u{osrel} ne "5.8")) { return (0) }
1389 -
1390 - if (($id eq "136986") && ($u{osrel} ne "5.8")) { return (0) }
1391 - if (($id eq "136987") && ($u{osrel} ne "5.8")) { return (0) }
1392 - if (($id eq "125950") && ($u{osrel} ne "5.9")) { return (0) }
1393 - if (($id eq "125951") && ($u{osrel} ne "5.9")) { return (0) }
1394 - if (($id eq "125952") && ($u{osrel} ne "5.10")) { return (0) }
1395 - if (($id eq "125953") && ($u{osrel} ne "5.10")) { return (0) }
1396 -
1397 - if (($id eq "121430") && ($p{121430}{crev} ge '16') && (!$pkgs{"SUNWlucfg"})) { return (0) }
1398 - if (($id eq "121431") && ($p{121431}{crev} ge '17') && (!$pkgs{"SUNWlucfg"})) { return (0) }
 1391+ if (($id eq "108834") && (($u{osrel} ne "5.5.1") || ($u{osrel} ne "5.6") || ($u{osrel} ne "5.7"))) { return 0 }
 1392+ if (($id eq "112125") && (($u{osrel} ne "5.6") || ($u{osrel} ne "5.7"))) { return 0 }
 1393+ if (($id eq "112126") && (($u{osrel} ne "5.8") || ($u{osrel} ne "5.9"))) { return 0 }
 1394+ if (($id eq "121430") && ($p{121430}{crev} ge '16') && (!$pkgs{"SUNWlucfg"})) { return 0 }
 1395+ if (($id eq "121431") && ($p{121431}{crev} ge '17') && (!$pkgs{"SUNWlucfg"})) { return 0 }
13991396 if (($id eq "121428") && ($p{121428}{crev} ge '08')) {
1400 - if (!((exists $p{121430}) && ($p{121430}{irev} ge '16'))) { return (0) }
 1397+ if (!((exists $p{121430}) && ($p{121430}{irev} ge '16'))) { return 0 }
14011398 }
14021399 if (($id eq "121429") && ($p{121429}{crev} ge '08')) {
1403 - if (!((exists $p{121431}) && ($p{121431}{irev} ge '16'))) { return (0) }
 1400+ if (!((exists $p{121431}) && ($p{121431}{irev} ge '16'))) { return 0 }
14041401 }
1405 -
1406 - if (($id eq "125276") && ($u{arch} ne "sparc")) { return (0) }
1407 - if (($id eq "125277") && (($u{osrel} ne "5.9") || ($u{arch} ne "i386"))) { return (0) }
1408 - if (($id eq "125278") && (($u{osrel} ne "5.10") || ($u{arch} ne "i386"))) { return (0) }
1409 -
1410 - if (($id eq "123827") && ($u{osrel} ne "5.8")) { return (0) }
1411 - if (($id eq "123828") && ($u{osrel} ne "5.9")) { return (0) }
1412 - if (($id eq "123829") && ($u{osrel} ne "5.10")) { return (0) }
1413 -
1414 - if (($id eq "125760") && ($u{osrel} ne "5.8")) { return (0) }
1415 - if (($id eq "125761") && ($u{osrel} ne "5.9")) { return (0) }
1416 - if (($id eq "125762") && ($u{osrel} ne "5.10")) { return (0) }
1417 -
14181402 if ($id =~ /120971|120972|120973|122803|122804|122805|126507|126508|126506/) {
1419 - if (!($pkgs{"SUNWsamfsr"} || $pkgs{"SUNWsamfsu"})) { return (0) }
 1403+ if (!($pkgs{"SUNWsamfsr"} || $pkgs{"SUNWsamfsu"})) { return 0 }
14201404 }
14211405 if ($id =~ /120974|120975|120976|122806|122807|122808|126511|126512|126510/) {
1422 - if (!($pkgs{"SUNWqfsr"} || $pkgs{"SUNWqfsu"})) { return (0) }
 1406+ if (!($pkgs{"SUNWqfsr"} || $pkgs{"SUNWqfsu"})) { return 0 }
14231407 }
 1408+ if ($id =~ /116338|116339|118383|118384|125698|125699/) {
 1409+ if (!$pkgs{"SUNWxwplt"} || $pkgs{"SUNWxwplt"} !~ "<3.8.1800,REV=0.99.03.23>") { return 0 }
 1410+ }
 1411+ if (($id eq "119381") && ($u{osrel} ne "5.9") && ($u{osrel} ne "5.10")) { return 0 }
 1412+ if (($id eq "119775") && ($minor < 10)) { return 0 }
 1413+ if ($id eq "116831") {
 1414+ if (!($pkga{"SUNWebsc"} && ($pkga{"SUNWebsc"} eq "<sparc>"))) { return 0 }
 1415+ }
 1416+ if ($id eq "116832") {
 1417+ if (!($pkga{"SUNWebsc"} && ($pkga{"SUNWebsc"} eq "<sparcv9>"))) { return 0 }
 1418+ }
 1419+ if (($id eq "110938") && (($u{osrel} ne "5.8") || ($u{osrel} ne "5.9"))) { return 0 }
 1420+ if (($id eq "110973") && (($u{osrel} ne "5.8") || ($u{osrel} ne "5.9"))) { return 0 }
14241421
1425 - if (($id eq "106514") && ($u{arch} ne "sparc")) { return (0) }
1426 - if (($id eq "106515") && ($u{arch} ne "i386")) { return (0) }
1427 - if (($id eq "108049") && ($u{arch} ne "sparc")) { return (0) }
1428 - if (($id eq "108050") && ($u{arch} ne "i386")) { return (0) }
1429 - if (($id eq "108879") && ($u{arch} ne "sparc")) { return (0) }
1430 - if (($id eq "108881") && ($u{arch} ne "i386")) { return (0) }
1431 - if (($id eq "109120") && ($u{arch} ne "sparc")) { return (0) }
1432 - if (($id eq "109121") && ($u{arch} ne "i386")) { return (0) }
1433 - if (($id eq "109413") && ($u{arch} ne "sparc")) { return (0) }
1434 - if (($id eq "109414") && ($u{arch} ne "i386")) { return (0) }
1435 - if (($id eq "117784") && ($u{arch} ne "sparc")) { return (0) }
1436 - if (($id eq "117785") && ($u{arch} ne "i386")) { return (0) }
1437 - if (($id eq "118195") && ($u{arch} ne "sparc")) { return (0) }
1438 - if (($id eq "118196") && ($u{arch} ne "i386")) { return (0) }
1439 - if (($id eq "118263") && ($u{arch} ne "sparc")) { return (0) }
1440 - if (($id eq "118264") && ($u{arch} ne "i386")) { return (0) }
1441 - if (($id eq "118950") && ($u{arch} ne "sparc")) { return (0) }
1442 - if (($id eq "118951") && ($u{arch} ne "i386")) { return (0) }
1443 - if (($id eq "123254") && ($u{arch} ne "sparc")) { return (0) }
1444 - if (($id eq "124590") && ($u{arch} ne "i386")) { return (0) }
1445 -
1446 - if (($id eq "124480") && (($u{osrel} ne "5.9") || ($u{arch} ne "sparc"))) { return (0) }
1447 - if (($id eq "124481") && (($u{osrel} ne "5.10") || ($u{arch} ne "sparc"))) { return (0) }
1448 - if (($id eq "124482") && (($u{osrel} ne "5.10") || ($u{arch} ne "i386"))) { return (0) }
1449 -
1450 - if (($id eq "126356") && ($u{arch} ne "sparc")) { return (0) }
1451 - if (($id eq "126357") && ($u{arch} ne "i386")) { return (0) }
1452 -
1453 - if (($id eq "117429") && ($u{osrel} ne "5.9")) { return (0) }
1454 - if (($id eq "118386") && ($u{osrel} ne "5.6")) { return (0) }
1455 - if (($id eq "118387") && ($u{osrel} ne "5.7")) { return (0) }
1456 - if (($id eq "118388") && ($u{osrel} ne "5.8")) { return (0) }
1457 - if (($id eq "118389") && ($u{osrel} ne "5.9")) { return (0) }
1458 - if (($id eq "118828") && ($u{osrel} ne "5.8")) { return (0) }
1459 - if (($id eq "118829") && ($u{osrel} ne "5.9")) { return (0) }
1460 - if (($id eq "118836") && ($u{osrel} ne "5.6")) { return (0) }
1461 - if (($id eq "118837") && ($u{osrel} ne "5.7")) { return (0) }
1462 - if (($id eq "118838") && ($u{osrel} ne "5.8")) { return (0) }
1463 - if (($id eq "118839") && ($u{osrel} ne "5.9")) { return (0) }
1464 - if (($id eq "118840") && ($u{osrel} ne "5.9")) { return (0) }
1465 - if (($id eq "120376") && ($u{osrel} ne "5.6")) { return (0) }
1466 - if (($id eq "120377") && ($u{osrel} ne "5.7")) { return (0) }
1467 - if (($id eq "120378") && ($u{osrel} ne "5.8")) { return (0) }
1468 - if (($id eq "120379") && ($u{osrel} ne "5.9")) { return (0) }
1469 - if (($id eq "124689") && ($u{osrel} ne "5.8")) { return (0) }
1470 - if (($id eq "124690") && ($u{osrel} ne "5.9")) { return (0) }
1471 -
1472 - if (($id eq "116338") && (!$pkgs{"SUNWxwplt"} || $pkgs{"SUNWxwplt"} !~ "<3.8.1800,REV=0.99.03.23>")) { return (0) }
1473 - if (($id eq "116339") && (!$pkgs{"SUNWxwplt"} || $pkgs{"SUNWxwplt"} !~ "<3.8.1800,REV=0.99.03.23>")) { return (0) }
1474 - if (($id eq "118383") && (!$pkgs{"SUNWxwplt"} || $pkgs{"SUNWxwplt"} !~ "<3.8.1800,REV=0.99.03.23>")) { return (0) }
1475 - if (($id eq "118384") && (!$pkgs{"SUNWxwplt"} || $pkgs{"SUNWxwplt"} !~ "<3.8.1800,REV=0.99.03.23>")) { return (0) }
1476 - if (($id eq "125698") && (!$pkgs{"SUNWxwplt"} || $pkgs{"SUNWxwplt"} !~ "<3.8.1800,REV=0.99.03.23>")) { return (0) }
1477 - if (($id eq "125699") && (!$pkgs{"SUNWxwplt"} || $pkgs{"SUNWxwplt"} !~ "<3.8.1800,REV=0.99.03.23>")) { return (0) }
1478 -
1479 - if (($id eq "111857") && ($u{osrel} ne "5.8")) { return (0) }
1480 - if (($id eq "114176") && ($u{osrel} ne "5.9")) { return (0) }
1481 -
1482 - if (($id eq "119380") && ($u{osrel} ne "5.8")) { return (0) }
1483 - if (($id eq "119381") && ($u{osrel} ne "5.9") && ($u{osrel} ne "5.10")) { return (0) }
1484 -
1485 - if (($id eq "125445") && ($u{osrel} ne "5.9")) { return (0) }
1486 - if (($id eq "125446") && ($u{osrel} ne "5.10")) { return (0) }
1487 -
1488 - if (($id eq "127553") && ($u{arch} ne "sparc")) { return (0) }
1489 - if (($id eq "127554") && ($u{arch} ne "i386")) { return (0) }
1490 -
1491 - if (($id eq "121708") && ($u{osrel} ne "5.8")) { return (0) }
1492 - if (($id eq "121709") && ($u{osrel} ne "5.9")) { return (0) }
1493 - if (($id eq "121710") && ($u{osrel} ne "5.10")) { return (0) }
1494 -
1495 - if (($id eq "125848") && ($u{osrel} ne "5.8")) { return (0) }
1496 - if (($id eq "125849") && ($u{osrel} ne "5.9")) { return (0) }
1497 - if (($id eq "125850") && ($u{osrel} ne "5.10")) { return (0) }
1498 -
1499 - return (1);
 1422+ return 1;
15001423 }
15011424
15021425 sub get_uname {
15031426 # Get information about host
1504 - open(UNAME, $input{uname}) || err ("Can't open $input{uname} ($!)");
 1427+ open(UNAME, $input{uname}) || errx ("Can't open $input{uname} ($!)");
15051428 $_=<UNAME>;
1506 - $_ || err ("Empty uname output");
 1429+ $_ || errx ("Empty uname output");
15071430 chomp;
15081431 close UNAME;
15091432
15101433 ($u{osname}, $u{hostname}, $u{osrel}, $u{osversion}, $u{model}, $u{arch}, $u{platform})= split (/ /, $_);
1511 - ($u{osname} && $u{hostname} && $u{osrel} && $u{osversion} && $u{model} && $u{arch} && $u{platform}) || err ("Can't parse ouput from $input{uname}:\n $_");
 1434+ ($u{osname} && $u{hostname} && $u{osrel} && $u{osversion} && $u{model} && $u{arch} && $u{platform}) || errx ("Can't parse ouput from $input{uname}:\n $_");
15121435 }
15131436
15141437 sub get_installed_packages {
15151438 my $package;
15161439
15171440 # Read pkginfo
1518 - open(PKGINFO, $input{pkginfo}) || err ("Can't open $input{pkginfo} ($!)");
 1441+ open(PKGINFO, $input{pkginfo}) || errx ("Can't open $input{pkginfo} ($!)");
15191442 if ($input{pkginfo} =~ /pkginfo-l.out/) {
15201443 while(<PKGINFO>) {
15211444 if (/\s+PKGINST:\s+(\S+)$/) { $package = $1; }
 1445+ if (/\s+ARCH:\s+(\S+)$/) { $pkga{$package} .= "<$1>"; }
15221446 if (/\s+VERSION:\s+(\S+)$/) { $pkgs{$package} .= "<$1>"; }
15231447 }
15241448 } else {
15251449 while(<PKGINFO>) {
1526 - ($_ =~ /^(\S+) /) || err ("Can't parse output from $input{pkginfo}:\n $_");
 1450+ ($_ =~ /^(\S+) /) || errx ("Can't parse output from $input{pkginfo}:\n $_");
15271451 $package=$1;
15281452 # Removing trailing .2/.3/... (multiple versions of same package)
15291453 $package =~ s/\..*//;
15301454 $_= <PKGINFO>;
1531 - ($_ =~ / (\S+)$/) || err ("Can't parse output from $input{pkginfo}:\n $_");
1532 - $pkgs{$package} .= "<$1>";
 1455+ ($_ =~ /\((\S+)\) (.+)$/) || errx ("Can't parse output from $input{pkginfo}:\n $_");
 1456+ $pkga{$package} .= "<$1>";
 1457+ $pkgs{$package} .= "<$2>";
15331458 }
15341459 }
15351460 close(PKGINFO);
@@ -1537,6 +1462,7 @@
15381463 sub get_installed_patches {
15391464 my $list='';
15401465 my $done=0;
 1466+ my $nonsun=999999;
15411467
15421468 my $showrev_cmd=$showrev; ( -x $showrev_cmd) || ($showrev_cmd='');
15431469 my $patchadd_cmd=$o{patchadd}; ( -x $patchadd_cmd) || ($patchadd_cmd='');
@@ -1547,7 +1473,7 @@
15481474
15491475 if ($o{fromfiles}) {
15501476 dbg ("Reading from $input{showrev}");
1551 - open(SHOWREV, $input{showrev}) || err ("Can't open $input{showrev} ($!)");
 1477+ open(SHOWREV, $input{showrev}) || errx ("Can't open $input{showrev} ($!)");
15521478 $/=""; $list= <SHOWREV>; $/="\n";
15531479 close SHOWREV;
15541480 $done=1;
@@ -1560,40 +1486,14 @@
15611487 if (!$?) { $done=1; last } else { dbg ("Failed: $list") }
15621488 }
15631489 }
1564 - $done || err ("Couldn't get list of installed patches");
 1490+ $done || errx ("Couldn't get list of installed patches");
15651491
15661492 $list || ($list= "No patches are installed\n");
15671493 my @list= split(/\n/, $list);
15681494
15691495 foreach my $i (sort @list) {
1570 - # Known formats of patch IDs:
1571 - # 123456-78 : Regular Sun
1572 - # IDR123456-78 : Unsupported (pre-release) Sun
1573 - # 123-45 : EMC
1574 - # CKPSP123456-78 : Checkpoint
1575 - # CPFWSP410002-01: Checkpoint
1576 - # KDE20060107-01 : KDE
1577 - # IDCE32-02 : DCE
1578 - # DP550001-05 : HP Data Protector
1579 - # DP550011-1 : HP Data Protector
1580 - # PSE400SOL023 : Citrix
1581 - # ME113SB222 : Citrix
1582 - # Q995801-01 : SUNWluxop
1583 - # T000000-01 : Terix DST patch
1584 - if (
1585 - ($i =~ /^Patch:\s+(\d{3,6})-(\d{2}).*/) ||
1586 - ($i =~ /^Patch:\s+IDR(\d{6})-(\d{2}).*/) ||
1587 - ($i =~ /^Patch:\s+CKPSP(\d{6})-(\d{2}).*/) ||
1588 - ($i =~ /^Patch:\s+CPFWSP(\d{6})-(\d{2}).*/) ||
1589 - ($i =~ /^Patch:\s+KDE(\d{8})-(\d{2}).*/) ||
1590 - ($i =~ /^Patch:\s+IDCE(\d{2})-(\d{2}).*/) ||
1591 - ($i =~ /^Patch:\s+DP(\d{6})-(\d{2}).*/) ||
1592 - ($i =~ /^Patch:\s+DP(\d{6})-(\d{1}).*/) ||
1593 - ($i =~ /^Patch:\s+PSE(\d{3})SOL(\d{3}).*/) ||
1594 - ($i =~ /^Patch:\s+ME(\d{3})SB(\d{3}).*/) ||
1595 - ($i =~ /^Patch:\s+Q(\d{6})-(\d{2}).*/) ||
1596 - ($i =~ /^Patch:\s+T(\d{6})-(\d{2}).*/)
1597 - ) {
 1496+ # Sun patches (123456-78, IDR123456-78)
 1497+ if (($i =~ /^Patch:\s+(\d{6})-(\d{2}).*/) || ($i =~ /^Patch:\s+IDR(\d{6})-(\d{2}).*/)) {
15981498 my ($id, $rev)=($1,$2);
15991499 init_patch($id);
16001500 $p{$id}{irev}= $rev;
@@ -1614,6 +1514,11 @@
16151515 }
16161516 }
16171517 next;
 1518+ # Non-Sun patches
 1519+ } elsif ($i =~ /^Patch:\s+(\S+)/) {
 1520+ my $id=$nonsun--;
 1521+ init_patch ($id); $p{$id}{irev}=$p{$id}{crev}="01"; $p{$id}{synopsis}=$1;
 1522+ next;
16181523 }
16191524 next if ($i =~ "No patches are installed");
16201525 next if ($i =~ "No patches installed");
@@ -1627,7 +1532,7 @@
16281533
16291534 return if ($o{nocheckxref});
16301535
1631 - lock_free($o{xrefdir}, "xref", 60) || err ("Another instance of pca is downloading $input{xref} right now");
 1536+ lock_free($o{xrefdir}, "xref", 60) || errx ("Another instance of pca is downloading $input{xref} right now");
16321537
16331538 # Remove possibly left-over size zero file
16341539 if (-z $input{xref}) { unlink ($input{xref}) }
@@ -1652,18 +1557,18 @@
16531558 if (! -w $o{xrefdir}) {
16541559 my $msg="Can't write to xref download directory $o{xrefdir}";
16551560 if ($o{getxref} || (! -f $input{xref})) {
1656 - err ($msg)
 1561+ errx ($msg)
16571562 } else { out ('info', $msg); return }
16581563 }
16591564 # Check if we can write to xref file
16601565 if ((-f $input{xref}) && (! -w $input{xref})) {
16611566 my $msg="Can't write to $input{xref}";
16621567 if ($o{getxref}) {
1663 - err ($msg)
 1568+ errx ($msg)
16641569 } else { out ('info', $msg); return }
16651570 }
16661571
1667 - lock_create($o{xrefdir}, "xref", 1) || err ("Another instance of pca is downloading $input{xref} right now");
 1572+ lock_create($o{xrefdir}, "xref", 1) || errx ("Another instance of pca is downloading $input{xref} right now");
16681573 (-s $input{xref}) && rename ("$input{xref}", "$input{xref}.tmp");
16691574
16701575 if ($o{xrefurl} =~ /^file:/) {
@@ -1702,14 +1607,14 @@
17031608 open (XREF, "<$input{xref}.tmp");
17041609 while (<XREF>) {
17051610 if ($_ =~ /PATCHDIAG TOOL CROSS-REFERENCE FILE AS OF (.*) /) {
1706 - $oage= calculateage ($odate=$1); dbg ("old xref age: $oage"); last;
 1611+ $oage= date2days ($odate=$1); dbg ("old xref age: $oage"); last;
17071612 }
17081613 }
17091614 close XREF;
17101615 open (XREF, "<$input{xref}");
17111616 while (<XREF>) {
17121617 if ($_ =~ /PATCHDIAG TOOL CROSS-REFERENCE FILE AS OF (.*) /) {
1713 - $nage= calculateage ($ndate=$1); dbg ("new xref age: $nage"); last;
 1618+ $nage= date2days ($ndate=$1); dbg ("new xref age: $nage"); last;
17141619 }
17151620 }
17161621 close XREF;
@@ -1737,8 +1642,8 @@
17381643 sub get_current_patches {
17391644 # Read patchdiag.xref
17401645 #
1741 - (-z $input{xref}) && err ("Empty file $input{xref}");
1742 - open(XREF, "<$input{xref}") || err ("Can't open xref file $input{xref} ($!)");
 1646+ (-z $input{xref}) && errx ("Empty file $input{xref}");
 1647+ open(XREF, "<$input{xref}") || errx ("Can't open xref file $input{xref} ($!)");
17431648 while (<XREF>) {
17441649 if ($_ =~ /PATCHDIAG TOOL CROSS-REFERENCE FILE AS OF (.*) /) {
17451650 out ('info', "Using $input{xref} from $1"); last;
@@ -1747,7 +1652,7 @@
17481653 $/=""; my $xref= <XREF>; $/="\n";
17491654 close XREF;
17501655
1751 - if (!$xref) { err ("Corrupt file $input{xref}") }
 1656+ if (!$xref) { errx ("Corrupt file $input{xref}") }
17521657
17531658 my @xref= split( /\n/, $xref );
17541659
@@ -1758,11 +1663,14 @@
17591664 foreach my $i (sort @xref) {
17601665 # Ignore comment lines and HTML tags
17611666 next if (($i =~ /^##/) || ($i =~ /^</));
1762 - if ($i !~ /^\d{6}\|\d{2}\|.*\|.\|.\|.\|..\|.*\|.*\|.*\|.*$/) { err ("Can't parse input from $input{xref}:\n $i") }
 1667+ if ($i !~ /^\d{6}\|\d{2}\|.*\|.\|.\|.\|..\|.*\|.*\|.*\|.*$/) { errx ("Can't parse input from $input{xref}:\n $i") }
17631668
17641669 my ($id, $crev, $reldate, $rFlag, $sFlag, $oFlag, $byFlag, $os,
17651670 $archs, $pkgs, $synopsis )= split( /\|/, $i);
17661671
 1672+ # Fix missing BAD mark
 1673+ ($id eq "114147") && ($byFlag=" B");
 1674+
17671675 init_patch($id);
17681676
17691677 # If an installed patch revision is marked bad, note this.
@@ -1821,6 +1729,8 @@
18221730 # Patch requires are coded into the archs field - separate them.
18231731 $p{$id}{archs}='';
18241732 $p{$id}{requires}='';
 1733+ $archs =~ s/[ ,]/;/; $archs =~ s/sparcv9;/sparc;/; $archs =~ s/x64;/i386;/;
 1734+ $archs =~ s/Solaris;/all;/; $archs =~ s/Sparc;/sparc;/; $archs =~ s/|i86pc;/|i386;/;
18251735 foreach my $r (split /\;/, $archs) {
18261736 if ($r =~ /^\d{6}-\d{2}/) {
18271737 $p{$id}{requires} .= "$r;";
@@ -1867,6 +1777,7 @@
18681778 $p{$id}{ignore}= '';
18691779 $p{$id}{nobackup}= '';
18701780 $p{$id}{reldate}= 'Jan/01/71';
 1781+ $p{$id}{age}= 0;
18711782 $p{$id}{obsoletedby}= '';
18721783 $p{$id}{iobsoletedby}= '';
18731784 $p{$id}{archs}= '';
@@ -1898,7 +1809,7 @@
18991810
19001811 $synopsis= $p{$id}{synopsis};
19011812
1902 - $age=calculateage($p{$id}{reldate});
 1813+ $age=calculateage($id);
19031814 if ($age > 999) { $age=999; }
19041815
19051816 if (!$o{listhtml}) {
@@ -1935,7 +1846,7 @@
19361847 if (!$o{listhtml} && !$o{noheader} && !$o{readme}) {
19371848 print "Host: $u{hostname} ($u{osname} $u{osrel}/$u{osversion}/$u{arch}/$u{model})\n";
19381849 if ($o{root}) { my $r=$o{root}; $r =~ s/-R //; print "Root: $r\n" }
1939 - print "List: @slist\n\n";
 1850+ print "List: @slist (" . int(@plist) . "/$agesum)\n\n";
19401851 (@plist) || return;
19411852
19421853 my $hdr= my $sep=$o{format};
@@ -1959,7 +1870,7 @@
19601871 print "</head>\n<body>\n";
19611872 print "<h2>Host: $u{hostname} ($u{osname} $u{osrel}/$u{osversion}/$u{arch}/$u{model})<br>\n";
19621873 if ($o{root}) { my $r=$o{root}; $r =~ s/-R //; print "Root: $r<br>\n" }
1963 - print "List: @slist</h2>\n<table>\n";
 1874+ print "List: @slist (" . int(@plist) . "/$agesum)</h2>\n<table>\n";
19641875 (@plist) || return;
19651876
19661877 print "<tr><th>Patch</th>";
@@ -2054,7 +1965,7 @@
20551966
20561967 # If we can't write to pca, update won't work.
20571968 if (($o{update} eq 'now') || ($o{update} eq 'auto')) {
2058 - if (! -w $0) { err ("Update option unavailable: Can't write to $0") }
 1969+ if (! -w $0) { errx ("Update option unavailable: Can't write to $0") }
20591970 }
20601971
20611972 if ($o{update} eq 'auto') {
@@ -2073,7 +1984,7 @@
20741985 }
20751986
20761987 my $udir= "$o{tmpdir}/pca." . time() . $$;
2077 - mkdir $udir,0755 || err ("Can't create temporary directory $udir ($!)");
 1988+ mkdir $udir,0755 || errx ("Can't create temporary directory $udir ($!)");
20781989 my $ufile= "$udir/pca";
20791990 dbg ("ufile: $ufile");
20801991
@@ -2088,7 +1999,7 @@
20892000 } else {
20902001 $ret=download('pca', '', 'pcaurl', "", $udir);
20912002 }
2092 - $ret || err ("Could not get pca from $o{pcaurl}");
 2003+ $ret || errx ("Could not get pca from $o{pcaurl}");
20932004
20942005 my $newv;
20952006 open (F, "<$ufile");
@@ -2145,7 +2056,7 @@
21462057
21472058 if (($o{update} eq "auto") && !$updated) { return }
21482059 if ($o{proxy}) { return }
2149 - exit 0;
 2060+ exit $xval;
21502061 }
21512062
21522063 sub out {
@@ -2183,6 +2094,13 @@
21842095 }
21852096
21862097 sub calculateage {
 2098+ my $id=$_[0];
 2099+
 2100+ if (!$p{$id}{age}) { $p{$id}{age}=date2days($p{$id}{reldate}) }
 2101+ return ($p{$id}{age});
 2102+}
 2103+
 2104+sub date2days {
21872105 my ($tmonth, $day, $year)=split(/\//, $_[0]);
21882106 my %months=("Jan",0,"Feb",1,"Mar",2,"Apr",3,"May",4,"Jun",5,"Jul",6,"Aug",7,"Sep",8,"Oct",9,"Nov",10,"Dec",11);
21892107 my $month=$months{$tmonth};
@@ -2197,7 +2115,7 @@
21982116 lock_free ($lockd, $tag, $maxretry) || return (0);
21992117
22002118 unlink "$lockf";
2201 - sysopen (LOCKF, $lockf, O_RDWR|O_CREAT|O_EXCL) || err ("Can't write $lockf ($!)");
 2119+ sysopen (LOCKF, $lockf, O_RDWR|O_CREAT|O_EXCL) || errx ("Can't write $lockf ($!)");
22022120 print LOCKF "$$\n";
22032121 close LOCKF;
22042122 chmod 0666, $lockf;
@@ -2236,17 +2154,21 @@
22372155 }
22382156
22392157 sub log_msg {
2240 - ($o{syslog}) && system("$o{logger} -t pca -p $o{syslog}.info \"@_\"");
 2158+ my $priority=$o{syslog};
 2159+
 2160+ if ($priority eq "none") { return }
 2161+ if ($priority !~ /\./) { $priority .= ".notice" }
 2162+ system("$o{logger} -t pca -p $priority \"@_\"");
22412163 }
22422164
2243 -sub err {
 2165+sub errx {
22442166 out ('error', @_);
22452167 cleanup();
2246 - exit 1;
 2168+ exit ($xval=1);
22472169 }
22482170
22492171 sub handler {
2250 - err ("Caught a SIG@_");
 2172+ errx ("Caught a SIG@_");
22512173 }
22522174
22532175 sub cleanup {
@@ -2311,15 +2233,16 @@
23122234
23132235 # Get defaults from optional configuration file(s)
23142236 my @conf=();
2315 - push (@conf, dirname($0)."/pca.conf");
2316 - push (@conf, dirname($0)."/../etc/pca.conf");
2317 - push (@conf, "/etc/pca.conf");
2318 - $ENV{HOME} && push (@conf, $ENV{HOME}."/.pca");
2319 - push (@conf, "pca.conf");
23202237 if ($o{proxy}) {
23212238 push (@conf, dirname($0)."/../etc/pca-proxy.conf");
23222239 push (@conf, "/etc/pca-proxy.conf");
23232240 push (@conf, "pca-proxy.conf");
 2241+ } else {
 2242+ push (@conf, dirname($0)."/pca.conf");
 2243+ push (@conf, dirname($0)."/../etc/pca.conf");
 2244+ push (@conf, "/etc/pca.conf");
 2245+ $ENV{HOME} && push (@conf, $ENV{HOME}."/.pca");
 2246+ push (@conf, "pca.conf");
23242247 }
23252248 foreach my $i (@conf) { read_cffile ($i) }
23262249
@@ -2341,14 +2264,14 @@
23422265
23432266 # Proxy mode ?
23442267 if ($o{proxy}) {
2345 - if ($#ARGV != 0) { err ("Missing argument") }
 2268+ if ($#ARGV != 0) { errx ("Missing argument") }
23462269 if ($ARGV[0] =~ /:force/) { $ARGV[0] =~ s/:force//; $o{pforce}=1 }
23472270 if ((($ARGV[0] !~ /^patchdiag.xref$/) &&
23482271 ($ARGV[0] !~ /^\d{6}-\d{2}\.(zip|jar|tar|tar\.Z)$/) &&
23492272 ($ARGV[0] !~ /^\d{6}-\d{2}$/) &&
23502273 ($ARGV[0] !~ /^README\.\d{6}-\d{2}$/) &&
23512274 ($ARGV[0] !~ /^pca$/))) {
2352 - err ("Illegal argument");
 2275+ errx ("Illegal argument");
23532276 }
23542277 $o{proxy}=$ARGV[0];
23552278 } else {
@@ -2363,12 +2286,12 @@
23642287 }
23652288 Getopt::Long::config ("bundling", "no_ignore_case");
23662289 $o{cffile}=sub { read_cffile ($_[1]) };
2367 - GetOptions (\%o, @olist) || usage() && exit 1;
 2290+ GetOptions (\%o, @olist) || usage() && exit ($xval=2);
23682291 delete $o{cffile};
23692292 }
2370 - if ($o{help}) { usage(); exit 0 }
2371 - if ($o{man}) { man(); exit 0 }
2372 - if ($o{version}) { version(); exit 0 }
 2293+ if ($o{help}) { usage(); exit $xval }
 2294+ if ($o{man}) { man(); exit $xval }
 2295+ if ($o{version}) { version(); exit $xval }
23732296
23742297 $o{listhtml} && ($o{list}=1);
23752298 $o{pretend} && ($o{install}=1);
@@ -2403,9 +2326,10 @@
24042327 dbg ("ARGV: @ARGV");
24052328 dbg ("Version: $version");
24062329 ($conf_dbg) && dbg ("Config files: $conf_dbg");
 2330+ ($o{debug} && !$o{proxy}) && log_msg ("Running pca $version in debug mode");
24072331
24082332 if ($o{update} !~ /^(never|check|now|auto)$/) {
2409 - err ("Invalid TYPE specified with --update: $o{update}");
 2333+ errx ("Invalid TYPE specified with --update: $o{update}");
24102334 }
24112335 }
24122336
@@ -2416,7 +2340,7 @@
24172341 if ($j =~ /^all$/) { $o{$i}='all'; last }
24182342 if ($j =~ /^(\d{6})$/) { init_patch($1); ($p{$1}{$i}= "00"); next }
24192343 if ($j =~ /^(\d{6})-(\d{2})$/) { init_patch($1); ($p{$1}{$i}= $2); next }
2420 - err ("Invalid patch ID with --$i: $j")
 2344+ errx ("Invalid patch ID with --$i: $j")
24212345 }
24222346 }
24232347 }
@@ -2426,7 +2350,7 @@
24272351 foreach my $j (@{$o{$i}}) {
24282352 #dbg ("$i: $j");
24292353 if ($j =~ /^(\d{6})(-\d{2})*$/) { init_patch($1); ($p{$1}{"${i}f"}= 1); next }
2430 - err ("Invalid patch ID with --$i: $j")
 2354+ errx ("Invalid patch ID with --$i: $j")
24312355 }
24322356 }
24332357 }
@@ -2493,7 +2417,7 @@
24942418
24952419 sub man {
24962420 eval "use Pod::Usage";
2497 - if ($@) { err ('Required module Pod::Usage not found') }
 2421+ if ($@) { errx ('Required module Pod::Usage not found') }
24982422
24992423 # Change uid to something secure as pod2usage does not run as root.
25002424 # This snippet is taken from perldoc. See the comments there.
@@ -2543,8 +2467,9 @@
25442468 Here's some sample output from I<pca -l all>, which shows a list
25452469 of all installed and missing patches:
25462470
 2471+ Using /var/tmp/patchdiag.xref from Feb/29/04
25472472 Host: myhost (SunOS 5.9/Generic_117171-09/sparc/sun4u)
2548 - List: all
 2473+ List: all (7/2182)
25492474
25502475 Patch IR CR RSB Age Synopsis
25512476 ------ -- - -- --- --- --------------------------------------------------
@@ -2556,6 +2481,12 @@
25572482 113477 02 > -- --- 999 NOT FOUND IN CROSS REFERENCE FILE!
25582483 117114 -- < 02 --- 4 CDE 1.5: sdtwebclient patch
25592484
 2485+The header includes some general information about the patchdiag.xref
 2486+file, the host (I<Host:>) and the listed patches (I<List:>). The numbers
 2487+in parantheses are the number of listed patches and the sum of their ages
 2488+in days; when listing missing patches, this is a rough indicator of the
 2489+current patch state.
 2490+
25602491 The first column (I<Patch>) contains the patch number, followed by the
25612492 installed revision (I<IR>) and the current revision
25622493 (I<CR>), with one of E<lt>, E<gt>, or = between
@@ -2587,7 +2518,7 @@
25882519
25892520 =head1 OPTIONS
25902521
2591 -=over 5
 2522+=over
25922523
25932524 =item -l, --list
25942525
@@ -2741,8 +2672,11 @@
27422673
27432674 =item --syslog=TYPE
27442675
2745 -Syslog facility (eg. user or local0) to log successful patch
2746 -installs to.
 2676+Syslog priority to log patch installs to. The default is
 2677+I<daemon.notice> which gets logged to I</var/adm/messages>. Specify
 2678+facility and severity (e.g. I<local7.info>) or a facility only
 2679+(e.g. I<local7>, the default severity is I<notice>). Use I<none> to
 2680+disable logging to syslog.
27472681
27482682 =item -k, --nobackup=ID
27492683
@@ -2944,7 +2878,7 @@
29452879 and I<pca.conf> in the current
29462880 directory, in this order. In proxy mode the files I<../etc/pca-proxy.conf>,
29472881 I</etc/pca-proxy.conf> and
2948 -I<pca-proxy.conf> in the current directory are read, too.
 2882+I<pca-proxy.conf> in the current directory are read instead.
29492883 Options are set by specifying
29502884 I<option=value> in the file. Example: To set the path of the wget command,
29512885 use I<wget=/opt/bin/wget>. To enable debug output, use
@@ -3121,6 +3055,7 @@
31223056 If the apache2 server is not running yet, create I</etc/apache2/httpd.conf>
31233057 and enable the server with I<svcadm>:
31243058
 3059+ # cp /etc/apache2/httpd.conf-example /etc/apache2/httpd.conf
31253060 # svcadm enable svc:/network/http:apache2
31263061
31273062 Test the caching proxy on a client:
@@ -3345,17 +3280,13 @@
33463281 as options; see CONFIGURATION for details. Furthermore, these environment
33473282 variables are used by pca:
33483283
3349 -=over 5
 3284+=over
33503285
33513286 =item PAGER
33523287
33533288 Path to the command which is used to display patch README
33543289 files
33553290
3356 -=back
3357 -
3358 -=over 5
3359 -
33603291 =item TMPDIR
33613292
33623293 During patch installation, patches are extracted under this
@@ -3363,6 +3294,22 @@
33643295
33653296 =back
33663297
 3298+=head1 EXIT STATUS
 3299+
 3300+The following exit values are returned:
 3301+
 3302+ 0 No error
 3303+
 3304+ 1 Unknown error
 3305+
 3306+ 2 Usage error
 3307+
 3308+ 3 Reboot required to continue patch installation
 3309+
 3310+ 4 Reboot required
 3311+
 3312+ 5 Reboot recommended
 3313+
33673314 =head1 AUTHORS
33683315
33693316 Martin Paul E<lt>martin@par.univie.ac.atE<gt>
@@ -3420,23 +3367,20 @@
34213368 Jan Holzhueter, Liam Carey, Alex Docauer, Christopher S. Chan, Philip Kime,
34223369 Michael Schmarck, Kevin L. Bliss, Thomas Bleek, Albert White, Ron Helzer,
34233370 Sergei Haramundanis, Steven M. Christensen, Felix Schattschneider,
3424 -Rajiv G Gunja, Jeremy Simpson, Jesse Caldwell, Amy Rich.
 3371+Rajiv G Gunja, Jeremy Simpson, Jesse Caldwell, Amy Rich, Jens Elkner,
 3372+Stephen Matich, Justus J. Addiss, Fred Chagnon, David French, Don O'Malley.
34253373
34263374 =head1 MAILING LISTS
34273375
34283376 Two mailing lists are available:
34293377
3430 -=over 5
 3378+=over
34313379
34323380 =item pca-news
34333381
34343382 This is a one-way list for announcements of new versions and news.
34353383 To join, send an empty message to E<lt>pca-news-join@lists.univie.ac.atE<gt>.
34363384
3437 -=back
3438 -
3439 -=over 5
3440 -
34413385 =item pca
34423386
34433387 This is a discussion and support list. Messages from pca-news will be
@@ -3449,7 +3393,7 @@
34503394
34513395 =head1 SEE ALSO
34523396
3453 -=over 5
 3397+=over
34543398
34553399 =item pca web site:
34563400
@@ -3459,14 +3403,46 @@
34603404
34613405 =head1 CHANGES
34623406
3463 -=head2 Version 20080911-01
 3407+=head2 Version 20081218-01
34643408
3465 - * Remove check for patches which are only partly installed
 3409+ * Enable syslog messages to daemon.notice by default
 3410+ * Enhance possible values for syslog option
 3411+ * Log sample message to syslog in debug mode
 3412+ * New generic handling of unknown, non-Sun patches
 3413+ * Documentation: Add cp command in local server setup example
 3414+ * Rename internal function err() to avoid keyword clash with recent perl
 3415+ * Mark patch 114147 as BAD
 3416+ * Whitelist: add 137137, 137138, 121308, 121309, 138270
 3417+ * Whitelist: remove obsolete patch
 3418+ * Apply check: add 110936, 110937, 110938, 110971, 110972, 110973
 3419+ * Apply check: add 118386, 118387, 118388, 118389
 3420+ * Apply check: add 118828, 118829
 3421+ * Apply check: add 118836, 118837, 118838, 118839
 3422+ * Apply check: add 127680, 127681, 127682, 127683, 127684
 3423+ * Apply check: add 138550, 138551, 138552, 138553, 138554
 3424+ * Update list of contributors
34663425
3467 -=head2 Version 20080909-02
 3426+=head2 Version 20081024-01
34683427
3469 - * False positive with partly installed patches: add 120011, 127127
 3428+ * Read only pca-proxy.conf (not pca.conf) in proxy mode
 3429+ * Provide more detailed exit status
 3430+ * Include patch count and sum of patch ages in header
 3431+ * Fix handling of downloaded files that are too short
 3432+ * Check whether patch already exists before announcing download
 3433+ * Fix handling of PTF/ACSLS patches
 3434+ * Read architecture information from pkginfo output
 3435+ * Accept wrong entries in the arch column in patchdiag.xref
 3436+ * Handle special characters in package version string
 3437+ * Fix erroneous behaviour with checking for patch existance
 3438+ * Simplify internal handling of extra patch requirements
 3439+ * Calculate patch age only once
 3440+ * Apply check: add 116413, 119775, 116831, 116832
 3441+ * Update list of contributors
34703442
 3443+=head2 Version 20080911-01
 3444+
 3445+ * Remove check for patches which are only partly installed
 3446+
34713447 =head2 Version 20080909-01
34723448
34733449 * Check for patches which are only partly installed

Status & tagging log