[pkg-bioc] svn commit r330 r330 - in /trunk/tools-ng: pkgbioc.pm r_pkg_ordering.pl

psychedelys-guest at users.alioth.debian.org psychedelys-guest at users.alioth.debian.org
Sun Sep 30 10:54:10 UTC 2007


Author: psychedelys-guest
Date: Sun Sep 30 10:54:10 2007
New Revision: 330

URL: http://svn.debian.org/wsvn/pkg-bioc/?sc=1&rev=330
Log:
* added more grained conrtol in the rebuild switch
* stoping a build is not anymore stoping r_pkg_ordering action

Modified:
    trunk/tools-ng/pkgbioc.pm
    trunk/tools-ng/r_pkg_ordering.pl

Modified: trunk/tools-ng/pkgbioc.pm
URL: http://svn.debian.org/wsvn/pkg-bioc/trunk/tools-ng/pkgbioc.pm?rev=330&op=diff
==============================================================================
--- trunk/tools-ng/pkgbioc.pm (original)
+++ trunk/tools-ng/pkgbioc.pm Sun Sep 30 10:54:10 2007
@@ -1047,8 +1047,9 @@ sub loadDescriptionsForPackage($$$$$$$) 
 sub Checkstop() {
     if ( -f "stop" ) {
         print "exiting as ask (I found the stop file).\n";
-        exit;
+        return 1;
     }
+    return 0;
 }
 
 1;

Modified: trunk/tools-ng/r_pkg_ordering.pl
URL: http://svn.debian.org/wsvn/pkg-bioc/trunk/tools-ng/r_pkg_ordering.pl?rev=330&op=diff
==============================================================================
--- trunk/tools-ng/r_pkg_ordering.pl (original)
+++ trunk/tools-ng/r_pkg_ordering.pl Sun Sep 30 10:54:10 2007
@@ -78,9 +78,21 @@ This script will be executed under Debia
 
     turn the verbose mode on
 
+=item --rebuildlocal
+
+    rebuild local debian file only 
+
+=item --rebuildmirror
+
+    rebuild debian file which are available on the pkgbioc mirror
+
+=item --rebuilddebian
+
+    rebuild debian file which are available on the debian mirror
+
 =item --rebuildall
 
-    rebuild everything exept the debian packages
+    equivalent of --rebuildlocal + --rebuildmirror 
 
 =item --noQAcheck
 
@@ -90,9 +102,9 @@ This script will be executed under Debia
 
 	do not remove directory if the build is failing.
 
-# TODO option not yet implemented 
-# --builddebian
-# --dryrun
+=item --dryrun
+
+	TODO option not yet implemented 
 
 =back
 
@@ -111,7 +123,8 @@ use Cwd;
 use vars qw($help $man $debug $verbose $dryrun $VERSION);
 
 #the specific variables
-use vars qw($rebuildall $noQAcheck $builddebian $inspectfailedbuild);
+use vars
+  qw($rebuildlocal $rebuildmirror $rebuilddebian $rebuildall $noQAcheck $builddebian $inspectfailedbuild);
 
 my $origpath = cwd;
 
@@ -169,6 +182,9 @@ my %options = (
     "verbose"            => \$verbose,
     "dryrun"             => \$dryrun,
     "rebuildall"         => \$rebuildall,
+    "rebuildlocal"       => \$rebuildlocal,
+    "rebuildmirror"      => \$rebuildmirror,
+    "rebuilddebian"      => \$rebuilddebian,
     "noQAcheck"          => \$noQAcheck,
     "builddebian"        => \$builddebian,
     "inspectfailedbuild" => \$inspectfailedbuild,
@@ -177,6 +193,9 @@ my %options = (
 help() if !GetOptions(%options) or $help or $man;
 $verbose = 1 if $debug;
 
+$rebuildlocal  = 1 if $rebuildall;
+$rebuildmirror = 1 if $rebuildall;
+
 ################
 # load the autoconfig file. ( want to packages cran and bioc, or just Bioc, location,...)
 
@@ -538,7 +557,7 @@ my $packageno = 0;
 foreach my $package (@nodes) {
     $packageno++;
 
-    Checkstop();
+    last if ( Checkstop() );
 
     print "\n";
     print "************************************************\n";
@@ -686,7 +705,7 @@ foreach my $package (@nodes) {
                 print
                   "\tPackage '$package' ($debname): last version is already "
                   . "in our local mirror, skipping\n";
-                if ($rebuildall) {
+                if ($rebuildmirror) {
                     print "\tbut rebuilding anyway as you are asking\n";
                 }
                 else {
@@ -699,8 +718,9 @@ foreach my $package (@nodes) {
     elsif ( -s $debfile ) {
         print "\t$package is already built, $debfile exist, skipping package\n"
           if $verbose;
-        if ($rebuildall) {
+        if ($rebuildlocal) {
             print "\tbut rebuilding anyway as you are asking\n";
+            unlink $debfile if ( !$dryrun );
         }
         else {
             next;
@@ -807,7 +827,7 @@ foreach my $package (@nodes) {
     build_methods( $installMethods, "build", $packagehashref );
     if ( !-f $debfile ) {
         print "The build of $debname failed\n";
-        if ( -r "$packagehashref->{logfile}" ) {
+        if ( ( -r "$packagehashref->{logfile}" ) && ($verbose) ) {
             my $nlog = 30;
             print "=== start tail -$nlog $packagehashref->{logfile} ===\n";
             system("tail -$nlog $packagehashref->{logfile}");




More information about the pkg-bioc-devel mailing list