tags 369718 + patch
thanks

Roger Leigh <[EMAIL PROTECTED]> writes:

> Martin Michlmayr <[EMAIL PROTECTED]> writes:
>
>> 22701:[EMAIL PROTECTED]: ~/debian/build] /usr/share/sbuild/checkchroot
>> /home/tbm/debian/build/logs is not a directory
>> Compilation failed in require at /usr/share/sbuild/checkchroot line 24.
>> BEGIN failed--compilation aborted at /usr/share/sbuild/checkchroot line 24.
>> zsh: exit 2     /usr/share/sbuild/checkchroot
>
> This is Sbuild/Conf.pm, lines 118-119:
>
>       die "$Sbuild::Conf::log_dir is not a directory\n"
>               if ! -d $Sbuild::Conf::log_dir;
>
> How would you prefer we handle this sanity check?

The attached patch creates the directories if they are not present.
The compilation error stuff seems to have gone--maybe a change in
perl?

Is this OK?


Thanks,
Roger

-- 
Roger Leigh
                Printing on GNU/Linux?  http://gutenprint.sourceforge.net/
                Debian GNU/Linux        http://www.debian.org/
                GPG Public Key: 0x25BFB848.  Please sign and encrypt your mail.
Index: Sbuild/Conf.pm
===================================================================
--- Sbuild/Conf.pm	(revision 705)
+++ Sbuild/Conf.pm	(working copy)
@@ -115,10 +115,15 @@
 		if !-x $Sbuild::Conf::apt_cache;
 	die "dpkg-source binary $Sbuild::Conf::dpkg_source does not exist or isn't executable\n"
 		if !-x $Sbuild::Conf::dpkg_source;
-	die "$Sbuild::Conf::log_dir is not a directory\n"
-		if ! -d $Sbuild::Conf::log_dir;
-	die "$Sbuild::Conf::srcdep_lock_dir is not a directory\n"
-		if ! -d $Sbuild::Conf::srcdep_lock_dir;
+	if (! -d $Sbuild::Conf::log_dir) {
+		mkdir $Sbuild::Conf::log_dir
+			or die "Could not create $Sbuild::Conf::log_dir: $!\n";
+	}
+	if (! -d $Sbuild::Conf::srcdep_lock_dir) {
+		mkdir $Sbuild::Conf::srcdep_lock_dir
+			or die "Could not create $Sbuild::Conf::srcdep_lock_dir: $!\n";
+
+	}
 	die "mailto not set\n" if !$Sbuild::Conf::mailto;
 
 	if (!defined($Sbuild::Conf::build_dir)) {
Index: debian/changelog
===================================================================
--- debian/changelog	(revision 706)
+++ debian/changelog	(working copy)
@@ -7,6 +7,9 @@
       output, and warn appropriately if the output is invalid
       (Closes: #369707).  Output may be invalid if there are no deb-src
       lines in /etc/apt/sources.list in the chroot.
+  * Sbuild/Conf.pm: If $Sbuild::Conf::log_dir or
+    $Sbuild::Conf::srcdep_lock_dir do not exist, try to create them before
+    bailing out (Closes: #369718).
 
  --
 

Attachment: pgpqecHe25XCv.pgp
Description: PGP signature

Reply via email to