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:   30-Jun-2003 21:36:08
  Branch: HEAD                             Handle: 2003063020360601

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

  Log:
    fix revdep search

  Summary:
    Revision    Changes     Path
    1.89        +31 -18     openpkg-src/openpkg-tool/openpkg-build.pl
    1.62        +2  -2      openpkg-src/openpkg-tool/openpkg-tool.spec
    1.5112      +1  -0      openpkg-web/news.txt
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/openpkg-tool/openpkg-build.pl
  ============================================================================
  $ cvs diff -u -r1.88 -r1.89 openpkg-build.pl
  --- openpkg-src/openpkg-tool/openpkg-build.pl 26 Jun 2003 12:48:44 -0000      1.88
  +++ openpkg-src/openpkg-tool/openpkg-build.pl 30 Jun 2003 19:36:07 -0000      1.89
  @@ -520,14 +520,15 @@
       my($env, $i) = @_;
       my($r) = $env->{'repository'};
       my($pkg, %dep, %dlist, %rev);
  -    my(@vers,$t,$t1,$with,$name);
  -    my($d,$k,%d,$old,%name);
  +    my(@vers,$t,$t1,$t2,$with,$name,$vmap);
  +    my($d,$k,%d,$old,%name,%pkg);
   
       print "# computing reverse dependencies\n";
   
       foreach $pkg (keys %$i) {
   
  -        unless ($r->{$pkg}) {
  +        $vmap = $r->{$pkg};
  +        unless ($vmap) {
               print "# ATTENTION: $pkg has no upgrade path\n";
               next;
           }
  @@ -546,17 +547,25 @@
                   $k = target_attribute($t, $env, 'keeps', $with);
                   next unless @$d || @$k;
                   %d = unique_map($d,$k);
  +                # resolve package
  +                unless (exists $pkg{$pkg}) {
  +                    ($t2,$old) = dep2target({ name => $pkg }, $env);
  +                    $t2 = undef if $old;
  +                    $pkg{$pkg} = undef;
  +                }
  +                $t2 = $pkg{$pkg};
  +                next unless $t2;
                   foreach (keys %d) {
                       next if $_ eq 'OpenPKG';
                       # resolve target
  -                    unless ($name{$_}) {
  +                    unless (exists $name{$_}) {
                           ($t1,$old) = dep2target($d{$_}, $env);
                           $name{$_} = $t1 ? $t1->{name} : $_;
                       }
                       $name = $name{$_};
                       unless ($dep{$name}{$t->{name}}) {
                           $dep{$name}{$t->{name}} = 1;
  -                        push @{$dlist{$name}}, $t;
  +                        push @{$dlist{$name}}, $t2;
                       }
                   }
               }
  @@ -1714,10 +1723,6 @@
       # see if a target is already installed and requires a rebuild
       #
       if ($t = find_target($target->{name}, $env->{installed})) {
  -        if (!exists $env->{repository}->{$target->{name}}) {
  -            print "# excluding $target->{name} (no upgrade path)\n";
  -            return;
  -        }
           if (exists $env->{exclude}->{$target->{name}}) {
               print "# excluding $target->{name} (no upgrade allowed)\n";
               return;
  @@ -1787,13 +1792,9 @@
                       if ($t->{LIMBO}) {
                           print "# ATTENTION: ".vsn($t)." is in LIMBO\n";
                       }
  -                } elsif ($k{$_}) {
  -                    push @$blist,$t;
  -                    print "# $target->{name} installs ".vsn($t)." for $_\n";
  -                } else {
  -                    print "# $target->{name} requires ".vsn($t)." for $_\n";
  +                    next;
                   }
  -
  +                
                   unless (depend_option($t, $d{$_}, $env)) {
                       print "# $target->{name} has conflicting requirement\n";
                       push(@{$env->{fatal}},vsn($target));
  @@ -1803,6 +1804,13 @@
                       next;
                   }
   
  +                if ($k{$_}) {
  +                    push @$blist,$t;
  +                    print "# $target->{name} installs ".vsn($t)." for $_\n";
  +                } else {
  +                    print "# $target->{name} requires ".vsn($t)." for $_\n";
  +                }
  +
                   push @deps, $t;
               } else {
                   print "# $target->{name} searches a frood called '$_'\n";
  @@ -1824,19 +1832,21 @@
       $target->{WHO} = $who;
       $target->{WHY} = $target->{STATUS};
       push(@$list, $target);
  -    $target->{LIMBO} = 0;
  -     
  +
       # remember new options
       override_options(get_with($target),
                        name_with($target->{name}, $env->{with}),
                        '');
   
  +    # moan about non-source packages
       foreach (@{target_nosource($target,$env)}) {
           my($p) = target_source($target,$env)->[$_];
           $p =~ s/.*\///;
           print "# ATTENTION: unpackaged source $_: $p\n";
       }
   
  +    $target->{LIMBO} = 0;
  +
       #
       # a dependency could not be resolved, don't bother with reverse
       # dependencies for this target
  @@ -1946,7 +1956,7 @@
           if ($t) {
               warn_about_options($t, $env->{with}, $env->{config});
               $t->{GOAL} = 1;
  -            push(@goals, $t);
  +            push @goals, $t;
           } else {
               if ($env->{status}) {
                   print "# dropping goal '$name'\n";
  @@ -2142,6 +2152,9 @@
   
       foreach (@$list) {
           $spkg = $_->{href};
  +        unless ($spkg =~ /\S/) {
  +            die "FATAL: internal error, ",vsn($_)," without source URL\n";
  +        }
           $bpkg = target2rpm($_, $c);
   
        $mywith = 
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/openpkg-tool/openpkg-tool.spec
  ============================================================================
  $ cvs diff -u -r1.61 -r1.62 openpkg-tool.spec
  --- openpkg-src/openpkg-tool/openpkg-tool.spec        26 Jun 2003 11:00:38 -0000     
 1.61
  +++ openpkg-src/openpkg-tool/openpkg-tool.spec        30 Jun 2003 19:36:07 -0000     
 1.62
  @@ -32,8 +32,8 @@
   Distribution: OpenPKG [PLUS]
   Group:        Bootstrapping
   License:      GPL
  -Version:      20030626
  -Release:      20030626
  +Version:      20030630
  +Release:      20030630
   
   #   list of sources
   Source0:      openpkg.sh
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-web/news.txt
  ============================================================================
  $ cvs diff -u -r1.5111 -r1.5112 news.txt
  --- openpkg-web/news.txt      30 Jun 2003 18:16:05 -0000      1.5111
  +++ openpkg-web/news.txt      30 Jun 2003 19:36:06 -0000      1.5112
  @@ -1,3 +1,4 @@
  +30-Jun-2003: Upgraded package: P<openpkg-tool-20030630-20030630>
   30-Jun-2003: Upgraded package: P<gcc33-3.3.1s20030630-20030630>
   30-Jun-2003: New package: P<clamav-0.60-20030630>
   30-Jun-2003: Upgraded package: P<fsl-1.2.0-20030630>
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to