[jhbuild/wip/path-env: 21/22] config: detect lib64 directory and abort



commit 4a630e0b2e6afc98afbf2b2245f5ac321606ac28
Author: Ryan Lortie <desrt desrt ca>
Date:   Thu Mar 13 15:15:52 2014 -0400

    config: detect lib64 directory and abort
    
    Things are likely to go off the rails pretty quickly if you try to use
    new lib64-free jhbuild after having installed some packages in lib64
    using an older jhbuild version.
    
    Unfortunately, Fedora's python packages contain a bug that result in a
    lib64 directory being created inappropriately.
    
    We therefore detect the existence of glib installed inside a lib64
    directory on startup and abort with a helpful message if we find it.
    That will catch the case of someone using jhbuild with lib64 before
    these recent changes: practically every case will have glib installed as a
    dependency of something or other.
    
    A lib64 directory existing on its own is ignored -- this will probably
    continue to be created until Fedora fixes its python packages.

 jhbuild/config.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/jhbuild/config.py b/jhbuild/config.py
index 4fb0dd2..f1e37b6 100644
--- a/jhbuild/config.py
+++ b/jhbuild/config.py
@@ -334,6 +334,12 @@ class Config:
                 raise FatalError(
                         _('working directory (%s) can not be created') % self.top_builddir)
 
+        if os.path.exists(os.path.join(self.prefix, 'lib64', 'libglib-2.0.so')):
+            raise FatalError(_("Your install prefix contains a 'lib64' directory, which is no longer "
+                               "supported by jhbuild.  This is likely the result of a previous build with an 
"
+                               "older version of jhbuild or of a broken package.  Please consider removing "
+                               "your install and checkout directories and starting fresh."))
+
     def apply_env_prepends(self):
         ''' handle environment prepends ... '''
         for envvar in env_prepends.keys():


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