Package: apt-zip
Version: 0.15
Severity: wishlist
Tags: patch

Hi, 
I emailed to suggest this as a wishlist item, and had no response as yet, so 
I've had a go myself. 

If the networked machine is a Debian computer it may already have many of the 
packages needed for the 
un-networked machine in it's apt cache. This patch checks to see, and if found 
copies them to the apt-zip 
medium. If they're not there it downloads them as before. I'm not a scripting 
expert, so please change if 
necessary, but it works for me:

Change the getfile() section to: 

getfile(){
        ( [ -r ../$2 ] &&  check ../$2 $4 $?  &&   echo "$2 already 
downloaded.") ||
        (( [ -r /var/cache/apt/archives/$2 ] &&  check 
/var/cache/apt/archives/$2 $4 $?  &&   echo "$2 
already in Debian package cache$
        (echo "Downloading $2 from the network..." && do_wget $1 $2 $3 $4   &&  
 mv $2 ../))
}


This patch can save a lot of time downloading duplicate packages. Packages are 
md5sum checked as before.

Thanks

Arthur





-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 
'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.18-5-k7
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages apt-zip depends on:
ii  apt                         0.6.46.4-0.1 Advanced front-end for dpkg

apt-zip recommends no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to