OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall Root: /v/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-tools Date: 27-Jun-2006 14:13:14 Branch: HEAD Handle: 2006062713131300 Modified files: openpkg-tools/cmd build.pl Log: allow -b/-B to skip package installations (rpm -Uvh) if the MD5 checksum is equal, too Summary: Revision Changes Path 1.19 +10 -4 openpkg-tools/cmd/build.pl ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-tools/cmd/build.pl ============================================================================ $ cvs diff -u -r1.18 -r1.19 build.pl --- openpkg-tools/cmd/build.pl 27 Jun 2006 11:22:55 -0000 1.18 +++ openpkg-tools/cmd/build.pl 27 Jun 2006 12:13:13 -0000 1.19 @@ -2167,13 +2167,14 @@ # sub print_list1 ($$$$$$$) { my($list,$c,$uncond,$with,$ignore,$usebin,$allbin) = @_; - my($spkg,$bpkg,$ppkg); + my($pkg,$spkg,$bpkg,$ppkg); my($opt); my($cmd1, $cmd2, $mark); $mark = '::::'; foreach (@$list) { + $pkg = $_->{name}; $spkg = $_->{href}; unless ($spkg =~ /\S/) { die "FATAL: internal error, ",vsn($_)," without source URL\n"; @@ -2235,8 +2236,11 @@ # better than erasing everything and losing configuration # files # - $opt = $_->{REBUILD} ? ' --force' : ''; + $opt = ($_->{REBUILD} || ($allbin || ($usebin && !$_->{GOAL}))) ? ' --force' : ''; $cmd2 = priv("$RPM$opt -Uvh $bpkg"); + if ($allbin || ($usebin && !$_->{GOAL})) { + $cmd2 = "if test \".`$RPM -q --qf '\%{SIGMD5}' $pkg`\" != \".`$RPM -qp --qf '\%{SIGMD5}' $bpkg`\"; then $cmd2; fi"; + } if ($ignore) { $cmd2 = "$cmd1 && \\\n$cmd2" if defined $cmd1; @@ -2666,8 +2670,10 @@ =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. +if the package is rebuilt as a dependency. Wrap install commands with a +build/install-time check for different MD5 signature checksum of binary +package and installed package. This is best to use with B<-u> to defer +all such checks until build-time. =item B<-B> @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List openpkg-cvs@openpkg.org