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: 13-Jun-2003 15:18:56 Branch: HEAD Handle: 2003061314185401 Modified files: openpkg-src/openpkg-tool openpkg-build.pl openpkg-tool.spec openpkg.1 openpkg.pod openpkg-web news.txt Log: add optional build-time checks for existing binary RPMs Summary: Revision Changes Path 1.76 +19 -6 openpkg-src/openpkg-tool/openpkg-build.pl 1.57 +2 -2 openpkg-src/openpkg-tool/openpkg-tool.spec 1.7 +12 -1 openpkg-src/openpkg-tool/openpkg.1 1.16 +13 -0 openpkg-src/openpkg-tool/openpkg.pod 1.4857 +1 -0 openpkg-web/news.txt ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/openpkg-tool/openpkg-build.pl ============================================================================ $ cvs diff -u -r1.75 -r1.76 openpkg-build.pl --- openpkg-src/openpkg-tool/openpkg-build.pl 3 Jun 2003 16:11:04 -0000 1.75 +++ openpkg-src/openpkg-tool/openpkg-build.pl 13 Jun 2003 13:18:55 -0000 1.76 @@ -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/; -my $getopts = 'R:r:f:uUaAzZP:N:E:iD:p:qsSXMLWKe'; + $opt_W $opt_K $opt_e $opt_b $opt_B/; +my $getopts = 'R:r:f:uUaAzZP:N:E:iD:p:qsSXMLWKebB'; getopts($getopts); ########################################################################## @@ -112,7 +112,7 @@ close(FH); } -die "openpkg:build:USAGE: $0 [-R rpm] [-r repository] [-f index.rdf] [-uUzZiqsSXMLWKe] [-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] [-uUzZiqsSXMLWKebB] [-P priv-cmd] [-N non-priv-cmd] [-p platform] [-Dwith ...] [-Ename ...] ( [-aA] | patternlist )\n" unless $#ARGV >= 0 || ($#ARGV == -1 && ($opt_a || $opt_A)); ########################################################################## @@ -1979,9 +1979,11 @@ # uncond -> always do the --rebuild # with -> parameter set passed to build tool # ignore -> generate script that does not stop on error +# usebin -> build-time check to skip rebuild when binary exists +# allbin -> usebin also for goals # -sub print_list1 ([EMAIL PROTECTED]) { - my($list,$c,$uncond,$with,$ignore) = @_; +sub print_list1 ($$$$$$$) { + my($list,$c,$uncond,$with,$ignore,$usebin,$allbin) = @_; my($spkg,$bpkg,$ppkg); my($mywith, $opt); my($cmd1, $cmd2, $mark); @@ -2032,6 +2034,15 @@ $cmd1 = npriv("$RPM$opt --rebuild $spkg"); } } + # + # wrap build command with build-time check for existing + # binary target + # + if (defined $cmd1 && + ( $allbin || ($usebin && !$_->{GOAL}) ) + ) { + $cmd1 = "if test ! -f $bpkg ; then $cmd1 ; fi"; + } # # if package exist force rpm to copy over new files @@ -2253,7 +2264,9 @@ $config, $opt_a || $opt_u || $opt_U, $env->{with}, - $opt_i); + $opt_i, + $opt_b, + $opt_B); print_list2($bonly,$config) unless $opt_K; } } @@ . patch -p0 <<'@@ .' Index: openpkg-src/openpkg-tool/openpkg-tool.spec ============================================================================ $ cvs diff -u -r1.56 -r1.57 openpkg-tool.spec --- openpkg-src/openpkg-tool/openpkg-tool.spec 11 Jun 2003 14:46:37 -0000 1.56 +++ openpkg-src/openpkg-tool/openpkg-tool.spec 13 Jun 2003 13:18:55 -0000 1.57 @@ -32,8 +32,8 @@ Distribution: OpenPKG [PLUS] Group: Bootstrapping License: GPL -Version: 20030611 -Release: 20030611 +Version: 20030613 +Release: 20030613 # list of sources Source0: openpkg.sh @@ . patch -p0 <<'@@ .' Index: openpkg-src/openpkg-tool/openpkg.1 ============================================================================ $ cvs diff -u -r1.6 -r1.7 openpkg.1 --- openpkg-src/openpkg-tool/openpkg.1 11 Jun 2003 14:45:02 -0000 1.6 +++ openpkg-src/openpkg-tool/openpkg.1 13 Jun 2003 13:18:55 -0000 1.7 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "OPENPKG 1" -.TH OPENPKG 1 "2003-04-25" "openpkg-tool" "OpenPKG Maintainance" +.TH OPENPKG 1 "2003-06-13" "openpkg-tool" "OpenPKG Maintainance" .SH "NAME" \&\fBopenpkg\fR \- \fBOpenPKG\fR maintainance utility .SH "VERSION" @@ -166,6 +166,8 @@ [\fB\-X\fR] [\fB\-K\fR] [\fB\-e\fR] +[\fB\-b\fR] +[\fB\-B\fR] [\fB\-P\fR \fIpriv-cmd\fR] [\fB\-N\fR \fInon-priv-cmd\fR] [\fB\-p\fR \fIplatform\fR] @@ -350,6 +352,15 @@ .IX Item "-e" Rebuild exact version from repository even when you have installed a newer version from another repository. +.IP "\fB\-b\fR" 4 +.IX Item "-b" +Wrap rebuild commands with build-time check for existing binary packages +if the package is rebuilt as a dependency. This is best to use with +\&\fB\-u\fR to defer all such checks until build\-time. +.IP "\fB\-B\fR" 4 +.IX Item "-B" +Same as \-b but also check all packages for existing binary packages +at run\-time. .IP "\fB\-P\fR \fIpriv-cmd\fR" 4 .IX Item "-P priv-cmd" Command prefix to use for install commands that require elevated @@ . patch -p0 <<'@@ .' Index: openpkg-src/openpkg-tool/openpkg.pod ============================================================================ $ cvs diff -u -r1.15 -r1.16 openpkg.pod --- openpkg-src/openpkg-tool/openpkg.pod 24 Apr 2003 12:36:41 -0000 1.15 +++ openpkg-src/openpkg-tool/openpkg.pod 13 Jun 2003 13:18:55 -0000 1.16 @@ -65,6 +65,8 @@ [B<-X>] [B<-K>] [B<-e>] +[B<-b>] +[B<-B>] [B<-P> I<priv-cmd>] [B<-N> I<non-priv-cmd>] [B<-p> I<platform>] @@ -289,6 +291,17 @@ Rebuild exact version from repository even when you have installed a newer version from another repository. + +=item B<-b> + +Wrap rebuild commands with build-time check for existing binary packages +if the package is rebuilt as a dependency. This is best to use with +B<-u> to defer all such checks until build-time. + +=item B<-B> + +Same as -b but also check all packages for existing binary packages +at run-time. =item B<-P> I<priv-cmd> @@ . patch -p0 <<'@@ .' Index: openpkg-web/news.txt ============================================================================ $ cvs diff -u -r1.4856 -r1.4857 news.txt --- openpkg-web/news.txt 13 Jun 2003 12:27:40 -0000 1.4856 +++ openpkg-web/news.txt 13 Jun 2003 13:18:54 -0000 1.4857 @@ -1,3 +1,4 @@ +13-Jun-2003: Upgraded package: P<openpkg-tool-20030613-20030613> 13-Jun-2003: Upgraded package: P<amavisd-20030314p2-20030613> 13-Jun-2003: Upgraded package: P<sdl-1.2.5-20030613> 13-Jun-2003: Upgraded package: P<integrit-3.02.00-20030613> @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List [EMAIL PROTECTED]