r870 - in glibc-package/branches/glibc-2.3.4/debian: . debhelper.in
Author: gotom
Date: 2005-04-03 04:38:09 +0000 (Sun, 03 Apr 2005)
New Revision: 870
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/debhelper.in/libc.postrm
Log:
Put special ld.so.nohwcap string when the
downgraded version does not support ld.so.hwcappkgs.
It allows us to downgrade libc6 with optimized libraries.
Modified: glibc-package/branches/glibc-2.3.4/debian/changelog
===================================================================
--- glibc-package/branches/glibc-2.3.4/debian/changelog 2005-04-02 05:39:04 UTC (rev 869)
+++ glibc-package/branches/glibc-2.3.4/debian/changelog 2005-04-03 04:38:09 UTC (rev 870)
@@ -7,7 +7,8 @@
/etc/ld.so.hwcappkgs to track hwcap packages.
- debian/debhelper.in/libc.postinst: Create /etc/ld.so.hwcappkgs if
such file is not existed. Check hwcap packages and decide to keep
- /etc/ld.so.nohwcap.
+ /etc/ld.so.nohwcap. Put special ld.so.nohwcap string when the
+ downgraded version does not support ld.so.hwcappkgs.
- debian/debhelper.in/libc-otherbuild.postinst: When it's configured,
check /etc/ld.so.hwcappkgs and decides to keep /etc/ld.so.nohwcap.
- debian/debhelper.in/libc-otherbuild.postrm: When it's removed,
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-04-02 05:39:04 UTC (rev 869)
+++ glibc-package/branches/glibc-2.3.4/debian/debhelper.in/libc.postinst 2005-04-03 04:38:09 UTC (rev 870)
@@ -195,14 +195,14 @@
if [ ! -f /etc/ld.so.hwcappkgs ]; then
case "`uname -m`" in
i?86)
- pkgs="libc6 libc6-i686"
+ hwcappkgs="libc6 libc6-i686"
;;
sparc*)
- pkgs="libc6 libc6-sparcv9 libc6-sparcv9b"
+ hwcappkgs="libc6 libc6-sparcv9 libc6-sparcv9b"
;;
esac
- if [ -n "$pkgs" ]; then
- for pkg in $pkgs; do
+ if [ -n "$hwcappkgs" ]; then
+ for pkg in $hwcappkgs; do
ver=$(checkpkgver $pkg)
if [ -n "$ver" ]; then
echo "$pkg $ver" >> /etc/ld.so.hwcappkgs
@@ -233,6 +233,9 @@
if [ "$new_hwcappkgs" != yes ]; then
ver=$(checkpkgver $pkg)
fi
+ if [ -z "$ver" ]; then
+ continue
+ fi
dpkg --compare-versions $curver ne $ver && optunmatch=yes
fi
echo "$pkg $ver" >> /etc/ld.so.hwcappkgs.tmp
@@ -244,7 +247,7 @@
fi
# nohwcap during upgrade.
- grep -v '^glibc$' /etc/ld.so.nohwcap > /etc/ld.so.nohwcap.tmp || true
+ egrep -v '^glibc$|^downgrade-to-old-glibc$' /etc/ld.so.nohwcap > /etc/ld.so.nohwcap.tmp || true
mv /etc/ld.so.nohwcap.tmp /etc/ld.so.nohwcap
if [ "$optunmatch" != "yes" ]; then
test -s /etc/ld.so.nohwcap || rm -f /etc/ld.so.nohwcap
Modified: glibc-package/branches/glibc-2.3.4/debian/debhelper.in/libc.postrm
===================================================================
--- glibc-package/branches/glibc-2.3.4/debian/debhelper.in/libc.postrm 2005-04-02 05:39:04 UTC (rev 869)
+++ glibc-package/branches/glibc-2.3.4/debian/debhelper.in/libc.postrm 2005-04-03 04:38:09 UTC (rev 870)
@@ -11,6 +11,27 @@
fi
fi
+if [ "$1" = upgrade ]; then
+ case "`uname -m`" in
+ i?86|sparc*)
+ if dpkg --compare-versions "$2" lt 2.3.4-3; then
+ hwcappkgs=remove
+ fi
+ ;;
+ esac
+ if [ "$hwcappkgs" = remove ]; then
+ # Make sure the downgraded package does not support
+ # ld.so.hwcappkgs mechanism on i686 and sparc.
+ rm -f /etc/ld.so.hwcappkgs
+ echo "downgrade-to-old-glibc" >> /etc/ld.so.nohwcap
+
+ echo You are trying to downgrade to glibc 2.3.4-2 or earlier.
+ echo Such version does not support /etc/ld.so.hwcappkgs
+ echo mechanism on i386 and sparc. Hwcap libraries are
+ echo disabled until glibc 2.3.4-3 and later is installed.
+ fi
+fi
+
if [ "$1" = deconfigure ]; then
:; # blah, do something useful with ldso
fi
Reply to: