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

Re: Keeping unstable up2date without internet connection ?



On Sun, Jun 18, 2000 at 10:59:00PM +0200, Markus Fischer wrote:
> On Sun, Jun 18, 2000 at 09:22:28AM +0200, Tomasz Wegrzanowski wrote : 
> > On Sun, Jun 18, 2000 at 12:51:54AM +0200, Markus Fischer wrote:
> > > My problem now: How can I keep up to date with my choosen
> > > unstable machines without burning a full unstable snapshot every
> > > week or so ?
> > > 
> > > I would like to see a way to find out when I am e.g. at home
> > > (with my internet connection) which packages are new compared to
> > > my package tree I have at work. So i can (hopefully automatically
> > > ?) download them and take them with me on my zip drive.
> > 
> > What about :
> > 
> > on notnetted machines:
> > -> dpkg -l | perl -ne '@f=split;print $f[1]," "' >pkg_$(hostname)
> > then:
> > -> cat pkg_* | sort | uniq >pkg_all
> > and:
> > -> apt-get update
> > -> apt_get install -d $(cat pkg_all)
> > -> cp -a /var/cache/apt /mnt/zip
> 
> 	The problem is that I don't want to have all the packages
> installed on my home machine (which still runs slink btw ;) from
> unstable. Can I independently find out which packages I need to
> download ?

General idea is to temportarily overwrite dpkg/apt database.
*Experimental* Method :

zip is UNMOUNTED (files go to rootfs really)

# move local apt to place that will be shadowed
mv /var/cache/apt /mnt/zip/cache/apt
mv /var/state/apt /mnt/zip/state/apt
mv /var/lib/dpkg /mnt/zip/lib/dpkg
ln -s /mnt/zip/cache/apt /var/cache/apt
ln -s /mnt/zip/state/apt /var/state/apt
ln -s /mnt/zip/lib/dpkg /var/lib/dpkg

When you mount zip, 'apt-get update; apt-get install -d *' will all go to zip.
When you umount zip, apt and dpkg will work on local machine.

If you don't want to move /var/... to /mnt/..., you can make dual symlinks :

/var/state/apt     -> /mnt/zip/state/apt
/mnt/zip/state/apt -> /var/state/apt-local
etc.

Foonote 1:
  You don't need to mess with /var/apt/cache really,
  both caches can be the same, but you would need to cp to zip.

Foonote 2:
  It would be much simplier if Linux had shadowfs.
  I wonder why nobody wrote it yet.

Foonote 3:
  As far as this method is concerned, warranty is 8-letter word, nothing more
  But if it worked, please tell me.

Foonote 4:
  If it didn't work, there are always some other ways and half-ways.



Reply to: