[Apt-zip-devel] Proposal to change apt-zip 0.18 to not fail when apt-transport-debtorrent is used.

Howard Abbey hrabbey at yahoo.com
Mon Sep 7 20:37:53 UTC 2009


Hello cate & all,

Apt-zip 0.18 does not support the apt-transport-debtorrent method, but could without too much trouble, and no side effects I can think of.
Not really "support" the method I should say, but transform it into a http via wget method, as apt-zip does with http & ftp.
See the change details below.

I've tested this out on my own machine, using wget-dos download method, but not to a great extent.

Apologies the patches aren't in diff patches format, but I am not comfortable with diff.

My only question /concern / ideas for items that might be improvements are:
-Is '[0-9A-Za-z][0-9A-Za-z.]*:[0-9][0-9]*' the most optimal pattern to match a host or IP address followed by a port?
-Are there other apt methods that would benefit from similar support, such as apt-p2p?
-Would it be better to replace the new sed script with a variable, with the sed script variable set in the apt-zip.conf file?

Thanks for your work on apt-zip, and now I see, apt-offline.  "apt-zip" will make life on dial-up net connection much more bearable, now that I have it working.  

Regards,
Howard Abbey
hrabbey at yahoo.com
--
files changed:
/etc/apt/apt-zip.conf
----------
#change pattern match allowed, adding debtorrent to http, ftp
#line 32:
#Old
--
GREP="^http\|^ftp"
--
#New
--
GREP="^http\|^ftp\|^debtorrent"
--
----------

/usr/bin/apt-zip-list
----------
# Convert debtorrent uris to http
#line 38:
#Old
--
grep $GREP < "$TMP" | tr -d "'" | sed 's/SHA256://' | sort -u > "$TEMP"
--
#New
--
grep $GREP < "$TMP" | tr -d "'" | sed 's/SHA256://' | sed 's/debtorrent:\/\/[0-9A-Za-z][0-9A-Za-z.]*:[0-9][0-9]*\//http:\/\//'| sort -u > "$TEMP"
--

###More simplistic:
# replace: "debtorrent://localhost:9988/" with "http://"
#grep $GREP < "$TMP" | tr -d "'" | sed 's/SHA256://' | sed 's/debtorrent:\/\/localhost:9988\//http:\/\//'| sort -u > "$TEMP"

###Used more generic:
# replace: "debtorrent://*{alphanumeric hostname or dotted IP}:*{port number}/" with "http://"
grep $GREP < "$TMP" | tr -d "'" | sed 's/SHA256://' | sed 's/debtorrent:\/\/[0-9A-Za-z][0-9A-Za-z.]*:[0-9][0-9]*\//http:\/\//'| sort -u > "$TEMP"
--
----------





      



More information about the apt-zip-devel mailing list