Author: sh-sh-sh
Date: Thu Aug 23 14:33:44 2007
New Revision: 40430
URL: http://svn.opensuse.org/viewcvs/yast?rev=40430&view=rev
Log:
Check for multiple installed verions of libzypp
Modified:
trunk/devtools/devtools/bin/y2makeall
trunk/devtools/package/yast2-devtools.changes
Modified: trunk/devtools/devtools/bin/y2makeall
URL: http://svn.opensuse.org/viewcvs/yast/trunk/devtools/devtools/bin/y2makeall?rev=40430&r1=40429&r2=40430&view=diff
==============================================================================
--- trunk/devtools/devtools/bin/y2makeall (original)
+++ trunk/devtools/devtools/bin/y2makeall Thu Aug 23 14:33:44 2007
@@ -149,6 +149,7 @@
my $no_sudo = 0;
my $dump_build_order = 0;
my $dump_dependencies = 0;
+ my $ignore_libzypp = 0;
GetOptions( "favourites-only" => \$favourites_only,
"fast" => \$disable_make_makefile_cvs,
@@ -157,6 +158,7 @@
"dump-build-order" => \$dump_build_order,
"dump-dependencies" => \$dump_dependencies,
"dry-run" => \$dry_run,
+ "ignore-libzypp" => \$ignore_libzypp,
"verbose" => \$verbose,
"debug" => \$debug,
"silent" => \$silent,
@@ -192,6 +194,14 @@
die "FATAL: Call \"$prog_name\" from your YaST2 CVS or Subversion working directory! (yast2/source)\n"
unless -f "devtools/RPMNAME";
+
+ #
+ # Make sure we have exactly one version of libzypp installed
+ #
+
+ check_libzypp() unless $ignore_libzypp;
+
+
#
# All remaining command line parameters go to "make".
#
@@ -1019,6 +1029,65 @@
return @files;
}
+
+#-----------------------------------------------------------------------------
+
+# Check if exactly one version of libzypp is installed.
+#
+# Multiple versions of libzypp ususally result in very subtle problems or in
+# crashing build components like the YCP byte code compiler: If one YaST2
+# binary package is built with libzypp.so.42 and another with libzypp.so.43,
+# they will be binary incompatible. This typically affects yast2-pkg-bindings,
+# yast2-perl-bindings, yast2-qt, yast2-ncurses.
+#
+# Result:
+# Terminate program upon error
+
+sub check_libzypp()
+{
+ my $libdir = -d "/usr/lib64" ? "/usr/lib64" : "/usr/lib";
+ my @libs = <$libdir/libzypp.so*>;
+ my @libzypp;
+ my $libzypp_count = 0;
+ my $lib;
+
+ foreach $lib ( @libs )
+ {
+ if ( ! -l $lib ) # disregard symlinks
+ {
+ push @libzypp, $lib;
+ $libzypp_count++;
+ }
+ }
+
+ if ( $libzypp_count > 1 )
+ {
+
+ die <