r354 - in /debtorrent/trunk: debian/NEWS debian/changelog debian/control debian/debtorrent.postinst debian/rules docs/epydoc.config setup.py

camrdale-guest at users.alioth.debian.org camrdale-guest at users.alioth.debian.org
Fri Jan 25 05:03:04 UTC 2008


Author: camrdale-guest
Date: Fri Jan 25 05:03:01 2008
New Revision: 354

URL: http://svn.debian.org/wsvn/debtorrent/?sc=1&rev=354
Log:
Improve the upgrade to the new binary-all directories.

Added:
    debtorrent/trunk/debian/NEWS
Modified:
    debtorrent/trunk/debian/changelog
    debtorrent/trunk/debian/control
    debtorrent/trunk/debian/debtorrent.postinst
    debtorrent/trunk/debian/rules
    debtorrent/trunk/docs/epydoc.config
    debtorrent/trunk/setup.py

Added: debtorrent/trunk/debian/NEWS
URL: http://svn.debian.org/wsvn/debtorrent/debtorrent/trunk/debian/NEWS?rev=354&op=file
==============================================================================
--- debtorrent/trunk/debian/NEWS (added)
+++ debtorrent/trunk/debian/NEWS Fri Jan 25 05:03:01 2008
@@ -1,0 +1,25 @@
+debtorrent (0.1.16) unstable; urgency=low
+
+  This version of DebTorrent uses a slightly different directory layout
+  than the older version. Torrents are now split into binary-<arch> and
+  binary-all, which facilitates sharing the binary-all packages with
+  peers using a different architecture.
+  
+  The upgrade process will create the new binary-all directories, and
+  move any downloaded Architecture:all packages into their proper
+  place. This will be done for the DebTorrent download directory found
+  in /etc/default/debtorrent-client (usually /var/cache/debtorrent).
+  
+  Once the upgrade is complete, you MUST do an 'apt-get update' to get
+  DebTorrent started using the new directories.
+  
+  One side effect is that DebTorrent will have to re-hash all the
+  downloaded files, which, if you have downloaded a lot of files with
+  DebTorrent, can take some time (and lots of hard drive reading). If
+  you'd rather not do this, you can safely remove the download
+  directories before running 'apt-get update' to start fresh with no
+  downloaded files.
+  
+  Once again, don't forget to 'apt-get update'!
+
+ -- Cameron Dale <camrdale at gmail.com>  Thu, 24 Jan 2008 13:56:24 -0800

Modified: debtorrent/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/debtorrent/debtorrent/trunk/debian/changelog?rev=354&op=diff
==============================================================================
--- debtorrent/trunk/debian/changelog (original)
+++ debtorrent/trunk/debian/changelog Fri Jan 25 05:03:01 2008
@@ -5,6 +5,10 @@
       participate
     - currently supported only by debian testing and unstable
     - see http://wiki.debian.org/DebTorrent/UniquePieces for more info
+  * Switch to using 2 torrents per Packages file: one for architecture-
+    specific files, and one for architecture-independent files
+    - also added a new script split_cache_for_all to ease the upgrade
+      (which is why python-debian is now required)
   * Add torrent names to the tracker display
   * Make the download/upload statistics persist over restarts
   * Report more and better statistics on the tracker's info page

Modified: debtorrent/trunk/debian/control
URL: http://svn.debian.org/wsvn/debtorrent/debtorrent/trunk/debian/control?rev=354&op=diff
==============================================================================
--- debtorrent/trunk/debian/control (original)
+++ debtorrent/trunk/debian/control Fri Jan 25 05:03:01 2008
@@ -12,7 +12,7 @@
 
 Package: debtorrent
 Architecture: all
-Depends: ${python:Depends}, adduser
+Depends: ${python:Depends}, adduser, python-debian
 Suggests: python-psyco
 Recommends: python-crypto, apt-transport-debtorrent (>= 0.2)
 Provides: python-debtorrent

Modified: debtorrent/trunk/debian/debtorrent.postinst
URL: http://svn.debian.org/wsvn/debtorrent/debtorrent/trunk/debian/debtorrent.postinst?rev=354&op=diff
==============================================================================
--- debtorrent/trunk/debian/debtorrent.postinst (original)
+++ debtorrent/trunk/debian/debtorrent.postinst Fri Jan 25 05:03:01 2008
@@ -32,10 +32,46 @@
 		fi
 		
 		mkdir -p /var/cache/debtorrent
-		chown -R root:debtorrent /var/log/debtorrent
-		chown -R root:debtorrent /var/cache/debtorrent
+		chown -R debtorrent:debtorrent /var/log/debtorrent
+		chown -R debtorrent:debtorrent /var/cache/debtorrent
 		chmod -R 775 /var/log/debtorrent
 		chmod -R 775 /var/cache/debtorrent
+		
+		if [ -n "$2" ] && dpkg --compare-versions "$2" lt 0.1.6 ; then
+			# Upgrade for the new separate_all options
+			UPGRADE_FILE=/tmp/debtorrent-pre0.1.6-upgrade
+			echo "Beginning upgrade of debtorrent directories from pre 0.1.6 version"
+			echo "Beginning upgrade of debtorrent directories from pre 0.1.6 version" > $UPGRADE_FILE
+			if [ -r /etc/default/debtorrent-client ] ; then
+				. /etc/default/debtorrent-client
+				echo "Upgrading debtorrent cache..."
+				echo "Upgrading debtorrent cache..." > $UPGRADE_FILE
+				/usr/share/debtorrent/split_cache_for_all $DEBTORRENT_DOWNLOAD_DIR >> $UPGRADE_FILE
+				if [ -z "$DEBTORRENT_CACHE_DIR" ] ; then
+					if [ -z "$DEBTORRENT_DOWNLOAD_DIR" ] ; then
+						DEBTORRENT_CACHE_DIR=/var/cache/debtorrent/.DebTorrent
+					else
+						DEBTORRENT_CACHE_DIR=$DEBTORRENT_DOWNLOAD_DIR/.DebTorrent
+					fi
+				fi
+				if [ -d $DEBTORRENT_CACHE_DIR ] ; then
+					echo "Removing (and saving) the old debtorrent saved state..."
+					echo "Removing (and saving) the old debtorrent saved state..." >> $UPGRADE_FILE
+					mv $DEBTORRENT_CACHE_DIR ${DEBTORRENT_CACHE_DIR}.dpkg-old
+					echo "Moved $DEBTORRENT_CACHE_DIR to ${DEBTORRENT_CACHE_DIR}.dpkg-old" >> $UPGRADE_FILE
+				else
+					echo "WARNING: Could not find the old debtorrent state to remove"
+					echo "WARNING: Could not find the old debtorrent state to remove" >> $UPGRADE_FILE
+				fi
+			else
+				echo "WARNING: Could not upgrade the debtorrent directories"
+				echo "WARNING: Could not upgrade the debtorrent directories" >> $UPGRADE_FILE
+			fi
+			echo "Upgrade of debtorrent directories from pre 0.1.6 version is complete"
+			echo "Upgrade of debtorrent directories from pre 0.1.6 version is complete" >> $UPGRADE_FILE
+			echo "Details of debtorrent directory upgrade are in $UPGRADE_FILE"
+			echo "Don't forget to run 'apt-get update'"
+		fi
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)

Modified: debtorrent/trunk/debian/rules
URL: http://svn.debian.org/wsvn/debtorrent/debtorrent/trunk/debian/rules?rev=354&op=diff
==============================================================================
--- debtorrent/trunk/debian/rules (original)
+++ debtorrent/trunk/debian/rules Fri Jan 25 05:03:01 2008
@@ -50,7 +50,8 @@
 	
 	# Remove the .py from the end of each of these and move them out of
 	# the path
-	for i in test hippy btmakemetafile btcompletedir btreannounce \
+	for i in test hippy split_cache_for_all \
+		btmakemetafile btcompletedir btreannounce \
 		btrename btshowmetainfo btcopyannounce btsetdebmirrors; \
 	do mv debian/debtorrent/usr/bin/$$i.py debian/debtorrent/usr/share/debtorrent/$$i || exit 1; done
 

Modified: debtorrent/trunk/docs/epydoc.config
URL: http://svn.debian.org/wsvn/debtorrent/debtorrent/trunk/docs/epydoc.config?rev=354&op=diff
==============================================================================
--- debtorrent/trunk/docs/epydoc.config (original)
+++ debtorrent/trunk/docs/epydoc.config Fri Jan 25 05:03:01 2008
@@ -3,7 +3,7 @@
 # The list of objects to document. Objects can be named using
 # dotted names, module filenames, or package directory names.
 # Alases for this option include "objects" and "values".
-modules: DebTorrent btcompletedir.py btcopyannounce.py btmakemetafile.py btreannounce.py btrename.py btsetdebmirrors.py btshowmetainfo.py debtorrent-client.py debtorrent-tracker.py hippy.py uniquely.py
+modules: DebTorrent btcompletedir.py btcopyannounce.py btmakemetafile.py btreannounce.py btrename.py btsetdebmirrors.py btshowmetainfo.py debtorrent-client.py debtorrent-tracker.py hippy.py uniquely.py split_cache_for_all.py
 
 # The type of output that should be generated.  Should be one
 # of: html, text, latex, dvi, ps, pdf.

Modified: debtorrent/trunk/setup.py
URL: http://svn.debian.org/wsvn/debtorrent/debtorrent/trunk/setup.py?rev=354&op=diff
==============================================================================
--- debtorrent/trunk/setup.py (original)
+++ debtorrent/trunk/setup.py Fri Jan 25 05:03:01 2008
@@ -32,6 +32,7 @@
     scripts = ["btmakemetafile.py", "btcompletedir.py", "btreannounce.py", 
                "btrename.py", "btshowmetainfo.py", 'btcopyannounce.py',
                'btsetdebmirrors.py', 'test.py', 'hippy.py',
-               'debtorrent-client.py', 'debtorrent-tracker.py'
+               'debtorrent-client.py', 'debtorrent-tracker.py',
+               'split_cache_for_all.py'
         ]
     )




More information about the Debtorrent-commits mailing list