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

Re: cross-apt



> I tried this yesterday (being the owner of the laptop in question). I wasn't
> able to pursue it long enough to actually try installing packages, but I was
> able to get apt to look like it was resolving dependencies right. it's a
> little more complicated than the hurd-apt.conf you quoted; apt actually
> looks in dpkg's state data to figure out what packages are already
> installed, so you need to force it to look in a non-default spot. also, the
> quoted hurd-apt.conf doesn't give apt a separate place to store its own
> state, which is kind of important if you're also trying to use apt for the
> host debian-linux system :)
> 
> annoyingly, the configuration parameters telling apt where to look for all
> of these aren't (completely) documented -- I had to look in the apt source
> to find all the available parameters.
> 
> the question of installation scripts was also on my mind while I was doing
> this. ideally, I think, I'd get apt to resolve dependencies and download
> packages from linux, then reboot into the hurd and use dpkg to finish the
> installation natively. I'm hoping to get apt to print out what it would do
> with dpkg without actually doing it, so I can generate a script to be
> executed in the hurd once I reboot.


Yes, I've been trying this myself and am realizing it's a little more complicated that I anticipated. I did find some useful information at:

	/usr/share/doc/apt/offline.html/index.html

It describes how to do a two stage apt-get where you 

1) Sync source from target machine
2) Download via alternate machine
3) Install on target machine

I'm messing around with it right now. It worked for one package, however, http.us.debian.org and kernel.org seem to be down right now, so I'm waiting to try fuller upgrades.

This is my setup:

	/export/home/ijcd/work/hurd-dev/hurd-apt

is the same on both machines. I nfs-mount my Linux home from Hurd. The directory and file layout of that dir looks like:

	.
	./lists/
	./lists/partial/
	./archives
	./archives/partial/
	./sources.list
	./apt.conf
	./status
	./hurd-sync
	./hurd-fetch
	./hurd-install

The last three are scripts that I wrapped the commands in. They are:

==hurd-sync==
#!/bin/bash
 
export APT_CONFIG="/export/home/ijcd/work/hurd-dev/hurd-apt/apt.conf"
cp /var/lib/dpkg/status /export/home/ijcd/work/hurd-dev/hurd-apt/status
=============

==hurd-fetch==
#!/bin/bash
 
export APT_CONFIG="/export/home/ijcd/work/hurd-dev/hurd-apt/apt.conf"
apt-get update
apt-get $*
==============

==hurd-install==
#!/bin/bash
 
export APT_CONFIG="/export/home/ijcd/work/hurd-dev/hurd-apt/apt.conf"
apt-get check
apt-get --no-d -o dir::etc::status=/var/lib/dpkg/status $*
================


The steps I follow to perform an update are:

1) Run hurd-sync on the Hurd machine to place a copy of the status file in the directory.
2) Run hurd-fetch <command> on the Linux machine to update and get whatever I request.
3) Run hurd-install <command> on the Hurd machine to do the install.

This seems to be working fine so far. <command> is typically the same on both machines, but I'm sure it doesn't have to be.

> once I get this all working, I'll post my scripts to the list, if anyone
> else is interested ..?

I'm definitely interested in comparing with whatever you generate as well.

-- Ian

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ian Duggan                    ian@ianduggan.net
                              http://www.ianduggan.net



Reply to: