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

r2876 - in glibc-package/trunk/debian: . debhelper.in



Author: aurel32
Date: 2008-03-18 15:28:05 +0000 (Tue, 18 Mar 2008)
New Revision: 2876

Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/debhelper.in/libc.postinst
   glibc-package/trunk/debian/debhelper.in/libc.preinst
Log:
  * debhelper.in/libc.preinst, debhelper.in/libc.postinst: remove support for
    upgrade from Potato, and misc fixes.



Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog	2008-03-17 00:58:17 UTC (rev 2875)
+++ glibc-package/trunk/debian/changelog	2008-03-18 15:28:05 UTC (rev 2876)
@@ -31,6 +31,8 @@
   * debian/rules.d/build.mk: disable testsuite on ARM machines running a
     2.6.21 to 2.6.24 kernel.
   * Replace any/submitted-gcc-4.3.diff by any/cvs-gcc-4.3.diff.
+  * debhelper.in/libc.preinst, debhelper.in/libc.postinst: remove support for
+    upgrade from Potato, and misc fixes.
 
   [ Samuel Thibault ]
   * patches/hurd-i386/cvs-blocked-exceptions.diff: new patch to dump

Modified: glibc-package/trunk/debian/debhelper.in/libc.postinst
===================================================================
--- glibc-package/trunk/debian/debhelper.in/libc.postinst	2008-03-17 00:58:17 UTC (rev 2875)
+++ glibc-package/trunk/debian/debhelper.in/libc.postinst	2008-03-18 15:28:05 UTC (rev 2876)
@@ -117,20 +117,6 @@
 
 if [ "$type" = "configure" ]
 then
-    # Handle upgrades for libdb.so.3. We do this before calling ldconfig,
-    # since it will create a symlink for us. Just move everything over. We
-    # use `cat' because I feel it is simpler and safer. Make sure that
-    # libdb.so.3 is either a symlink, or non-existent, just in case
-    # something weird happened and the new libdb2 is unpacked before we
-    # get here.
-    if [ -e /lib/libdb.so.3.old ]; then
-	if [ -L /lib/libdb.so.3 ] || [ ! -e /lib/libdb.so.3 ]; then
-	    rm -f /lib/libdb.so.3
-	    cat /lib/libdb.so.3.old > /lib/libdb.so.3
-	fi
-	rm -f /lib/libdb.so.3.old
-    fi
-
     # Add support for /etc/ld.so.conf.d
     if [ -e /etc/ld.so.conf ]; then
         [ -z "$(tail -n 1 /etc/ld.so.conf)" ] || echo >> /etc/ld.so.conf
@@ -151,11 +137,11 @@
 	. /usr/share/debconf/confmodule
     fi
 
-    if [ ! -z $preversion ]; then
+    if [ -n "$preversion" ]; then
 	if [ ! -d /var/mail ] && [ ! -L /var/mail ]; then
 	    ln -sf spool/mail /var/mail
 	fi
-	if dpkg --compare-versions $preversion lt 2.6-1; then
+	if dpkg --compare-versions "$preversion" lt 2.6-1; then
 	    check="apache2-common apache apache-ssl apache-perl autofs at"
 	    check="$check boa cucipop courier-authdaemon cron cupsys exim"
 	    check="$check exim4-base dovecot-common cucipop lprng lpr"
@@ -270,13 +256,13 @@
     # Generate cache file /usr/lib/gconv/gconv-modules.cache
     iconvconfig || true
 
-#    # DO NOT FOLLOW THIS EXAMPLE IN OTHER PACKAGES
-     updatercd glibc.sh start 01 S .
-     if [ -x /usr/sbin/invoke-rc.d ]; then
+#   # DO NOT FOLLOW THIS EXAMPLE IN OTHER PACKAGES
+    updatercd glibc.sh start 01 S .
+    if [ -x /usr/sbin/invoke-rc.d ]; then
 	invoke-rc.d glibc.sh start
-     else
+    else
 	/etc/init.d/glibc.sh 2>/dev/null || true
-     fi
+    fi
 fi
 
 if [ "`uname -s`" = Linux ]; then

Modified: glibc-package/trunk/debian/debhelper.in/libc.preinst
===================================================================
--- glibc-package/trunk/debian/debhelper.in/libc.preinst	2008-03-17 00:58:17 UTC (rev 2875)
+++ glibc-package/trunk/debian/debhelper.in/libc.preinst	2008-03-18 15:28:05 UTC (rev 2876)
@@ -2,105 +2,72 @@
 set -e
 export LC_ALL=C
 
-if [ "$1" = upgrade ]
-then
-    if dpkg --compare-versions "$2" le 2.2.2-4 && test -e /lib/libdb.so.3; then
-	# Make upgrades to newer libdb.so.3 easier
-	cat /lib/libdb.so.3 > /lib/libdb.so.3.old
-    fi
-    if dpkg --compare-versions "$2" le 2.1.1-0.1; then
-	if [ -f /var/run/utmpd.pid ]; then
-	    if kill -s TERM `cat /var/run/utmpd.pid` > /dev/null 2>&1
-	    then
-		if [ -f /var/run/utmp ]; then
-		    cp /dev/null /var/run/utmp
-		    if grep '^utmp:' /etc/group; then
-			chown root:utmp /var/run/utmp
-			chmod 664 /var/run/utmp
-		    else
-			chown root:root /var/run/utmp
-			chmod 644 /var/run/utmp
-		    fi
-		fi
-		if [ -f /var/log/wtmp ]; then
-		    savelog /var/log/wtmp
-		    touch /var/log/wtmp
-		    if grep '^utmp:' /etc/group; then
-			chown root:utmp /var/log/wtmp
-			chmod 664 /var/log/wtmp
-		    else
-			chown root:root /var/log/wtmp
-			chmod 644 /var/log/wtmp
-		    fi
-		fi
-		rm -f /etc/init.d/utmpd
-		update-rc.d utmpd remove > /dev/null
-	    fi
-	fi
-	if [ -f /var/run/utmpx ]; then rm -f /var/run/utmpx; fi
-	if [ -f /var/log/wtmpx ]; then rm -f /var/log/wtmpx*; fi
-	if [ -e /var/run/utmpd.ro ]; then rm -f /var/run/utmpd.ro; fi
-	if [ -e /var/run/utmpd.rw ]; then rm -f /var/run/utmpd.rw; fi
-    fi
+type=$1
+preversion=$2
 
+if [ "$type" = upgrade ]
+then
     # Load debconf module if available
     if [ -f /usr/share/debconf/confmodule ] ; then
         . /usr/share/debconf/confmodule
     fi
-    # NSS authentication trouble guard
-    if dpkg --compare-versions $2 lt 2.6-1; then
 
-	check="gdm kdm proftpd postgresql xscreensaver xdm"
-	# NSS services check: NSS_CHECK
-	if [ -n "$services" ]; then 
-	    if [ -f /usr/share/debconf/confmodule ] ; then
-	        db_version 2.0
-		db_reset glibc/upgrade
-		db_subst glibc/upgrade services $services
-		db_input critical glibc/upgrade || true
-		db_go || true
-		db_get glibc/upgrade
-		answer=$RET
-	    else
-		echo "Name Service Switch update in the GNU C Library"
-		echo
-		echo "Running services and programs that are using NSS need to be restarted,"
-		echo "otherwise they might not be able to do lookup or authentication any more."
-		echo "The installation process is able to restart some services (such as ssh or"
-		echo "telnetd), but other programs cannot be restarted automatically.  One such"
-		echo "program that needs manual stopping and restart after the glibc upgrade by"
-		echo "yourself is xdm - because automatic restart might disconnect your active"
-		echo "X11 sessions."
-		echo
-		echo "This script detected the following installed services which must be"
-		echo "stopped before the upgrade: $services"
-		echo
-		echo "If you want to interrupt the upgrade now and continue later, please"
-		echo "answer No to the question below."
-		echo 
-		frontend=`echo "$DEBIAN_FRONTEND" | tr '[:upper:]' '[:lower:]'`
-		if [ "$frontend" = noninteractive ]; then
-		    echo "Non-interactive mode, upgrade glibc forcibly"
-		    answer=true
+    if [ -n "$preversion" ]; then
+	# NSS authentication trouble guard
+	if dpkg --compare-versions "$preversion" lt 2.6-1; then
+
+	    check="gdm kdm proftpd postgresql xscreensaver xdm"
+	    # NSS services check: NSS_CHECK
+	    if [ -n "$services" ]; then 
+		if [ -f /usr/share/debconf/confmodule ] ; then
+	            db_version 2.0
+		    db_reset glibc/upgrade
+		    db_subst glibc/upgrade services $services
+		    db_input critical glibc/upgrade || true
+		    db_go || true
+		    db_get glibc/upgrade
+		    answer=$RET
 		else
-		    echo -n "Do you want to upgrade glibc now? [Y/n] "
-		    read answer
-		    case $answer in
-			Y*|y*) answer=true ;;
-			N*|n*) answer=false ;;
-			*) answer=true ;;
-		    esac
+		    echo "Name Service Switch update in the GNU C Library"
+		    echo
+		    echo "Running services and programs that are using NSS need to be restarted,"
+		    echo "otherwise they might not be able to do lookup or authentication any more."
+		    echo "The installation process is able to restart some services (such as ssh or"
+		    echo "telnetd), but other programs cannot be restarted automatically.  One such"
+		    echo "program that needs manual stopping and restart after the glibc upgrade by"
+		    echo "yourself is xdm - because automatic restart might disconnect your active"
+		    echo "X11 sessions."
+		    echo
+		    echo "This script detected the following installed services which must be"
+		    echo "stopped before the upgrade: $services"
+		    echo
+		    echo "If you want to interrupt the upgrade now and continue later, please"
+		    echo "answer No to the question below."
+		    echo 
+		    frontend=`echo "$DEBIAN_FRONTEND" | tr '[:upper:]' '[:lower:]'`
+		    if [ "$frontend" = noninteractive ]; then
+			echo "Non-interactive mode, upgrade glibc forcibly"
+			answer=true
+		    else
+		        echo -n "Do you want to upgrade glibc now? [Y/n] "
+		        read answer
+		        case $answer in
+			    Y*|y*) answer=true ;;
+			    N*|n*) answer=false ;;
+			    *) answer=true ;;
+			esac
+		    fi
+		    echo
 		fi
-		echo
-	    fi
 
-	    if [ "x$answer" != "xtrue" ]; then
-	        echo "Stopped glibc upgrade.  Please retry the upgrade after you have"
-	        echo "checked or stopped services by hand."
-	        exit 1
+		if [ "x$answer" != "xtrue" ]; then
+	            echo "Stopped glibc upgrade.  Please retry the upgrade after you have"
+	            echo "checked or stopped services by hand."
+	            exit 1
+		fi
 	    fi
-	fi
-    fi
+	fi # end upgrading and $preversion lt 2.6-1
+    fi # Upgrading
 
     # This will keep us from using hwcap libs (optimized) during an
     # upgrade.
@@ -154,7 +121,7 @@
   return 1
 }
 
-if [ "$1" != abort-upgrade ]
+if [ "$type" != abort-upgrade ]
 then
   ldbytes=`head -c 20 RTLD | od -c`
   dirs="/lib32 /lib64 /usr/local/lib /usr/local/lib32 /usr/local/lib64"
@@ -222,7 +189,7 @@
   fi
 fi
 
-if [ "$1" != abort-upgrade ]
+if [ "$type" != abort-upgrade ]
 then
     # glibc kernel version check: KERNEL_VERSION_CHECK
 fi


Reply to: