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

r867 - in glibc-package/branches/glibc-2.3.4/debian: . debhelper.in rules.d



Author: gotom
Date: 2005-03-27 14:53:57 +0000 (Sun, 27 Mar 2005)
New Revision: 867

Modified:
   glibc-package/branches/glibc-2.3.4/debian/changelog
   glibc-package/branches/glibc-2.3.4/debian/debhelper.in/libc.postinst
   glibc-package/branches/glibc-2.3.4/debian/rules.d/debhelper.mk
Log:
glibc (2.3.4-2) experimental; urgency=low

  * GOTO Masanori <gotom@debian.org>

    * Fix libc6 installation breakage when old libc6 and libc6-i686 was
      installed, and it's replaced with a new libc6.  This fix is limited
     for i686 optimized package, not for sparc multiple opt packages.
      (Closes: #300806, #300842)
      - debian/debhelper.in/libc.postinst: Add check for the existence of
        multiple optimized packages.
      - debian/rules.d/debhelper.mk: Add the replace code from CURRENT_VER
        to $(DEB_VERSION) for libc.postinst.  Install libc-otherbuild.postrm.
      - debian/debhelper.in/libc-otherbuild.postrm: Added to remove
        unneeded ld.so.nohwcap for single optimized package.



Modified: glibc-package/branches/glibc-2.3.4/debian/changelog
===================================================================
--- glibc-package/branches/glibc-2.3.4/debian/changelog	2005-03-21 05:55:56 UTC (rev 866)
+++ glibc-package/branches/glibc-2.3.4/debian/changelog	2005-03-27 14:53:57 UTC (rev 867)
@@ -1,3 +1,20 @@
+glibc (2.3.4-2) experimental; urgency=low
+
+  * GOTO Masanori <gotom@debian.org>
+
+    * Fix libc6 installation breakage when old libc6 and libc6-i686 was
+      installed, and it's replaced with a new libc6.  This fix is limited
+      for i686 optimized package, not for sparc multiple opt packages.
+      (Closes: #300806, #300842)
+      - debian/debhelper.in/libc.postinst: Add check for the existence of
+        multiple optimized packages.
+      - debian/rules.d/debhelper.mk: Add the replace code from CURRENT_VER
+        to $(DEB_VERSION) for libc.postinst.  Install libc-otherbuild.postrm.
+      - debian/debhelper.in/libc-otherbuild.postrm: Added to remove
+        unneeded ld.so.nohwcap for single optimized package.
+
+ -- GOTO Masanori <gotom@debian.org>  Tue, 22 Mar 2005 11:17:32 +0900
+
 glibc (2.3.4-1) experimental; urgency=low
 
   * GOTO Masanori <gotom@debian.org>

Modified: glibc-package/branches/glibc-2.3.4/debian/debhelper.in/libc.postinst
===================================================================
--- glibc-package/branches/glibc-2.3.4/debian/debhelper.in/libc.postinst	2005-03-21 05:55:56 UTC (rev 866)
+++ glibc-package/branches/glibc-2.3.4/debian/debhelper.in/libc.postinst	2005-03-27 14:53:57 UTC (rev 867)
@@ -175,10 +175,36 @@
 	rm -f /lib/libdb.so.3.old
     fi
 
+    # Handle upgrades when libc-opt package has been installed.
+    # We check the version between the current installed libc and libc-opt.
+    # If they're unmatched, we keep /etc/ld.so.nohwcap file until libc-opt
+    # package is installed or removed.
     if [ -f /etc/ld.so.nohwcap ]; then
+	curver=CURRENT_VER
+	case "`uname -m`" in
+	    i?86)
+		optpkgs=libc6-i686
+		;;
+	    sparc*)
+		optpkgs="libc6-sparcv9 libc6-sparcv9b"
+		;;
+	esac
+	if [ -n "$optpkgs" ]; then
+	    for optpkg in $optpkgs; do
+		status=$(dpkg -s $optpkg 2>/dev/null | grep ^Status: | sed -e 's/^Status: \(.*\) \(.*\) \(.*\)/\3/g')
+		if [ -n "$status" ] && \
+		   [ "$status" != "not-installed" ] && [ "$status" != "config-files" ]; then
+		    optver=$(dpkg -s $optpkg 2>/dev/null | grep ^Version: | sed -e 's/^Version: *//');
+		    dpkg --compare-versions $curver ne $optver && optunmatch=yes
+		fi
+	    done
+        fi
+
 	grep -v '^glibc$' /etc/ld.so.nohwcap > /etc/ld.so.nohwcap.tmp || true
 	mv /etc/ld.so.nohwcap.tmp /etc/ld.so.nohwcap
-	test -s /etc/ld.so.nohwcap || rm -f /etc/ld.so.nohwcap
+	if [ "$optunmatch" != "yes" ]; then
+	    test -s /etc/ld.so.nohwcap || rm -f /etc/ld.so.nohwcap
+	fi
     fi
 
     if [ ! -z $2 ]; then

Modified: glibc-package/branches/glibc-2.3.4/debian/rules.d/debhelper.mk
===================================================================
--- glibc-package/branches/glibc-2.3.4/debian/rules.d/debhelper.mk	2005-03-21 05:55:56 UTC (rev 866)
+++ glibc-package/branches/glibc-2.3.4/debian/rules.d/debhelper.mk	2005-03-27 14:53:57 UTC (rev 867)
@@ -163,6 +163,7 @@
 	  sed -e "s#TMPDIR#debian/tmp-libc#" -i $$z; \
 	  sed -e "s#DEB_SRCDIR#$(DEB_SRCDIR)#" -i $$z; \
 	  sed -e "s#LIBC#$(libc)#" -i $$z; \
+	  sed -e "s#CURRENT_VER#$(DEB_VERSION)#" -i $$z; \
 	  case $$z in \
 	    *.install) sed -e "s/^#.*//" -i $$z ;; \
 	  esac; \
@@ -190,6 +191,7 @@
 	    cp debian/debhelper.in/libc-otherbuild.install $$z; \
 	    cp debian/debhelper.in/libc-otherbuild.preinst debian/$(libc)-$$x.preinst ; \
 	    cp debian/debhelper.in/libc-otherbuild.postinst debian/$(libc)-$$x.postinst ; \
+	    cp debian/debhelper.in/libc-otherbuild.postrm debian/$(libc)-$$x.postrm ; \
 	    sed -e "s#OPT#$$x#" -i debian/$(libc)-$$x.preinst; \
 	    sed -e "s#OPT#$$x#" -i debian/$(libc)-$$x.postinst; \
 	  fi; \



Reply to: