[Buildd-tools-devel] [PATCH] [sbuild-createchroot] Compute an absolute path for the chroot location

Cyril Brulebois cyril.brulebois at kerlabs.com
Sun Nov 30 04:08:10 UTC 2008


A relative path is sufficient at chroot creation time, but will lead to
troubles when it's going to be actually used (possibly from another
directory), so compute an absolute path to be stored in the chroot
configuration file.
---
 bin/sbuild-createchroot |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/bin/sbuild-createchroot b/bin/sbuild-createchroot
index 58b42c6..850532f 100755
--- a/bin/sbuild-createchroot
+++ b/bin/sbuild-createchroot
@@ -31,6 +31,7 @@ use Sbuild::Conf;
 use Sbuild::ChrootPlain;
 use File::Path qw(mkpath);
 use File::Temp ();
+use Cwd;
 
 package main;
 
@@ -118,7 +119,7 @@ usage_error("sbuild-createchroot",
 	    "Incorrect number of options") if (@ARGV <3 || @ARGV >4);
 
 my $suite = $ARGV[0];
-my $target = $ARGV[1];
+my $target = Cwd::abs_path($ARGV[1]);
 my $mirror = $ARGV[2];
 my $script = undef;
 
-- 
1.5.6.5




More information about the Buildd-tools-devel mailing list