[fedora-java] proposed rebuild-gcj-db patch

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

 



We've had a problem on multiarch hosts where the gcj shared library
caches weren't being updated properly, causing programs to run
interpreted instead.

This patch works around the problem by looping over all the databases
it can find.

Comments?  I'd particularly like to hear from Tom (Fitzsimmons), and
Gary...

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@xxxxxxxxxx>

	* rebuild-gcj-db.in: Loop over /usr/lib*.

Index: rebuild-gcj-db.in
===================================================================
RCS file: /cvs/rhug/java-gcj-compat/rebuild-gcj-db.in,v
retrieving revision 1.7
diff -u -r1.7 rebuild-gcj-db.in
--- rebuild-gcj-db.in 16 Nov 2005 00:09:50 -0000 1.7
+++ rebuild-gcj-db.in 20 Jan 2006 23:44:24 -0000
@@ -13,8 +13,16 @@
     fi
 fi
 
-dbLocation=`@GCJ_BIN_DIR@/gcj-dbtool@gcc_suffix@ -p @LIBDIR@`
-dirname $dbLocation | xargs mkdir -p
-@GCJ_BIN_DIR@/gcj-dbtool@gcc_suffix@ -n $dbLocation 64
-find $dbLocation.d @LIBDIR@/gcj -follow -name '*.db' -print0 | \
-    xargs -0 @GCJ_BIN_DIR@/gcj-dbtool@gcc_suffix@ -m $dbLocation $dbLocation
+# Rebuild all the standard databases.
+for base in /usr/lib*; do
+   dbLocation=`@GCJ_BIN_DIR@/gcj-dbtool@gcc_suffix@ -p $base`
+   libdir=$base/gcj
+   if ! test -d $dbLocation.d && ! test -d $libdir; then
+      # No shared libraries here.
+      continue
+   fi
+   dirname $dbLocation | xargs mkdir -p
+   @GCJ_BIN_DIR@/gcj-dbtool@gcc_suffix@ -n $dbLocation 64
+   find $dbLocation.d $libdir -follow -name '*.db' -print0 | \
+      xargs -0 @GCJ_BIN_DIR@/gcj-dbtool@gcc_suffix@ -m $dbLocation $dbLocation
+done


[Index of Archives]     [Red Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux