* During installation debootstrap will complain about an invalid Release file
if there is no Packages file for the local section. Create an empty Packages file if one is missing.
This commit is contained in:
parent
a6e1349b01
commit
0db7484988
|
@ -68,8 +68,11 @@ debian-cd (3.0.4) UNRELEASED; urgency=low
|
|||
are now added in generate_di+k_list. Reduces impact of #410418.
|
||||
* exclude-udebs: exclude any libdirectfb udeb instead of particular version.
|
||||
* exclude-udebs: exclude kbd-udeb and console-setup udebs (not yet used).
|
||||
* During installation debootstrap will complain about an invalid Release file
|
||||
if there is no Packages file for the local section. Create an empty Packages
|
||||
file if one is missing.
|
||||
|
||||
-- Frans Pop <fjp@debian.org> Mon, 17 Dec 2007 21:54:11 +0100
|
||||
-- Frans Pop <fjp@debian.org> Sun, 06 Jan 2008 00:44:19 +0100
|
||||
|
||||
debian-cd (3.0.3) unstable; urgency=low
|
||||
|
||||
|
|
|
@ -347,6 +347,24 @@ sub check_base_installable {
|
|||
return $ok;
|
||||
}
|
||||
|
||||
# If missing, create an empty local Packages file for an architecture.
|
||||
# Only create an uncompressed Packages file; the call to recompress will
|
||||
# create the compressed version.
|
||||
sub add_missing_Packages {
|
||||
my ($filename);
|
||||
|
||||
$filename = $File::Find::name;
|
||||
|
||||
if ((-d "$_") && ($filename =~ m/\/main\/binary-[^\/]*$/)) {
|
||||
if ((-f "$_/Packages") && (! -d "../local/$_/")) {
|
||||
mkdir "../local/$_/" || die "Error creating directory local/$_: $!\n";
|
||||
open(LPFILE, ">../local/$_/Packages") or die "Error creating local/$_/Packages: $!\n";
|
||||
close LPFILE;
|
||||
print " Created empty Packages file for local/$_\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub md5_file {
|
||||
my $filename = shift;
|
||||
my ($md5, $st);
|
||||
|
@ -532,6 +550,15 @@ sub finish_disc {
|
|||
|
||||
chdir $cddir;
|
||||
|
||||
# If we have a local packages directory, ensure we have a Packages file
|
||||
# for all included architectures as otherwise the Release file will be
|
||||
# invalid. This can happen if we do have local udebs but no local
|
||||
# regular packages, or multiple architectures with not all of them
|
||||
# having local packages.
|
||||
if (-d "./dists/$codename/local") {
|
||||
find (\&add_missing_Packages, "./dists/$codename/main/");
|
||||
}
|
||||
|
||||
print " Finishing off the Release file\n";
|
||||
chdir "dists/$codename";
|
||||
open(RELEASE, ">>Release") || die "Failed to open Release file: $!\n";
|
||||
|
|
Loading…
Reference in New Issue