[buildd-tools-devel] Bug#539570: Bug#539570: reliance on ~/stats should be properly documented
Roger Leigh
rleigh at codelibre.net
Sun Aug 2 10:21:11 UTC 2009
tags 539570 + patch fixed-upstream pending
thanks
On Sat, Aug 01, 2009 at 06:03:51PM -0700, Daniel Moerner wrote:
> STATS_DIR directory '/root/stats' does not exist at /usr/share/perl5/Sbuild/Conf.pm line 70.
>
> Obviously, 'mkdir -p /root/stats' solves this problem. However, this
> requirement doesn't look to be documented in man 8
> sbuild-createchroot. It's also confusing because the README.Debian
> seems to suggest that the stats directories are in /var/lib/sbuild.
This was a problem in the configuration code, where it would require that
the stats dir (used by buildd) should exist whether or not it would be used.
I've removed the check, so this will no longer occur.
Thanks for finding this!
Regards,
Roger
diff --git a/debian/changelog b/debian/changelog
index 0244053..d652599 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,8 +9,11 @@ sbuild (0.59.0-1) unstable; urgency=low
* Sbuild::Build, WannaBuild::Database: Add support for architecture
aliases/wildcards (Closes: #501230). Thanks to Andres Mejia for
these patches.
+ * Sbuild::Conf doesn't require STATS_DIR to exist, and
+ Sbuild::Build::write_stats only uses STATS_DIR in batch mode
+ (Closes: #539570).
- -- Roger Leigh <rleigh at debian.org> Sat, 25 Jul 2009 17:37:41 +0100
+ -- Roger Leigh <rleigh at debian.org> Sun, 02 Aug 2009 11:15:26 +0100
sbuild (0.58.6-1) unstable; urgency=low
diff --git a/lib/Sbuild/Build.pm b/lib/Sbuild/Build.pm
index b7821a4..02e2c94 100644
--- a/lib/Sbuild/Build.pm
+++ b/lib/Sbuild/Build.pm
@@ -2409,6 +2409,8 @@ sub unlock_file {
sub write_stats {
my $self = shift;
+ return if (!$conf->get('BATCH_MODE');
+
my $stats_dir = $self->get_conf('STATS_DIR');
return if not defined $stats_dir;
diff --git a/lib/Sbuild/Conf.pm b/lib/Sbuild/Conf.pm
index 67ef384..325c865 100644
--- a/lib/Sbuild/Conf.pm
+++ b/lib/Sbuild/Conf.pm
@@ -182,7 +182,6 @@ sub init_allowed_keys {
DEFAULT => "$Sbuild::Sysconfig::paths{'SBUILD_LOCALSTATE_DIR'}/avg-build-space"
},
'STATS_DIR' => {
- CHECK => $validate_directory,
DEFAULT => "$HOME/stats"
},
'PACKAGE_CHECKLIST' => {
--
.''`. 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20090802/cba9077f/attachment-0001.pgp>
More information about the Buildd-tools-devel
mailing list