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

  Server: cvs.openpkg.org                  Name:   Michael van Elst
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src openpkg-web          Date:   08-Jan-2003 16:12:39
  Branch: HEAD                             Handle: 2003010815123701

  Modified files:
    openpkg-src/openpkg-tool
                            openpkg-build.pl openpkg-index.pl
                            openpkg-tool.spec
    openpkg-web             news.txt

  Log:
    support NoSource for private packages

  Summary:
    Revision    Changes     Path
    1.26        +32 -10     openpkg-src/openpkg-tool/openpkg-build.pl
    1.8         +14 -4      openpkg-src/openpkg-tool/openpkg-index.pl
    1.19        +2  -2      openpkg-src/openpkg-tool/openpkg-tool.spec
    1.2604      +1  -0      openpkg-web/news.txt
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/openpkg-tool/openpkg-build.pl
  ============================================================================
  $ cvs diff -u -r1.25 -r1.26 openpkg-build.pl
  --- openpkg-src/openpkg-tool/openpkg-build.pl 3 Jan 2003 13:47:40 -0000       1.25
  +++ openpkg-src/openpkg-tool/openpkg-build.pl 8 Jan 2003 15:12:38 -0000       1.26
  @@ -542,7 +542,7 @@
           my($name,$version);
           my($href,$release,$desc);
           my(@prereq,@bprereq);
  -        my(@provides,@conflicts);
  +        my(@provides,@conflicts,@source,@nosource);
           my(%options);
           my($platform,$prefix);
           my($rec);
  @@ -566,6 +566,8 @@
                   @bprereq   = ();
                   @provides  = ();
                   @conflicts = ();
  +                @source    = ();
  +                @nosource  = ();
               }
   
               if (!(defined $href) && /<Repository.*?href="([^"]*)"/) {
  @@ -610,6 +612,14 @@
                   $section = 'conflicts' if $useit;
               } elsif ($tag eq '/Conflicts') {
                   $section = undef;
  +            } elsif ($tag eq 'NoSource') {
  +                $section = 'nosource' if $useit;
  +            } elsif ($tag eq '/NoSource') {
  +                $section = undef;
  +            } elsif ($tag eq 'Source') {
  +                $section = 'nosource' if $useit;
  +            } elsif ($tag eq '/Source') {
  +                $section = undef;
               } elsif ($tag eq 'Name') {
                   $name = $body;
               } elsif ($tag eq 'Version') {
  @@ -629,6 +639,10 @@
                       push(@provides, $body);
                   } elsif ($section eq 'conflicts') {
                       push(@conflicts, $body);
  +                } elsif ($section eq 'source') {
  +                    push(@source, $body);
  +                } elsif ($section eq 'nosource') {
  +                    push(@nosource, $body);
                   }
               } elsif ($tag eq '/rdf:Description') {
   
  @@ -661,6 +675,8 @@
                           depends   => [ @bprereq ],
                           keeps     => [ @prereq ],
                           conflicts => [ @conflicts ],
  +                        nosource  => [ @source ],
  +                        nosource  => [ @nosource ],
                           desc      => $desc,
                           platform  => $platform,
                           prefix    => $prefix
  @@ -720,16 +736,18 @@
               }
   
               $rec = {
  -                href     => (relurl($url, undef, $href))[0],
  -                name     => $name,
  -                version  => $version,
  -                release  => $release,
  -                platform => xel($_->{'Platform'}),
  -                prefix   => xel($_->{'Prefixes'}),
  -                depends  => with_list($_->{'BuildPreReq'}, $with),
  -                keeps    => with_list($_->{'PreReq'}, $with),
  +                href      => (relurl($url, undef, $href))[0],
  +                name      => $name,
  +                version   => $version,
  +                release   => $release,
  +                platform  => xel($_->{'Platform'}),
  +                prefix    => xel($_->{'Prefixes'}),
  +                depends   => with_list($_->{'BuildPreReq'}, $with),
  +                keeps     => with_list($_->{'PreReq'}, $with),
                   conflicts => with_list($_->{'Conflicts'}, $with),
  -                desc     => xel($_->{'Description'})
  +                source    => with_list($_->{'Source'}, $with),
  +                nosource  => with_list($_->{'NoSource'}, $with),
  +                desc      => xel($_->{'Description'})
               };
   
               $rec->{OPTIONS} =
  @@ -1162,6 +1180,10 @@
   
       print "# adding ".vsn($target)." to list\n";
       push(@$list, $target);
  +
  +    foreach (@{$target->{nosource}}) {
  +        print "# ATTENTION: unpackaged source '$target->{source}->[$_]'\n";
  +    }
   
       return if $conflict;
   
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/openpkg-tool/openpkg-index.pl
  ============================================================================
  $ cvs diff -u -r1.7 -r1.8 openpkg-index.pl
  --- openpkg-src/openpkg-tool/openpkg-index.pl 3 Jan 2003 13:47:40 -0000       1.7
  +++ openpkg-src/openpkg-tool/openpkg-index.pl 8 Jan 2003 15:12:38 -0000       1.8
  @@ -71,7 +71,7 @@
   sub commasep ($$) {
       my($k,$v) = @_;
   
  -    if ($k =~ /^(PreReq|BuildPreReq|Provides|Conflicts)$/) {
  +    if ($k =~ /^(PreReq|BuildPreReq|Provides|Conflicts|NoSource)$/) {
           return split(/\s*,\s*/, $v);
       }
   
  @@ -295,8 +295,13 @@
                   warn "ERROR: no package name set for option $1 = $2\n";
               }
   
  -        } elsif ($v =~ /^\s*([^\#]\S*)\s*:\s*(.*?)\s*$/) {
  +        } elsif ($v =~ /^\#NoSource\s*(.*?)\s*$/) {
  +         #
  +         # store conditional NoSource attribute
  +         #
  +            push @{$attr{'NoSource'}->{$cond}}, commasep('NoSource',$1);
   
  +        } elsif ($v =~ /^\s*([^\#]\S*)\s*:\s*(.*?)\s*$/) {
               #
               # store attribute=value for current condition
               #
  @@ -327,7 +332,7 @@
       $s =~ s/^\s*#.*?\n//mg;
   
       # map commands
  -    $s =~ s/^%(ifdef|ifndef|if|option|define|else|endif|\{)/#$1/mg;
  +    $s =~ s/^%(ifdef|ifndef|if|NoSource|option|define|else|endif|\{)/#$1/mg;
   
       # split sections
       foreach (split(/^(?=%\w+\s*\n)/m, $s)) {
  @@ -487,7 +492,11 @@
   
           # guess location from Information in Specfile
   
  -        $href = "$about.src.rpm";
  +        if (exists $a->{'NoSource'}) {
  +            $href = "$about.nosrc.rpm";
  +        } else {
  +            $href = "$about.src.rpm";
  +        }
           ($maj,$min,$rel) = n($a,'Release') =~ /^(\d+)\.(\d+)\.(\d+)/;
   
           if (defined $min) {
  @@ -568,6 +577,7 @@
           xml_bag(6, $a, 'Provides'),
           xml_bag(6, $a, 'Conflicts'),
           xml_bag(6, $a, 'Source'),
  +        xml_bag(6, $a, 'NoSource'),
           xml_bag(6, $a, 'Filenames'),
           xml_text(6, $a, 'Description');
   
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/openpkg-tool/openpkg-tool.spec
  ============================================================================
  $ cvs diff -u -r1.18 -r1.19 openpkg-tool.spec
  --- openpkg-src/openpkg-tool/openpkg-tool.spec        3 Jan 2003 10:53:42 -0000      
 1.18
  +++ openpkg-src/openpkg-tool/openpkg-tool.spec        8 Jan 2003 15:12:38 -0000      
 1.19
  @@ -32,8 +32,8 @@
   Distribution: OpenPKG [EVAL]
   Group:        Bootstrapping
   License:      GPL
  -Version:      20030103
  -Release:      20030103
  +Version:      20030108
  +Release:      20030108
   
   #   list of sources
   Source0:      openpkg.sh
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-web/news.txt
  ============================================================================
  $ cvs diff -u -r1.2603 -r1.2604 news.txt
  --- openpkg-web/news.txt      8 Jan 2003 15:12:29 -0000       1.2603
  +++ openpkg-web/news.txt      8 Jan 2003 15:12:37 -0000       1.2604
  @@ -1,3 +1,4 @@
  +08-Jan-2003: Upgraded package: P<openpkg-tool-20030108-20030108>
   08-Jan-2003: Upgraded package: P<ant-1.5.1-20030108>
   08-Jan-2003: Upgraded package: P<j2se14-1.4.1.01-20030108>
   08-Jan-2003: Upgraded package: P<chkrootkit-0.38-20030108>
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to