[jhbuild] Bug #668879 packagedb.add takes 4 args, linux.py & perl.py supply 3



commit e998cb608318db2a5998216844a6fb815e312463
Author: John Ralls <jralls ceridwen us>
Date:   Fri Jan 27 12:25:32 2012 -0800

    Bug #668879 packagedb.add takes 4 args, linux.py & perl.py supply 3
    
    Make Package._get_destdir() public (by changing its name to
    get_destdir). Since PerlModule and LinuxModule are derived from Package,
    call self.get_destdir() for the fourth argument to packagedb.add()

 jhbuild/modtypes/__init__.py |    6 +++---
 jhbuild/modtypes/linux.py    |    4 +++-
 jhbuild/modtypes/perl.py     |    4 +++-
 3 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/jhbuild/modtypes/__init__.py b/jhbuild/modtypes/__init__.py
index a546b73..c1426a5 100644
--- a/jhbuild/modtypes/__init__.py
+++ b/jhbuild/modtypes/__init__.py
@@ -169,13 +169,13 @@ class Package:
     def get_builddir(self, buildscript):
         raise NotImplementedError
 
-    def _get_destdir(self, buildscript):
+    def get_destdir(self, buildscript):
         return os.path.join(buildscript.config.top_builddir, 'root-%s' % (self.name, ))
 
     def prepare_installroot(self, buildscript):
         assert self.supports_install_destdir
         """Return a directory suitable for use as e.g. DESTDIR with "make install"."""
-        destdir = self._get_destdir(buildscript)
+        destdir = self.get_destdir(buildscript)
         if os.path.exists(destdir):
             shutil.rmtree(destdir)
         os.makedirs(destdir)
@@ -241,7 +241,7 @@ them into the prefix."""
 
     def process_install(self, buildscript, revision):
         assert self.supports_install_destdir
-        destdir = self._get_destdir(buildscript)
+        destdir = self.get_destdir(buildscript)
         self._clean_la_files(buildscript, destdir)
 
         stripped_prefix = buildscript.config.prefix[1:]
diff --git a/jhbuild/modtypes/linux.py b/jhbuild/modtypes/linux.py
index f3c2da4..54f35e2 100644
--- a/jhbuild/modtypes/linux.py
+++ b/jhbuild/modtypes/linux.py
@@ -212,7 +212,9 @@ class LinuxModule(Package):
                     buildscript.config.prefix)
             buildscript.execute(cmd, cwd = self.branch.srcdir,
                     extra_env = self.extra_env)
-        buildscript.moduleset.packagedb.add(self.name, self.get_revision() or '')
+        buildscript.moduleset.packagedb.add(self.name,
+                                            self.get_revision() or '',
+                                            self.get_destdir(buildscript))
 
     do_headers_install.depends = [PHASE_BUILD]
     do_headers_install.error_phases = [PHASE_FORCE_CHECKOUT, PHASE_CONFIGURE]
diff --git a/jhbuild/modtypes/perl.py b/jhbuild/modtypes/perl.py
index 5b12692..d33643a 100644
--- a/jhbuild/modtypes/perl.py
+++ b/jhbuild/modtypes/perl.py
@@ -70,7 +70,9 @@ class PerlModule(Package, DownloadableModule):
         buildscript.execute(
                 [make, 'install', 'PREFIX=%s' % buildscript.config.prefix],
                 cwd = builddir, extra_env = self.extra_env)
-        buildscript.moduleset.packagedb.add(self.name, self.get_revision() or '')
+        buildscript.moduleset.packagedb.add(self.name,
+                                            self.get_revision() or '',
+                                            self.get_destdir(buildscript))
     do_install.depends = [PHASE_BUILD]
 
     def xml_tag_and_attrs(self):



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