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@redhat.com
* 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
On Fri, 2006-01-20 at 16:43 -0700, Tom Tromey wrote:
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...
This looks fine to me.
Tom
Tom
Index: ChangeLog from Tom Tromey tromey@redhat.com
- 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
-- fedora-devel-java-list mailing list fedora-devel-java-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-devel-java-list
Tom Tromey wrote:
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...
It might be nice to lose the $dbLocation.d stuff for all but FC4, just so people don't get tempted to use it.
Cheers, Gary
Gary> It might be nice to lose the $dbLocation.d stuff for all but FC4, just Gary> so people don't get tempted to use it.
What do you think of the appended?
I figured I could make a tag in cvs before committing this, and any FC4 updates could be based off this tag.
Tom
Index: ChangeLog from Tom Tromey tromey@redhat.com
* 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 23 Jan 2006 22:22:25 -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 $libdir; then + # No shared libraries here. + continue + fi + dirname $dbLocation | xargs mkdir -p + @GCJ_BIN_DIR@/gcj-dbtool@gcc_suffix@ -n $dbLocation 64 + find $libdir -follow -name '*.db' -print0 | \ + xargs -0 @GCJ_BIN_DIR@/gcj-dbtool@gcc_suffix@ -m $dbLocation $dbLocation +done
Tom Tromey wrote:
Gary> It might be nice to lose the $dbLocation.d stuff for all but Gary> FC4, just so people don't get tempted to use it.
What do you think of the appended?
Perfect.
I figured I could make a tag in cvs before committing this, and any FC4 updates could be based off this tag.
Cool.
Cheers, Gary
java-devel@lists.fedoraproject.org