simple-cdd with local packages [was: Re: Bandwidth Manager CDD]
On Thu, Apr 28, 2005 at 09:55:23AM +0300, Tzafrir Cohen wrote:
>
> I did have bad experince with debian-cd and with debpartial. Add that to
> the fact that simple-cdd is not yet in Sarge and it depends on a package
> that will not be in Sarge (debpartial-mirror) and you'll understand why
> I never tried it so far.
>
> I'm playing with it now. The first stage is , naturally, to package it.
> Both packages are currently avilable from http://tzafrir.org.il/rapid/ .
> I'll see how it goes.
After some more playing:
I started adapting simple-cdd to support LOCAL and LOCALDEBS in CONF.sh.
Next I noticed that there was zero documentation about the requirement
to run as root. Sadly debian-cd not only runs as root, but also edits as
root files under /usr . OK. Let's hope It won't destroy my system.
debpartial-mirror is *slow* and inefficient at mirroring. It seems to do
the whole mirroring process whenever I run it. Thus running it with
do_mirror=false is a must if you don't have extra hours to spend on
useless downloads.
My local apt source is built with mini-dinstall, which makes flat
sources. debian-cd seems to expect tree sources. I had to run inside my
source directory:
for dir in dists sarge local binary-i386; do
ln -s $dir .
done
But after that it seems to work.
The patch to checkpackages (adds the variable POOLS, and runs find on
every dir in POOLS):
--- /usr/share/simple-cdd/checkpackages 2005-04-28 04:13:39.000000000 +0300
+++ checkpackages 2005-04-30 15:49:31.000000000 +0300
@@ -6,10 +6,17 @@
status=0
+# Hmm: should there be a slash in the end? (Tzafrir)
+POOLS=$MIRROR/pool/main/
+if [ "$LOCAL" = 1 ] && [ "$LOCALDEBS" != "" ]
+then
+ POOLS="$POOLS $LOCALDEBS/"
+fi
+
for profile in $profiles ; do
missing_packages=""
for a in $(test -r profiles/$profile.packages && egrep -v ^# profiles/$profile.packages ); do
- test -z "$(find $MIRROR/pool/main/ -type f -name $a\_*.deb)" && missing_packages="$missing_packages $a"
+ test -z "$(find $POOLS -type f -name $a\_*.deb)" && missing_packages="$missing_packages $a"
done
if [ -n "$missing_packages" ]; then
echo "ERROR: Packages missing from profile $profile : $missing_packages"
@@ -17,7 +24,7 @@
fi
missing_downloads=""
for a in $(test -r profiles/$profile.downloads && egrep -v ^# profiles/$profile.downloads ); do
- test -z "$(find $MIRROR/pool/main/ -type f -name $a\_*.deb)" && missing_downloads="$missing_downloads $a"
+ test -z "$(find $POOLS -type f -name $a\_*.deb)" && missing_downloads="$missing_downloads $a"
done
if [ -n "$missing_downloads" ]; then
echo "WARNING: Extra packages missing from profile $profile : $missing_downloads"
--
Tzafrir Cohen icq#16849755 +972-50-7952406
tzafrir.cohen@xorcom.com http://www.xorcom.com
Reply to: