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:   26-Jun-2003 13:00:39
  Branch: HEAD                             Handle: 2003062612003503

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

  Log:
    consider options for reverse dependencies

  Summary:
    Revision    Changes     Path
    1.86        +30 -23     openpkg-src/openpkg-tool/openpkg-build.pl
    1.61        +2  -2      openpkg-src/openpkg-tool/openpkg-tool.spec
    1.5023      +1  -0      openpkg-web/news.txt
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/openpkg-tool/openpkg-build.pl
  ============================================================================
  $ cvs diff -u -r1.85 -r1.86 openpkg-build.pl
  --- openpkg-src/openpkg-tool/openpkg-build.pl 25 Jun 2003 12:01:11 -0000      1.85
  +++ openpkg-src/openpkg-tool/openpkg-build.pl 26 Jun 2003 11:00:38 -0000      1.86
  @@ -496,8 +496,8 @@
       my($env, $i) = @_;
       my($r) = $env->{'repository'};
       my($pkg, %dep, %dlist, %rev);
  -    my(@vers,$t);
  -    my($d,$k,%d);
  +    my(@vers,$t,$t1,$t2,$with,$name);
  +    my($d,$k,%d,$old,%name);
   
       print "# computing reverse dependencies\n";
   
  @@ -509,27 +509,36 @@
           }
   
           #
  -        # get list of package versions from repository
  -        #
  -        @vers = get_versions($r->{$pkg}, sub { 1; });
  -
  -        #
           # get forward dependencies from repository packages
  +        # but blend in options from installed packages
           #
           # dep{a}{b} is true if b depends directly on a
           # dlist{a}  is list of packages that depend on a
           #
  +        @vers = get_versions($r->{$pkg}, sub { 1; });
           foreach (@vers) {
               foreach $t (@{$r->{$pkg}->{$_}}) {
  -                next unless $i->{$t->{name}};
  -                $d = target_depends($t, $env);
  -                $k = target_keeps($t, $env);
  +                $with = get_with($t);
  +                $t2 = find_target($t->{name}, $i);
  +                if ($t2) {
  +                    $with = { %$with };
  +                    override_options($with, get_with($t2), '');
  +                }
  +                $d = target_attribute($t, $env, 'depends', $with);
  +                $k = target_attribute($t, $env, 'keeps', $with);
                   next unless @$d || @$k;
                   %d = unique_map($d,$k);
                   foreach (keys %d) {
  -                    unless ($dep{$_}{$t->{name}}) {
  -                        $dep{$_}{$t->{name}} = 1;
  -                        push @{$dlist{$_}}, $t;
  +                    next if $_ eq 'OpenPKG';
  +                    # resolve target
  +                    unless ($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;
                       }
                   }
               }
  @@ -1281,20 +1290,19 @@
   #
   # retrieve conditional target attributes in map
   #
  -sub target_attribute ($$$) {
  -    my($target, $env, $attr) = @_;
  -    my($with)   = $env->{with};
  +sub target_attribute ($$$;$) {
  +    my($target, $env, $attr, $with) = @_;
       my($optreg) = $env->{config}->{optreg};
       my($name,@out);
   
       return unless $target;
       $name = $target->{name};
   
  -    my(%mywith) = %{$target->{OPTIONS}};
  -    override_options(\%mywith, name_with($name, $with), $optreg);
  +    my($mywith) = $with ? $with : get_with($target);
  +    override_options($mywith, name_with($name, $env->{with}), $optreg);
   
       foreach (@{$target->{$attr}}) {
  -        next unless conditional($_->{'cond'}, \%mywith);
  +        next unless conditional($_->{'cond'}, $mywith);
           push @out, $_->{'value'};
       }
       return [EMAIL PROTECTED];
  @@ -1707,6 +1715,7 @@
           $target->{PROXY} = $t->{PROXY};
           $target->{REBUILD} = 1;
       } else {
  +        print "# creating $target->{name}\n";
           target_setstatus($target,'ADD',3);
       }
   
  @@ -1784,7 +1793,7 @@
       $target->{LIMBO} = 0;
        
       # remember new options
  -    override_options($target->{OPTIONS},
  +    override_options(get_with($target),
                        name_with($target->{name}, $env->{with}),
                        '');
   
  @@ -1800,9 +1809,7 @@
       #
       return if $conflict;
   
  -    if (!$env->{quick} &&
  -        $target->{name} ne 'openpkg' &&
  -        $target->{REBUILD}) {
  +    if (!$env->{quick} && $target->{name} ne 'openpkg' ) {
   
           unless ($env->{revdep}) {
               $env->{revdep} = get_revdep($env, $env->{installed});
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/openpkg-tool/openpkg-tool.spec
  ============================================================================
  $ cvs diff -u -r1.60 -r1.61 openpkg-tool.spec
  --- openpkg-src/openpkg-tool/openpkg-tool.spec        25 Jun 2003 12:01:11 -0000     
 1.60
  +++ openpkg-src/openpkg-tool/openpkg-tool.spec        26 Jun 2003 11:00:38 -0000     
 1.61
  @@ -32,8 +32,8 @@
   Distribution: OpenPKG [PLUS]
   Group:        Bootstrapping
   License:      GPL
  -Version:      20030625
  -Release:      20030625
  +Version:      20030626
  +Release:      20030626
   
   #   list of sources
   Source0:      openpkg.sh
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-web/news.txt
  ============================================================================
  $ cvs diff -u -r1.5022 -r1.5023 news.txt
  --- openpkg-web/news.txt      26 Jun 2003 10:36:05 -0000      1.5022
  +++ openpkg-web/news.txt      26 Jun 2003 11:00:35 -0000      1.5023
  @@ -1,3 +1,4 @@
  +26-Jun-2003: Upgraded package: P<openpkg-tool-20030626-20030626>
   26-Jun-2003: Upgraded package: P<perl-conv-20030626-20030626>
   26-Jun-2003: Upgraded package: P<skey-1.1.5-20030626>
   26-Jun-2003: Upgraded package: P<honeyd-0.6-20030626>
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to