OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src openpkg-web          Date:   27-Jan-2004 14:19:12
  Branch: HEAD                             Handle: 2004012713191001

  Modified files:
    openpkg-src/perl-openpkg
                            perl-openpkg.pl perl-openpkg.spec
    openpkg-web             news.txt

  Log:
    cleanup even more and be more flexible

  Summary:
    Revision    Changes     Path
    1.4         +43 -23     openpkg-src/perl-openpkg/perl-openpkg.pl
    1.11        +2  -2      openpkg-src/perl-openpkg/perl-openpkg.spec
    1.8328      +1  -0      openpkg-web/news.txt
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/perl-openpkg/perl-openpkg.pl
  ============================================================================
  $ cvs diff -u -r1.3 -r1.4 perl-openpkg.pl
  --- openpkg-src/perl-openpkg/perl-openpkg.pl  26 Jan 2004 20:35:00 -0000      1.3
  +++ openpkg-src/perl-openpkg/perl-openpkg.pl  27 Jan 2004 13:19:11 -0000      1.4
  @@ -49,7 +49,8 @@
       perl_schema    => "vendor",
       perl_args      => [],
       perl_stdin     => "/dev/null",
  -    rpm_files      => "-",
  +    files_file     => "-",
  +    files_unquoted => 0,
       prog_rpm       => '%path_prefix%/bin/rpm',
       prog_perl      => '%path_prefix%/bin/perl',
       mode_quiet     => 0,
  @@ -133,7 +134,8 @@
       's|schema=s'    => \$CF->{perl_schema},
       'A|args=s'      => [EMAIL PROTECTED]>{perl_args}},
       'I|stdin=s'     => \$CF->{perl_stdin},
  -    'F|files=s'     => \$CF->{rpm_files},
  +    'F|files=s'     => \$CF->{files_file},
  +    'U|unquoted'    => \$CF->{files_unquoted},
       'n|pkgname=s'   => \$CF->{pkg_name},
       'q|quiet'       => \$CF->{mode_quiet},
       'v|verbose'     => \$CF->{mode_verbose},
  @@ -157,6 +159,7 @@
             " -A, --args <arguments>       Perl Makefile.PL passed through 
arguments\n" .
             " -I, --stdin <file-path>      filesystem path to connect to stdin\n" .
             " -F, --files <file-path>      filesystem path to write RPM \%files list 
to\n" .
  +          " -U, --unquoted               output RPM \%files list in unquoted 
format\n" .
             " -n, --pkgname <package-name> name of involved RPM package\n" .
             "\n" .
             " -q, --quiet                  operate in quiet   run-time mode\n" .
  @@ -417,34 +420,44 @@
       &runcmd("find $libdir -type d -depth -print | (xargs rmdir >/dev/null 2>&1 || 
true)");
   
       #   determine RPM installation file list
  -    my $files = '';
  -    $files .= '"%not %dir '.$CF->{path_prefix}.'"'."\n";
  -    $files .= '"%not %dir '.$CF->{path_prefix}.'/lib/perl"'."\n" if 
($CF->{path_libdir} eq '');
  -    $files .= '"%not %dir '.$CF->{path_libdir}.'"'."\n" if ($CF->{path_libdir} ne 
'');
  -    $files .= '"%not %dir '.$pcfg->{installarchlib}.'"'."\n";
  -    $files .= '"%not %dir '.$pcfg->{installarchlib}.'/auto'.'"'."\n";
  -    $files .= '"%not %dir '.$pcfg->{installprivlib}.'"'."\n";
  -    $files .= '"%not %dir '.$pcfg->{installprivlib}.'/auto'.'"'."\n";
  -    $files .= '"%not %dir '.$pcfg->{sitelib_stem}.'"'."\n";
  -    $files .= '"%not %dir '.$pcfg->{installsitearch}.'"'."\n";
  -    $files .= '"%not %dir '.$pcfg->{installsitearch}.'/auto'.'"'."\n";
  -    $files .= '"%not %dir '.$pcfg->{installsitelib}.'"'."\n";
  -    $files .= '"%not %dir '.$pcfg->{installsitelib}.'/auto'.'"'."\n";
  -    $files .= '"%not %dir '.$pcfg->{vendorlib_stem}.'"'."\n";
  -    $files .= '"%not %dir '.$pcfg->{installvendorarch}.'"'."\n";
  -    $files .= '"%not %dir '.$pcfg->{installvendorarch}.'/auto'.'"'."\n";
  -    $files .= '"%not %dir '.$pcfg->{installvendorlib}.'"'."\n";
  -    $files .= '"%not %dir '.$pcfg->{installvendorlib}.'/auto'.'"'."\n";
  +    my @files = ();
  +    if ($CF->{path_libdir} ne '') {
  +        push(@files, '%not %dir '.$CF->{path_libdir});
  +    }
  +    else {
  +        push(@files, '%not %dir '.$CF->{path_prefix}.'/lib/perl');
  +    }
  +    push(@files, '%not %dir '.$pcfg->{installarchlib}.'/auto');
  +    push(@files, '%not %dir '.$pcfg->{installarchlib});
  +    push(@files, '%not %dir '.$pcfg->{installprivlib}.'/auto');
  +    push(@files, '%not %dir '.$pcfg->{installprivlib});
  +    push(@files, '%not %dir '.$pcfg->{sitelib_stem});
  +    push(@files, '%not %dir '.$pcfg->{installsitearch}.'/auto');
  +    push(@files, '%not %dir '.$pcfg->{installsitearch});
  +    push(@files, '%not %dir '.$pcfg->{installsitelib}.'/auto');
  +    push(@files, '%not %dir '.$pcfg->{installsitelib});
  +    push(@files, '%not %dir '.$pcfg->{vendorlib_stem});
  +    push(@files, '%not %dir '.$pcfg->{installvendorarch}.'/auto');
  +    push(@files, '%not %dir '.$pcfg->{installvendorarch});
  +    push(@files, '%not %dir '.$pcfg->{installvendorlib}.'/auto');
  +    push(@files, '%not %dir '.$pcfg->{installvendorlib});
   
  +    #   output RPM installation file list
       my $out;
  -    if ($CF->{rpm_files} eq "-") {
  +    if ($CF->{files_file} eq "-") {
           $out = new IO::Handle;
           $out->fdopen(fileno(STDOUT), "w");
       }
       else {
  -        $out = new IO::File ">$CF->{rpm_files}";
  +        $out = new IO::File ">$CF->{files_file}";
  +    }
  +    if ($CF->{files_unquoted}) {
  +        print $out join("\n", @files) . "\n";
       }
  -    print $out $files;
  +    else {
  +        print $out '"'. join('"'."\n".'"', @files).'"'."\n";
  +    }
  +    $out->close();
   }
   
   #   ==== STEP: 6. cleanup ====
  @@ -487,6 +500,7 @@
   [B<-A>|B<--args> I<arguments>]
   [B<-I>|B<--stdin> I<file-path>]
   [B<-F>|B<--files> I<file-path>]
  +[B<-U>|B<--unquoted>]
   [B<-n>|B<--pkgname> I<name>]
   [B<-q>|B<--quiet>]
   [B<-v>|B<--verbose>]
  @@ -582,6 +596,12 @@
   Filesystem path to write the RPM C<%files> entries to describing the
   packaging list of all installed files. The default is "C<->" meaning
   that the list is written to F<stdout>.
  +
  +=item B<-U>, B<--unquoted>
  +
  +By default the RPM <%files> list is written with each path entry
  +enclosed in quotation marks. For raw post-processing, this option allows
  +the list to be written without enclosing quotation marks.
   
   =item B<-n>, B<--pkgname> I<name>
   
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/perl-openpkg/perl-openpkg.spec
  ============================================================================
  $ cvs diff -u -r1.10 -r1.11 perl-openpkg.spec
  --- openpkg-src/perl-openpkg/perl-openpkg.spec        26 Jan 2004 19:14:32 -0000     
 1.10
  +++ openpkg-src/perl-openpkg/perl-openpkg.spec        27 Jan 2004 13:19:11 -0000     
 1.11
  @@ -32,8 +32,8 @@
   Distribution: OpenPKG [BASE]
   Group:        Language
   License:      PD
  -Version:      20040126
  -Release:      20040126
  +Version:      20040127
  +Release:      20040127
   
   #   list of sources
   Source0:      perl-openpkg.pl
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-web/news.txt
  ============================================================================
  $ cvs diff -u -r1.8327 -r1.8328 news.txt
  --- openpkg-web/news.txt      27 Jan 2004 12:37:54 -0000      1.8327
  +++ openpkg-web/news.txt      27 Jan 2004 13:19:10 -0000      1.8328
  @@ -1,3 +1,4 @@
  +27-Jan-2004: Upgraded package: P<perl-openpkg-20040127-20040127>
   27-Jan-2004: Upgraded package: P<sav-2.18+3.78-20040127>
   27-Jan-2004: Upgraded package: P<apache-1.3.29-20040127>
   27-Jan-2004: Upgraded package: P<bochs-2.1-20040127>
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to