A few problems with incuding local packages
Hi,
I filed this as Bug#258029 but Raphael asked me to discuss it here
and work it into CVS if appropriate.
----
I noticed two problems when using packages from a local directory.
1. The directory for the packages file in a local tree
for the debian installer is not created.
That is, dists/$CODENAME/local/debian-installer/binary-$ARCH
is not created, even if $LOCAL is set and
${LOCALDEBS:-$MIRROR}/dists/$DI_CODENAME/local/debian-installer
exists.
Similarly, dists/$CODENAME/local/binary-$ARCH and
dists/$CODENAME/local/source are not created even if $LOCAL is set.
In a nutshell, local .debs .udebs will get installed on the CD but
debian-installer will not be able to find them as the Packages files
will not exist.
The attached patch, debian-cd-add_dirs-local_dirs.patch
(Actually, on reviwing this, I am not sure that
the check for the existance of
${LOCALDEBS:-$MIRROR}/dists/$DI_CODENAME/local/debian-installer
is needed, but is seems harmless.)
2. The $PREFIX.generate-binary-debian-installer file created for
a local instance of the debian installer is bogus as it lacks
the FileList line.
This means that the resulting packages file will be empty
and as a result local .udebs will be not be able to be found
by debian-installer, even though they are present on the CD.
The attached patch, debian-cd-scanpackages_local.patch,
resolves this problem.
--
Horms
Index: add_dirs
===================================================================
RCS file: /cvs/debian-boot/debian-cd/tools/add_dirs,v
retrieving revision 1.12
diff -u -r1.12 add_dirs
--- add_dirs 8 Mar 2004 13:43:40 -0000 1.12
+++ add_dirs 7 Jul 2004 08:32:19 -0000
@@ -44,6 +44,10 @@
mkdir -p dists/$CODENAME/non-free/binary-$ARCH
mkdir -p dists/$CODENAME/non-free/source
fi
+
+if [ -n "$LOCAL" -a -e "${LOCALDEBS:-$MIRROR}/dists/$DI_CODENAME/local/debian-installer" ]; then
+ mkdir -p dists/$CODENAME/local/debian-installer/binary-$ARCH
+fi
if [ -e "$MIRROR/dists/$DI_CODENAME/main/debian-installer" ]; then
mkdir -p dists/$CODENAME/main/debian-installer/binary-$ARCH
fi
@@ -74,3 +78,7 @@
fi
fi
+if [ -n "$LOCAL" ]; then
+ mkdir -p dists/$CODENAME/local/binary-$ARCH
+ mkdir -p dists/$CODENAME/local/source
+fi
Index: scanpackages
===================================================================
RCS file: /cvs/debian-boot/debian-cd/tools/scanpackages,v
retrieving revision 1.26
diff -u -r1.26 scanpackages
--- scanpackages 8 Mar 2004 13:43:40 -0000 1.26
+++ scanpackages 7 Jul 2004 08:33:03 -0000
@@ -218,6 +218,7 @@
cat >>$PREFIX.generate-binary-debian-installer <<EOF
Tree "dists/$CODENAME/local" {
+ FileList "$PREFIX.filelist_local";
Sections "debian-installer";
Architectures "$ARCH";
Reply to: