[jhbuild] config: Absolut-ize top_builddir early



commit cf378fe55e86f2bd3df50283d6b993c6c5721f57
Author: Colin Walters <walters verbum org>
Date:   Mon Aug 22 15:53:07 2011 -0400

    config: Absolut-ize top_builddir early
    
    The buildbot code calls setup_env() only once, but load() multiple
    times.  The problem is that we only made the top_builddir absolute
    once in this case.

 jhbuild/config.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/jhbuild/config.py b/jhbuild/config.py
index 17e9ec4..0b1a7d8 100644
--- a/jhbuild/config.py
+++ b/jhbuild/config.py
@@ -267,6 +267,10 @@ class Config:
         # default tarballdir to checkoutroot
         if not self.tarballdir: self.tarballdir = self.checkoutroot
 
+        # Ensure top_builddir is absolute
+        if not os.path.isabs(self.top_builddir):
+            self.top_builddir = os.path.join(self.prefix, self.top_builddir)
+
         # check possible checkout_mode values
         seen_copy_mode = (self.checkout_mode == 'copy')
         possible_checkout_modes = ('update', 'clobber', 'export', 'copy')
@@ -299,8 +303,6 @@ class Config:
             except:
                 raise FatalError(_('install prefix (%s) can not be created') % self.prefix)
 
-        if not os.path.isabs(self.top_builddir):
-            self.top_builddir = os.path.join(self.prefix, self.top_builddir)
         if not os.path.exists(self.top_builddir):
             try:
                 os.makedirs(self.top_builddir)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]