Package: sbuild
Severity: normal
Tags: patch

sbuild and any other sbuild command will fail to run when the $build_dir
variable is set in the config files. Problem is it's not set in Conf.pm.
Currently in the config file, it has to be set as 'my $build_dir'.

I've attached a patch that resolves this.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-1-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages sbuild depends on:
ii  adduser                       3.110      add and remove users and groups
ii  libsbuild-perl                0.58.7-1   Tool for building Debian binary pa
ii  perl                          5.10.0-23  Larry Wall's Practical Extraction 
ii  perl-modules                  5.10.0-23  Core Perl modules

Versions of packages sbuild recommends:
ii  debootstrap                   1.0.13     Bootstrap a basic Debian system
ii  fakeroot                      1.12.4     Gives a fake root environment

Versions of packages sbuild suggests:
ii  deborphan                     1.7.28     program that can find unused packa
ii  wget                          1.11.4-2   retrieves files from the web

-- no debconf information
diff --git a/lib/Sbuild/Conf.pm b/lib/Sbuild/Conf.pm
index 950bf0a..fd9e246 100644
--- a/lib/Sbuild/Conf.pm
+++ b/lib/Sbuild/Conf.pm
@@ -529,6 +529,7 @@ sub read_config {
     my $build_arch_all = undef;
     my $arch = undef;
     my $job_file = undef;
+    my $build_dir = undef;
 
     foreach ($Sbuild::Sysconfig::paths{'SBUILD_CONF'}, "$HOME/.sbuildrc") {
 	if (-r $_) {
@@ -620,6 +621,7 @@ sub read_config {
 	if defined $self->get('KEY_ID');
     $self->set('MAINTAINER_NAME', $self->get('UPLOADER_NAME')) if defined $self->get('UPLOADER_NAME');
     $self->set('MAINTAINER_NAME', $self->get('KEY_ID')) if defined $self->get('KEY_ID');
+    $self->set('BUILD_DIR', $build_dir);
 
     if (!defined($self->get('MAINTAINER_NAME')) &&
 	$self->get('BIN_NMU')) {

Reply via email to