perl.prov patch (#43081).
authorjbj <devnull@localhost>
Fri, 1 Jun 2001 20:26:24 +0000 (20:26 +0000)
committerjbj <devnull@localhost>
Fri, 1 Jun 2001 20:26:24 +0000 (20:26 +0000)
CVS patchset: 4827
CVS date: 2001/06/01 20:26:24

rpm.spec.in
scripts/perl.prov

index 233d675..7f830b0 100644 (file)
@@ -227,10 +227,10 @@ fi
 %attr(0755, @RPMUSER@, @RPMGROUP@)     /bin/rpm
 
 %ifos linux
-%config(missingok)     /etc/cron.daily/rpm
-%config(missingok)     /etc/logrotate.d/rpm
-%dir                   /etc/rpm
-%config(missingok)     /etc/rpm/macros.db1
+%config(noreplace,missingok)   /etc/cron.daily/rpm
+%config(noreplace,missingok)   /etc/logrotate.d/rpm
+%dir                           /etc/rpm
+%config(noreplace,missingok)   /etc/rpm/macros.db1
 %attr(0755, @RPMUSER@, @RPMGROUP@)     %dir /var/lib/rpm
 %attr(0755, @RPMUSER@, @RPMGROUP@)     %ghost /var/lib/rpm/Basenames
 %attr(0755, @RPMUSER@, @RPMGROUP@)     %ghost /var/lib/rpm/Conflictname
index 1dc6a62..254d631 100755 (executable)
@@ -84,7 +84,7 @@ sub process_file {
   
   open(FILE, "<$file") || return;
 
-  my ($package, $version) = ();
+  my ($package, $version, $incomment, $inover) = ();
 
   while (<FILE>) {
     
@@ -94,12 +94,24 @@ sub process_file {
     # properly belongs in the over/back section) but people do not
     # read the perldoc.
 
-    if ( (m/^=(head1|head2|pod|item)/) .. (m/^=(cut)/) ) {
-      next;
+    if (m/^=(head1|head2|pod|item)/) {
+      $incomment = 1;
+    }
+
+    if (m/^=(cut)/) {
+      $incomment = 0;
     }
     
-    if ( (m/^=(over)/) .. (m/^=(back)/) ) {
-      next;
+    if (m/^=(over)/) {
+      $inover = 1;
+    }
+
+    if (m/^=(back)/) {
+      $inover = 0;
+    }
+
+    if ($incomment || $inover) {
+       next;
     }
     
     # skip the data section
@@ -123,9 +135,9 @@ sub process_file {
 
     # here are examples of VERSION lines from the perl distribution
 
-    #FindBin.pm:$VERSION = $VERSION = sprintf("%d.%02d", q$Revision: 1.4 $ =~ /(\d+)\.(\d+)/);
-    #ExtUtils/Install.pm:$VERSION = substr q$Revision: 1.4 $, 10;
-    #CGI/Apache.pm:$VERSION = (qw$Revision: 1.4 $)[1];
+    #FindBin.pm:$VERSION = $VERSION = sprintf("%d.%02d", q$Revision: 1.5 $ =~ /(\d+)\.(\d+)/);
+    #ExtUtils/Install.pm:$VERSION = substr q$Revision: 1.5 $, 10;
+    #CGI/Apache.pm:$VERSION = (qw$Revision: 1.5 $)[1];
     #DynaLoader.pm:$VERSION = $VERSION = "1.03";     # avoid typo warning
 
     if (