[buildd-tools-devel] Bug#801436: sbuild: when calling `sbuild` from an unpacked source directory, %SBUILD_DSC does not contain an absolute path

Johannes Schauer josch at debian.org
Fri Dec 25 16:02:19 UTC 2015


Control: tag -1 + patch pending

On Sat, 10 Oct 2015 06:59:03 +0200 Johannes Schauer <josch at debian.org> wrote:
> when calling `sbuild` through `dgit sbuild` from within an unpacked source
> package, the %SBUILD_DSC escape does not contain the absolute path to the
> .dsc (as written in the man page) but a path without the directory component.

the following patch fixes the problem:

diff --git a/bin/sbuild b/bin/sbuild
index ff5fc71..fe40e2f 100755
--- a/bin/sbuild
+++ b/bin/sbuild
@@ -84,6 +84,10 @@ sub main () {
        my $jobname = $ARGV[0];
        my $source_dir = 0;
 
+       if (-e $jobname) {
+           $jobname = abs_path($jobname);
+       }
+
        if (-d $jobname) {
            $jobname = create_source_package($jobname);
            if ($jobname eq '.') {
@@ -166,7 +170,6 @@ sub main () {
 
 sub create_source_package ($) {
     my $dsc = shift;
-    $dsc = abs_path($dsc);
 
     open(my $pipe, '-|', 'dpkg-parsechangelog',
         '-l' . $dsc . '/debian/changelog')



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: signature
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20151225/73b18624/attachment.sig>


More information about the Buildd-tools-devel mailing list