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                      Date:   20-Jun-2003 13:06:13
  Branch: HEAD                             Handle: 2003062012061300

  Modified files:
    openpkg-src/openpkg-tool
                            openpkg-build.pl openpkg.1 openpkg.pod

  Log:
    make -z behave like documented, add -g option to unconditionally
    rebuild goals

  Summary:
    Revision    Changes     Path
    1.79        +15 -15     openpkg-src/openpkg-tool/openpkg-build.pl
    1.8         +6  -1      openpkg-src/openpkg-tool/openpkg.1
    1.17        +5  -0      openpkg-src/openpkg-tool/openpkg.pod
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/openpkg-tool/openpkg-build.pl
  ============================================================================
  $ cvs diff -u -r1.78 -r1.79 openpkg-build.pl
  --- openpkg-src/openpkg-tool/openpkg-build.pl 20 Jun 2003 10:38:15 -0000      1.78
  +++ openpkg-src/openpkg-tool/openpkg-build.pl 20 Jun 2003 11:06:13 -0000      1.79
  @@ -33,8 +33,8 @@
       $opt_R $opt_r $opt_f $opt_u $opt_U $opt_a $opt_A
       $opt_z $opt_Z $opt_P $opt_N $opt_E $opt_i $opt_D
       $opt_p $opt_q $opt_s $opt_S $opt_X $opt_M $opt_L
  -    $opt_W $opt_K $opt_e $opt_b $opt_B/;
  -my $getopts = 'R:r:f:uUaAzZP:N:E:iD:p:qsSXMLWKebB';
  +    $opt_W $opt_K $opt_e $opt_b $opt_B $opt_g/;
  +my $getopts = 'R:r:f:uUaAzZP:N:E:iD:p:qsSXMLWKebBg';
   getopts($getopts);
   
   ##########################################################################
  @@ -112,7 +112,7 @@
       close(FH);
   }
   
  -die "openpkg:build:USAGE: $0 [-R rpm] [-r repository] [-f index.rdf] 
[-uUzZiqsSXMLWKebB] [-P priv-cmd] [-N non-priv-cmd] [-p platform] [-Dwith ...] [-Ename 
...] ( [-aA] | patternlist )\n"
  +die "openpkg:build:USAGE: $0 [-R rpm] [-r repository] [-f index.rdf] 
[-uUzZiqsSXMLWKebBg] [-P priv-cmd] [-N non-priv-cmd] [-p platform] [-Dwith ...] 
[-Ename ...] ( [-aA] | patternlist )\n"
       unless $#ARGV >= 0 || ($#ARGV == -1 && ($opt_a || $opt_A));
   
   ##########################################################################
  @@ -1287,12 +1287,6 @@
       return 'new' unless $vmap;
   
       #
  -    # always update GOALs
  -    #
  -    if ($target->{GOAL} && !grep { vcmp($vs, $_) <= 0; } keys %$vmap) {
  -        return 'goal';
  -    }
  -    #
       # if -e then
       # always update if installed version is different from repository
       #
  @@ -1306,6 +1300,12 @@
       if ($env->{upgrade} && !grep { vcmp($vs, $_) <= 0; } keys %$vmap) {
           return 'upgrade';
       }
  +    #
  +    # if -z/-Z then
  +    # always update if installed version is equal or older than repository
  +    if ($env->{zero} && grep { vcmp($vs, $_) >= 0; } keys %$vmap) {
  +        return 'zero';
  +    }
   
       # keep installed target
       return;
  @@ -1485,7 +1485,7 @@
   
       #
       # search installed target that matches requirement
  -    # use it if we are not upgrading (no -U)
  +    # use it if we are not upgrading (no -U and no -z/-Z)
       #
       if ($i && (@vers = get_versions($i, $cond))) {
           foreach (@vers) {
  @@ -1493,7 +1493,7 @@
               get_with($t);
               if (target_suitable($t, $env->{with})) {
                   $tdef = $t;
  -                unless ($env->{upgrade}) {
  +                unless ($env->{upgrade} || $env->{zero}) {
                       return ($t, 1);
                   }
               }
  @@ -1584,9 +1584,9 @@
           } elsif (!target_suitable($t, $env->{with})) {
               target_setstatus($target,'MISMATCH',2);
               print "# rebuilding $target->{name} (parameter mismatch)\n";
  -        #} elsif ($target->{GOAL}) {
  -        #    target_setstatus($target,'GOAL',3);
  -        #    print "# rebuilding $target->{name} (goal)\n";
  +        } elsif ($env->{goals} && $target->{GOAL}) {
  +            target_setstatus($target,'GOAL',3);
  +            print "# rebuilding $target->{name} (goal)\n";
           } else {
               print "# $target->{name} is already installed\n";
               return;
  @@ -1635,7 +1635,6 @@
                       if ($t->{LIMBO}) {
                           print "# ATTENTION: ".vsn($t)." is in LIMBO\n";
                       }
  -                    next;
                   }
   
                   # record which targets to keep in blist
  @@ -2237,6 +2236,7 @@
       quick      => $opt_q,
       status     => ($opt_s || $opt_S),
       fatal      => [],
  +    goals      => $opt_g,
       sourceonly => ($opt_u ||
                      $opt_U ||
                      $opt_z ||
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/openpkg-tool/openpkg.1
  ============================================================================
  $ cvs diff -u -r1.7 -r1.8 openpkg.1
  --- openpkg-src/openpkg-tool/openpkg.1        13 Jun 2003 13:18:55 -0000      1.7
  +++ openpkg-src/openpkg-tool/openpkg.1        20 Jun 2003 11:06:13 -0000      1.8
  @@ -129,7 +129,7 @@
   .\" ========================================================================
   .\"
   .IX Title "OPENPKG 1"
  -.TH OPENPKG 1 "2003-06-13" "openpkg-tool" "OpenPKG Maintainance"
  +.TH OPENPKG 1 "2003-06-20" "openpkg-tool" "OpenPKG Maintainance"
   .SH "NAME"
   \&\fBopenpkg\fR \- \fBOpenPKG\fR maintainance utility
   .SH "VERSION"
  @@ -168,6 +168,7 @@
   [\fB\-e\fR]
   [\fB\-b\fR]
   [\fB\-B\fR]
  +[\fB\-G\fR]
   [\fB\-P\fR \fIpriv-cmd\fR]
   [\fB\-N\fR \fInon-priv-cmd\fR]
   [\fB\-p\fR \fIplatform\fR]
  @@ -361,8 +362,12 @@
   .IX Item "-B"
   Same as \-b but also check all packages for existing binary packages
   at run\-time.
  +.IP "\fB\-g\fR The generated script will rebuild all packages selected even when 
the most recent version is already installed. Dependencies are not affected." 4
  +.IX Item "-g The generated script will rebuild all packages selected even when the 
most recent version is already installed. Dependencies are not affected."
  +.PD 0
   .IP "\fB\-P\fR \fIpriv-cmd\fR" 4
   .IX Item "-P priv-cmd"
  +.PD
   Command prefix to use for install commands that require elevated
   privileges. The most common tool for this is \fIsudo\fR\|(8). If \fIpriv-cmd\fR
   starts with a dash it will be run without the dash and the command
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/openpkg-tool/openpkg.pod
  ============================================================================
  $ cvs diff -u -r1.16 -r1.17 openpkg.pod
  --- openpkg-src/openpkg-tool/openpkg.pod      13 Jun 2003 13:18:55 -0000      1.16
  +++ openpkg-src/openpkg-tool/openpkg.pod      20 Jun 2003 11:06:13 -0000      1.17
  @@ -67,6 +67,7 @@
   [B<-e>]
   [B<-b>]
   [B<-B>]
  +[B<-G>]
   [B<-P> I<priv-cmd>]
   [B<-N> I<non-priv-cmd>]
   [B<-p> I<platform>]
  @@ -302,6 +303,10 @@
   
   Same as -b but also check all packages for existing binary packages
   at run-time.
  +
  +=item B<-g>
  +The generated script will rebuild all packages selected even when the
  +most recent version is already installed. Dependencies are not affected.
   
   =item B<-P> I<priv-cmd>
   
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to