[apt-proxy-devel] r719 - in trunk: bin debian debian/po doc

Xavier Lüthi xluthi at alioth.debian.org
Thu Dec 17 13:58:05 UTC 2009


Author: xluthi
Date: Thu Dec 17 13:58:04 2009
New Revision: 719

Log:
* Remove all code for transition from very old packages (<1.9) (Closes: #378095).
* Rename config file to apt-proxy.conf instead of apt-proxy-v2.conf.

Added:
   trunk/debian/preinst
Deleted:
   trunk/bin/apt-proxy-v1tov2
   trunk/debian/config
   trunk/debian/po/
   trunk/debian/prerm
   trunk/debian/templates
   trunk/doc/apt-proxy-v1tov2.8
Modified:
   trunk/debian/changelog
   trunk/debian/control
   trunk/debian/install
   trunk/debian/postinst
   trunk/debian/postrm
   trunk/debian/rules
   trunk/doc/po4a.cfg

Modified: trunk/debian/changelog
==============================================================================
--- trunk/debian/changelog	Wed Dec 16 13:29:27 2009	(r718)
+++ trunk/debian/changelog	Thu Dec 17 13:58:04 2009	(r719)
@@ -1,5 +1,6 @@
-apt-proxy (1.9.37) UNRELEASED; urgency=low
+apt-proxy (1.9.37) unstable; urgency=low
 
+  [ Chris Halls ]
   * Ensure that the status of a file is always reset, even if the download
     does not complete (Closes: #428505)
   * Fix complete_clientless_downloads so apt-proxy stops downloading when
@@ -11,7 +12,11 @@
     were already closed
   * Add more unit tests
 
- -- Chris Halls <halls at debian.org>  Fri, 31 Aug 2007 18:09:07 +0100
+  [ Xavier Lüthi ]
+  * Remove obsolete code for transition from apt-proxy < 1.9.x 
+   (Closes: #378095).
+
+ -- Xavier Lüthi <xluthi at debian.org>  Wed, 16 Dec 2009 16:02:35 +0100
 
 apt-proxy (1.9.36.4) unstable; urgency=low
 

Modified: trunk/debian/control
==============================================================================
--- trunk/debian/control	Wed Dec 16 13:29:27 2009	(r718)
+++ trunk/debian/control	Thu Dec 17 13:58:04 2009	(r719)
@@ -6,12 +6,12 @@
 Standards-Version: 3.8.3
 Homepage: http://alioth.debian.org/projects/apt-proxy/
 XS-Python-Version: current
-Build-Depends: debhelper (>= 7), po-debconf
+Build-Depends: debhelper (>= 7)
 Build-Depends-Indep: help2man, python-twisted-web (>= 0.6), python (>= 2.3.5), python-apt, po4a (>= 0.18.1), python-central (>= 0.5)
 
 Package: apt-proxy
 Architecture: all
-Depends: ${misc:Depends},debconf (>= 0.5.00) | debconf-2.0, ${python:Depends}, python-twisted-web (>= 0.6), python-apt (>= 0.5.8), bzip2, logrotate, adduser
+Depends: ${misc:Depends}, ${python:Depends}, python-twisted-web (>= 0.6), python-apt (>= 0.5.8), bzip2, logrotate, adduser
 Conflicts: apt-proxy-v2 (<= 1.9.5)
 Replaces: apt-proxy-v2 (<= 1.9.5)
 Suggests: rsync

Modified: trunk/debian/install
==============================================================================
--- trunk/debian/install	Wed Dec 16 13:29:27 2009	(r718)
+++ trunk/debian/install	Thu Dec 17 13:58:04 2009	(r719)
@@ -1,6 +1,5 @@
 doc/apt-proxy.conf etc/apt-proxy
 bin/apt-proxy usr/sbin
 bin/apt-proxy-import usr/sbin
-bin/apt-proxy-v1tov2 usr/sbin
 apt_proxy/*.py usr/lib/python2.3/site-packages/apt_proxy
 apt_proxy/twisted_compat/*.py usr/lib/python2.3/site-packages/apt_proxy/twisted_compat

Modified: trunk/debian/postinst
==============================================================================
--- trunk/debian/postinst	Wed Dec 16 13:29:27 2009	(r718)
+++ trunk/debian/postinst	Thu Dec 17 13:58:04 2009	(r719)
@@ -6,10 +6,8 @@
 APTPROXY_LOGFILE=/var/log/$NAME.log
 CACHEDIR=/var/cache/apt-proxy
 
-. /usr/share/debconf/confmodule
-db_version 2.0
+PREV="$2"
 
-set -e
 case "$1" in
     configure)
         # Check if the user exist and do what is needed
@@ -27,39 +25,11 @@
         chown $APTPROXY_USER:adm $APTPROXY_LOGFILE
         chmod 640 $APTPROXY_LOGFILE
 
-        PREV="$2"
-        db_fget $NAME/upgrading-v2 had_v2_conf || true
-        had_v2_conf=$RET
-
-        if dpkg --compare-versions "$PREV"  lt-nl 1.9; then
-            if [ -x /usr/sbin/update-inetd ]; then
-              echo "Disabling inetd's apt-proxy v1 line."
-              update-inetd --comment-chars "#<apt-proxy-v2># " --disable 9999
-            fi
-        fi
-        if
-            dpkg --compare-versions "$PREV"  lt-nl 1.9 && ( ! $had_v2_conf ) \
-            && [ -r /etc/apt-proxy/apt-proxy.conf ]
-        then
-            echo Customising configuration file based on old settings.
-            cp -a --backup=numbered /etc/apt-proxy/apt-proxy-v2.conf \
-                        /etc/apt-proxy/apt-proxy-v2.conf.backup
-            OUTPUT=$(apt-proxy-v1tov2 /etc/apt-proxy/apt-proxy.conf \
-                                        /etc/apt-proxy/apt-proxy-v2.conf.backup\
-                                        2>&1 \
-                                        > /etc/apt-proxy/apt-proxy-v2.conf )
-            echo "$OUTPUT" > /var/log/apt-proxy-v1tov2.log
-            chown aptproxy:adm /var/log/apt-proxy-v1tov2.log
-            chmod 640 /var/log/apt-proxy-v1tov2.log
-            echo "The log of conversion was save in /var/log/apt-proxy-v1tov2.log."
-        fi
-        # Older versions got database permissions wrong #288829
-        if dpkg --compare-versions "$PREV" lt-nl 1.9.27; then
-            if [ -d /var/cache/apt-proxy/.apt-proxy ]; then
-                echo "Fixing database owner."
-                chown -R aptproxy:nogroup /var/cache/apt-proxy/.apt-proxy
-            fi
-        fi
+
+        #if dpkg --compare-versions "$PREV"  lt-nl 1.9.36.4 && [ -r /etc/apt-proxy/apt-proxy-v2.conf ]; then
+		# rename apt-proxy-v2.conf to apt-proxy.conf
+	#	echo renaming config file...
+        #fi
         ;;
     abort-upgrade|abort-remove|abort-deconfigure)
         ;;
@@ -68,8 +38,6 @@
         ;;
 esac
 
-db_stop
-
 #DEBHELPER#
 
 exit 0

Modified: trunk/debian/postrm
==============================================================================
--- trunk/debian/postrm	Wed Dec 16 13:29:27 2009	(r718)
+++ trunk/debian/postrm	Thu Dec 17 13:58:04 2009	(r719)
@@ -18,3 +18,9 @@
   #fi
 fi
 
+# rename configuration file if needed
+if [ "$1" = "abort-upgrade" ] && dpkg --compare-versions "$2" ge "1.9.37" ; then
+	if [ -r /etc/apt-proxy/apt-proxy.conf ] && ![ -r /etc/apt-proxy/apt-proxy-v2.conf ]; then
+		mv /etc/apt-proxy/apt-proxy.conf /etc/apt-proxy/apt-proxy-v2.conf
+	fi
+fi

Added: trunk/debian/preinst
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/debian/preinst	Thu Dec 17 13:58:04 2009	(r719)
@@ -0,0 +1,28 @@
+#! /bin/sh
+set -e
+
+NAME=apt-proxy
+
+PREV="$2"
+
+case "$1" in
+    install|upgrade)
+	if [ -n "$PREV" ] && dpkg --compare-versions "$PREV" lt "1.9.37" ; then
+		# This is NOT a fresh install, a previous version of the package is either installed
+		# or configured (i.e. previous package deinstalled but not purged).
+		if [ -r /etc/apt-proxy/apt-proxy-v2.conf ]; then
+			mv /etc/apt-proxy/apt-proxy-v2.conf /etc/apt-proxy/apt-proxy.conf
+		fi
+	fi
+
+        ;;
+    abort-upgrade)
+        ;;
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        ;;
+esac
+
+#DEBHELPER#
+
+exit 0

Modified: trunk/debian/rules
==============================================================================
--- trunk/debian/rules	Wed Dec 16 13:29:27 2009	(r718)
+++ trunk/debian/rules	Thu Dec 17 13:58:04 2009	(r719)
@@ -18,7 +18,7 @@
 	rm -f build-stamp install-stamp AptProxy-shutdown-2.tap
 	find . -name "*.pyc" |xargs -r rm
 	find . -name "*.tmlc" |xargs -r rm
-	debconf-updatepo
+	#debconf-updatepo
 	dh_clean
 
 install: install-stamp
@@ -28,7 +28,7 @@
 	dh_prep
 	dh_installdirs
 	dh_install
-	dh_installdebconf
+	#dh_installdebconf
 	dh_installdocs
 	dh_installexamples
 	dh_installman
@@ -38,21 +38,6 @@
 	dh_python
 	dh_installinit
 	
-	#install -g root -o root -m 755 \
-	#	apt-proxy debian/apt-proxy/usr/sbin/apt-proxy
-	#install -g root -o root -m 755 \
-	#	apt-proxy-import debian/apt-proxy/usr/sbin/apt-proxy-import
-	#install -g root -o root -m 644 \
-	#	apt-proxy.conf debian/apt-proxy/etc/apt-proxy/apt-proxy.conf
-	
-	# Temporary rename to apt-proxy.conf to make it easier to
-	# upgrade/downgrade between v1 and v2.
-	mv $(PKGDIR)/etc/apt-proxy/apt-proxy.conf $(PKGDIR)/etc/apt-proxy/apt-proxy-v2.conf
-	
-	# lintian overrides 
-	# install -m 755 -d $(PKGDIR)/usr/share/lintian/overrides
-	# install -m 644 debian/apt-proxy.lintian.overrides $(PKGDIR)/usr/share/lintian/overrides/apt-proxy
-	
 	touch install-stamp
 
 binary-arch: build install

Modified: trunk/doc/po4a.cfg
==============================================================================
--- trunk/doc/po4a.cfg	Wed Dec 16 13:29:27 2009	(r718)
+++ trunk/doc/po4a.cfg	Thu Dec 17 13:58:04 2009	(r719)
@@ -2,4 +2,3 @@
 [type: man] doc/apt-proxy.8 fr:doc/apt-proxy.fr.8 add_fr:doc/apt-proxy.add.fr
 [type: man] doc/apt-proxy.conf.5 fr:doc/apt-proxy.conf.fr.5 add_fr:doc/apt-proxy.add.fr
 [type: man] doc/apt-proxy-import.8 fr:doc/apt-proxy-import.fr.8 add_fr:doc/apt-proxy.add.fr
-[type: man] doc/apt-proxy-v1tov2.8 fr:doc/apt-proxy-v1tov2.fr.8 add_fr:doc/apt-proxy.add.fr



More information about the apt-proxy-devel mailing list