tags 397123 + patch
thanks

Santiago Vila <[EMAIL PROTECTED]> writes:

> The check_watches() function is disk-intensive on flaky systems like
> the Hurd, but even on robust machines, sbuild could go even faster if
> there was a way to disable it (sometimes, some people want to build as
> many packages as possible in as little time as possible).

That's a good idea.  Does something like the following (untested)
patch work for you?

Index: Sbuild/Conf.pm
===================================================================
--- Sbuild/Conf.pm      (revision 1061)
+++ Sbuild/Conf.pm      (working copy)
@@ -32,10 +32,10 @@
 
     @ISA = qw(Exporter);
 
-    @EXPORT = qw($HOME $apt_policy $cwd $username $verbose $nolog
-                $source_dependencies $mailprog $dpkg $sudo $su
-                $schroot $schroot_options $fakeroot $apt_get
-                $apt_cache $dpkg_source $md5sum $avg_time_db
+    @EXPORT = qw($HOME $apt_policy $check_watches $cwd $username
+                $verbose $nolog $source_dependencies $mailprog $dpkg
+                $sudo $su $schroot $schroot_options $fakeroot
+                $apt_get $apt_cache $dpkg_source $md5sum $avg_time_db
                 $avg_space_db $build_env_cmnd $pgp_options $log_dir
                 $mailto $mailfrom $purge_build_directory
                 @toolchain_regex $stalled_pkg_timeout
@@ -82,6 +82,7 @@
 our $chroot_only = 1;
 our $chroot_mode = "split";
 our $apt_policy = 1;
+our $check_watches = 1;
 our @ignore_watches_no_build_deps = qw();
 our $build_dir = undef;
 our $sbuild_mode = "buildd";
Index: sbuild
===================================================================
--- sbuild      (revision 1061)
+++ sbuild      (working copy)
@@ -2666,6 +2666,8 @@
 sub check_watches {
        my($prg, @st, %used);
 
+       return if (!$conf::check_watches);
+
        foreach $prg (keys %main::this_watches) {
                if (!(@st = stat( $prg ))) {
                        print "Watch: $prg: stat failed\n" if $conf::debug;
Index: sbuild.conf.local
===================================================================
--- sbuild.conf.local   (revision 1061)
+++ sbuild.conf.local   (working copy)
@@ -37,5 +37,9 @@
 # cost.
 #$apt_policy = 1;
 
+# Check watched packages to discover missing build dependencies.  This
+# can be disabled to increase the speed of builds
+#$check_watches = 1;
+
 # don't remove this, Perl needs it:
 1;


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.

Attachment: pgpCp0plLbt9I.pgp
Description: PGP signature

Reply via email to