* It seems the changes for 3.0.0 completely broke extranonfree
support. Re-add it.
This commit is contained in:
parent
4a72ff11a1
commit
0d3c11551e
3
Makefile
3
Makefile
|
@ -58,6 +58,7 @@ make_image=$(BASEDIR)/tools/make_image
|
|||
merge_package_lists=$(BASEDIR)/tools/merge_package_lists
|
||||
update_popcon=$(BASEDIR)/tools/update_popcon
|
||||
update_tasks=$(BASEDIR)/tools/update_tasks
|
||||
grab_source_list=$(BASEDIR)/tools/grab_source_list
|
||||
|
||||
BDIR=$(TDIR)/$(CODENAME)
|
||||
ADIR=$(APTTMP)
|
||||
|
@ -350,7 +351,7 @@ image-trees: ok genlist
|
|||
ARCH=$$ARCH $(list2cds) $(BDIR)/list $(SIZELIMIT); \
|
||||
done
|
||||
$(Q)if [ "$(SOURCEONLY)"x = "yes"x ] ; then \
|
||||
awk '{printf("source:%s\n",$$0)}' $(BDIR)/list > $(BDIR)/packages; \
|
||||
$(grab_source_list) $(BDIR) $(ADIR) $(BDIR)/list $(BDIR)/packages; \
|
||||
else \
|
||||
$(merge_package_lists) $(BDIR) $(ADIR) "$(ARCHES)" $(BDIR)/packages; \
|
||||
fi
|
||||
|
|
|
@ -16,8 +16,10 @@ debian-cd (3.0.3) UNRELEASED; urgency=high
|
|||
* Removed m68k from the list of arches in generate_di+k_list and
|
||||
generate_di_list to reduce warnings.
|
||||
* Updated comments in update-cd; potato was a while ago!
|
||||
* It seems the changes for 3.0.0 completely broke extranonfree
|
||||
support. Re-add it.
|
||||
|
||||
-- Frans Pop <fjp@debian.org> Wed, 11 Apr 2007 01:30:06 +0200
|
||||
-- Steve McIntyre <93sam@debian.org> Fri, 20 Apr 2007 00:37:09 +0100
|
||||
|
||||
debian-cd (3.0.2) unstable; urgency=high
|
||||
|
||||
|
|
|
@ -306,7 +306,7 @@ sub add_packages {
|
|||
}
|
||||
|
||||
my $pkg = shift;
|
||||
my ($arch, $pkgname) = split /:/, $pkg;
|
||||
my ($arch, $component, $pkgname) = split /:/, $pkg;
|
||||
|
||||
msg_ap(0, "Looking at $pkg: arch $arch, package $pkgname, rollback $rollback\n");
|
||||
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
#!/bin/sh
|
||||
|
||||
BDIR=$1
|
||||
ADIR=$2
|
||||
IN="$3"
|
||||
OUT="$4"
|
||||
|
||||
echo "DONEDONE" > $BDIR/DONE
|
||||
awk '
|
||||
/^Package:/ {
|
||||
srcname=$2
|
||||
srcs_done++
|
||||
}
|
||||
|
||||
/^Section: non-free/ {
|
||||
component[srcname]="non-free"
|
||||
next
|
||||
}
|
||||
|
||||
/^Section: contrib/ {
|
||||
component[srcname]="contrib"
|
||||
next
|
||||
}
|
||||
|
||||
/^Section:/ {
|
||||
component[srcname]="main"
|
||||
next
|
||||
}
|
||||
|
||||
/^DONEDONE/ {
|
||||
parsed=1
|
||||
next
|
||||
}
|
||||
|
||||
/.*/ {
|
||||
if (parsed) {
|
||||
printf("source:%s:%s\n", component[$0], $0)
|
||||
}
|
||||
}
|
||||
' $ADIR/$CODENAME-source/apt-state/lists/*Sources $BDIR/DONE $IN > $BDIR/list.mid
|
||||
|
||||
if [ "$NONFREE"x = "1"x ] ; then
|
||||
cat $BDIR/list.mid > $OUT
|
||||
else
|
||||
grep -v :non-free: $BDIR/list.mid > $OUT
|
||||
fi
|
||||
|
||||
if [ "$EXTRANONFREE"x = "1"x ] ; then
|
||||
grep :non-free: $BDIR/list.mid >> $OUT
|
||||
fi
|
|
@ -16,8 +16,6 @@ my $limit = $ENV{'SIZELIMIT1'} || $deflimit;
|
|||
|
||||
my $nonfree = $ENV{'NONFREE'} || 0;
|
||||
my $extranonfree = $ENV{'EXTRANONFREE'} || 0;
|
||||
my $nonus = $ENV{'NONUS'} || 0;
|
||||
my $forcenonusoncd1 = $ENV{'FORCENONUSONCD1'} || 0;
|
||||
my $local = $ENV{'LOCAL'} || 0;
|
||||
my $complete = $ENV{'COMPLETE'} || 0;
|
||||
my $exclude = "$list.exclude";
|
||||
|
@ -60,8 +58,6 @@ msg(1, "Complete selected packages with all the rest: ");
|
|||
msg(1, yesno($complete)."\n");
|
||||
msg(1, "Include non-free packages: ");
|
||||
msg(1, yesno($nonfree)."\n");
|
||||
msg(1, "Include non-US packages: ");
|
||||
msg(1, yesno($nonus)."\n");
|
||||
msg(1, "======================================================================
|
||||
");
|
||||
|
||||
|
@ -83,6 +79,14 @@ while (defined($_=<AVAIL>)) {
|
|||
$packages{$p}{"Suggests"} = [];
|
||||
$packages{$p}{"Recommends"} = [];
|
||||
$packages{$p}{"IsUdeb"} = ($packages{$p}{"Filename"} =~ /.udeb$/) ? 1 : 0;
|
||||
if ($packages{$p}{"Section"} =~ /contrib\//) {
|
||||
$packages{$p}{"Component"} = "contrib";
|
||||
} elsif ($packages{$p}{"Section"} =~ /non-free\//) {
|
||||
$packages{$p}{"Component"} = "non-free";
|
||||
} else {
|
||||
$packages{$p}{"Component"} = "main";
|
||||
}
|
||||
|
||||
}
|
||||
close AVAIL or die "apt-cache failed : $@ ($!)\n";
|
||||
$/ = $oldrs;
|
||||
|
@ -91,7 +95,7 @@ $/ = $oldrs;
|
|||
%excluded = %included;
|
||||
my $count_excl = 0;
|
||||
|
||||
# Now exclude packages because of the non-free and non-us rules
|
||||
# Now exclude packages because of the non-free rules
|
||||
if (not $nonfree) {
|
||||
foreach (grep { $packages{$_}{"Section"} =~ /non-free/ }
|
||||
(keys %packages)) {
|
||||
|
@ -99,13 +103,6 @@ if (not $nonfree) {
|
|||
$count_excl++;
|
||||
}
|
||||
}
|
||||
if (not $nonus) {
|
||||
foreach (grep { $packages{$_}{"Section"} =~ /non-US/ }
|
||||
(keys %packages)) {
|
||||
$excluded{$_} = 'nonus';
|
||||
$count_excl++;
|
||||
}
|
||||
}
|
||||
|
||||
msg(1, "Statistics:
|
||||
Number of packages: @{ [scalar(keys %packages)] }
|
||||
|
@ -223,6 +220,8 @@ if ($extranonfree and (! $nonfree))
|
|||
{
|
||||
my ($p, @toinclude);
|
||||
|
||||
msg(0, " Adding non-free packages now\n");
|
||||
|
||||
# Finally accept non-free packages ...
|
||||
foreach $p (grep { $excluded{$_} eq "nonfree" } (keys %excluded))
|
||||
{
|
||||
|
@ -230,16 +229,10 @@ if ($extranonfree and (! $nonfree))
|
|||
push @toinclude, $p;
|
||||
}
|
||||
|
||||
# Start a new CD
|
||||
$cd++;
|
||||
$cd_size = 0;
|
||||
$limit = $ENV{"SIZELIMIT$cd"} || $deflimit;
|
||||
msg(0, "Limit for non-free CD $cd is $limit.\n");
|
||||
|
||||
# Include non-free packages
|
||||
foreach $p (@toinclude)
|
||||
{
|
||||
add_package($p, 1, 1);
|
||||
add_package(lc $p, 1, 1);
|
||||
}
|
||||
|
||||
# If a contrib package was listed in the list of packages to
|
||||
|
@ -259,8 +252,12 @@ if ($extranonfree and (! $nonfree))
|
|||
"(ignored)\n");
|
||||
next;
|
||||
}
|
||||
if ($packages{lc $p}{"IsUdeb"}) {
|
||||
msg(2, " Ignoring udeb $p ...\n");
|
||||
} else {
|
||||
add_package (lc $_, 1, 1);
|
||||
}
|
||||
}
|
||||
close LIST;
|
||||
|
||||
# Try to include other packages that could not be included
|
||||
|
@ -272,7 +269,11 @@ if ($extranonfree and (! $nonfree))
|
|||
grep { not ($included{$_} or $excluded{$_}) }
|
||||
keys %packages)
|
||||
{
|
||||
add_package ($p, 0, 0);
|
||||
if ($packages{lc $p}{"IsUdeb"}) {
|
||||
msg(2, " Ignoring udeb $p ...\n");
|
||||
} else {
|
||||
add_package (lc $p, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -297,7 +298,8 @@ foreach (sort { $a <=> $b } keys %cds) {
|
|||
open(CDLIST, "> $dir/packages.$arch")
|
||||
|| die "Can't write in $dir/$_.packages.$arch: $!\n";
|
||||
foreach (@{$cds{$_}}) {
|
||||
print CDLIST "$arch:$_\n";
|
||||
my $component = $packages{$_}{"Component"};
|
||||
print CDLIST "$arch:$component:$_\n";
|
||||
$count++;
|
||||
}
|
||||
close CDLIST;
|
||||
|
|
|
@ -9,7 +9,7 @@ use Digest::MD5;
|
|||
use File::stat;
|
||||
use File::Find;
|
||||
|
||||
my ($basedir, $mirror, $tdir, $codename, $archlist, $mkisofs, $maxcds);
|
||||
my ($basedir, $mirror, $tdir, $codename, $archlist, $mkisofs, $maxcds, $extranonfree);
|
||||
my $mkisofs_opts = "";
|
||||
my $mkisofs_dirs = "";
|
||||
my (@arches, @arches_nosrc, @overflowlist, @pkgs_added);
|
||||
|
@ -35,6 +35,12 @@ if (defined($ENV{'MAXCDS'})) {
|
|||
$maxcds = 0;
|
||||
}
|
||||
|
||||
if (defined($ENV{'EXTRANONFREE'})) {
|
||||
$extranonfree = $ENV{'EXTRANONFREE'};
|
||||
} else {
|
||||
$extranonfree = 1;
|
||||
}
|
||||
|
||||
my $list = "$tdir/list";
|
||||
my $list_ex = "$tdir/list.exclude";
|
||||
my $bdir = "$tdir/$codename";
|
||||
|
@ -157,7 +163,7 @@ while (defined (my $pkg = <INLIST>)) {
|
|||
# lists intersect and we should re-include some packages
|
||||
if (scalar @unexclude_packages && scalar @excluded_package_list) {
|
||||
foreach my $reinclude_pkg (@excluded_package_list) {
|
||||
my ($arch, $pkgname) = split /:/, $reinclude_pkg;
|
||||
my ($arch, $component, $pkgname) = split /:/, $reinclude_pkg;
|
||||
foreach my $entry (@unexclude_packages) {
|
||||
if (($pkgname =~ /^\Q$entry\E$/m)) {
|
||||
print LOG "Re-including $reinclude_pkg due to match on \"\^$entry\$\"\n";
|
||||
|
@ -179,10 +185,19 @@ while (defined (my $pkg = <INLIST>)) {
|
|||
$pkgs_this_cd++;
|
||||
$pkgs_done++;
|
||||
}
|
||||
}
|
||||
} # end of creating new CD dir
|
||||
|
||||
if (should_exclude_package($pkg)) {
|
||||
push(@excluded_package_list, $pkg);
|
||||
} elsif (should_start_extra_nonfree($pkg)) {
|
||||
print LOG "Starting on extra non-free CDs\n";
|
||||
finish_disc($cddir, "");
|
||||
# And reset, to start the next disc
|
||||
$size = 0;
|
||||
$disknum++;
|
||||
undef(@pkgs_added);
|
||||
# Put this package first on the next disc
|
||||
push (@overflowlist, $pkg);
|
||||
} else {
|
||||
$guess_size = int($hfs_mult * add_packages($cddir, $pkg));
|
||||
$size += $guess_size;
|
||||
|
@ -237,9 +252,21 @@ close(LOG);
|
|||
# Local helper functions
|
||||
#
|
||||
#############################################
|
||||
sub should_start_extra_nonfree {
|
||||
my $pkg = shift;
|
||||
my ($arch, $component, $pkgname) = split /:/, $pkg;
|
||||
|
||||
if ( ($component eq "non-free") && $extranonfree) {
|
||||
$extranonfree = 0; # Flag that we don't need to start new next time!
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub should_exclude_package {
|
||||
my $pkg = shift;
|
||||
my ($arch, $pkgname) = split /:/, $pkg;
|
||||
my ($arch, $component, $pkgname) = split /:/, $pkg;
|
||||
my $should_exclude = 0;
|
||||
|
||||
foreach my $entry (@exclude_packages) {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# expects multiple files containing lines of the form, one arch per file
|
||||
#
|
||||
# <arch>:<pkgname>
|
||||
# <arch>:<component>:<pkgname>
|
||||
#
|
||||
# and will output similar
|
||||
#
|
||||
|
@ -89,7 +89,8 @@ if [ $source = "yes" ] ; then
|
|||
if (parsed) {
|
||||
split($0,fields,":")
|
||||
arch=fields[1]
|
||||
pkg=fields[2]
|
||||
component=fields[2]
|
||||
pkg=fields[3]
|
||||
source=bin2src[pkg]
|
||||
if (!included[source]) {
|
||||
printf("# Adding source %s at %d because of %s:%s\n",
|
||||
|
@ -129,12 +130,12 @@ echo "# Ending merge pass 1 at "`date` >> $BDIR/list.mid
|
|||
# again
|
||||
grep -v ^# $BDIR/list.mid | awk -F : '
|
||||
{
|
||||
if (!($3 in add))
|
||||
if (!($4 in add))
|
||||
{
|
||||
pkgname[number_packages++] = $3
|
||||
pkgname[number_packages++] = $4
|
||||
}
|
||||
gsub("aaaaaaaaaaaaaaaaaa", "source", $2) # Undo the source sorting hack
|
||||
add[$3] = add[$3] $2 ":" $3 " "
|
||||
add[$4] = add[$4] $2 ":" $3 ":" $4 " "
|
||||
}
|
||||
END {
|
||||
for (i = 0; i < number_packages; i++)
|
||||
|
|
Loading…
Reference in New Issue