* Added exclude feature for source packages and un-exclude feature
for binary packages.
This commit is contained in:
parent
966cf8eda6
commit
750974edcd
10
CONF.sh
10
CONF.sh
|
@ -87,3 +87,13 @@ export APTTMP=/ftp/tmp/apt
|
|||
# uncoment this to make build_all.sh try to build a simple CD image if
|
||||
# the proper official CD run does not work
|
||||
#ATTEMPT_FALLBACK=yes
|
||||
|
||||
# We don't want certain packages to take up space on CD1...
|
||||
#export EXCLUDE="$BASEDIR"/tasks/exclude-potato
|
||||
# ...but they are okay for other CDs (UNEXCLUDEx == may be included on CD >= x)
|
||||
#export UNEXCLUDE2="$BASEDIR"/tasks/unexclude-CD2-potato
|
||||
# Any packages listed in EXCLUDE but not in any UNEXCLUDE will be
|
||||
# excluded completely.
|
||||
|
||||
# We also exclude some source packages
|
||||
#export SRCEXCLUDE="$BASEDIR"/tasks/exclude-src-potato
|
||||
|
|
|
@ -75,3 +75,20 @@ export APTTMP=/home/ftp/tmp/apt
|
|||
# export MKISOFS=/usr/bin/mkhybrid
|
||||
# export MKISOFS_OPTS="-a -r -T" #For normal users
|
||||
# export MKISOFS_OPTS="-a -r -F . -T" #For symlink farmers
|
||||
|
||||
# uncomment this to if you want to see more of what the Makefile is doing
|
||||
#export VERBOSE_MAKE=1
|
||||
|
||||
# uncoment this to make build_all.sh try to build a simple CD image if
|
||||
# the proper official CD run does not work
|
||||
#ATTEMPT_FALLBACK=yes
|
||||
|
||||
# We don't want certain packages to take up space on CD1...
|
||||
#export EXCLUDE="$BASEDIR"/tasks/exclude-potato
|
||||
# ...but they are okay for other CDs (UNEXCLUDEx == may be included on CD >= x)
|
||||
#export UNEXCLUDE2="$BASEDIR"/tasks/unexclude-CD2-potato
|
||||
# Any packages listed in EXCLUDE but not in any UNEXCLUDE will be
|
||||
# excluded completely.
|
||||
|
||||
# We also exclude some source packages
|
||||
#export SRCEXCLUDE="$BASEDIR"/tasks/exclude-src-potato
|
||||
|
|
|
@ -18,6 +18,8 @@ debian-cd (2.2.4) unstable; urgency=low
|
|||
* Some esthetic corrections to the Makefile.
|
||||
* Updated the popularity-contest file.
|
||||
* Redesigned and updated README to match new www.debian.org style.
|
||||
* Added exclude feature for source packages and un-exclude feature
|
||||
for binary packages.
|
||||
|
||||
-- Raphael Hertzog <hertzog@debian.org> Sat, 14 Apr 2001 22:48:19 +0200
|
||||
|
||||
|
|
|
@ -132,6 +132,24 @@ while (defined($_ = <SOURCES>)) {
|
|||
|
||||
$/ = $oldrs;
|
||||
|
||||
|
||||
# Get the list of excluded packages
|
||||
my $exclude = $ENV{'SRCEXCLUDE'} || "sorry-no-srcexclude";
|
||||
if (-e $exclude) {
|
||||
open (EXCL, "< $exclude") || die "Can't open $exclude : $!\n";
|
||||
while (defined($_=<EXCL>)) {
|
||||
chomp;
|
||||
if (not exists $sources{$_}) {
|
||||
msg(1, "INIT: Source '$_' is in srcexcluded but " .
|
||||
"doesn't exist. Ignored.\n");
|
||||
next;
|
||||
}
|
||||
$excluded{$_} = 'user choice';
|
||||
}
|
||||
close EXCL;
|
||||
}
|
||||
|
||||
|
||||
# Get the list of included packages
|
||||
my @list = ();
|
||||
my $i = 1;
|
||||
|
@ -287,6 +305,7 @@ sub add_src {
|
|||
$total_size += $size;
|
||||
|
||||
add_to_cd ($cd, \@files);
|
||||
msg(1, " size: $size\n");
|
||||
$included{$src} = $cd;
|
||||
}
|
||||
|
||||
|
|
|
@ -83,8 +83,8 @@ if (-e $exclude) {
|
|||
while (defined($_=<EXCL>)) {
|
||||
chomp;
|
||||
if (not exists $packages{$_}) {
|
||||
msg(1, "INIT: Package '$_' is in excluded but" .
|
||||
"doesn't exist. Ignored.");
|
||||
msg(1, "INIT: Package '$_' is in excluded but " .
|
||||
"doesn't exist. Ignored.\n");
|
||||
next;
|
||||
}
|
||||
$excluded{$_} = 'user choice';
|
||||
|
@ -461,6 +461,9 @@ sub add_package {
|
|||
# New limit
|
||||
$limit = $ENV{"SIZELIMIT$cd"} || $deflimit;
|
||||
msg(2, "Limit for CD $cd is $limit.\n");
|
||||
|
||||
# Unexclude packages
|
||||
unexclude ($cd);
|
||||
}
|
||||
|
||||
msg(2, " \$cd_size = $cd_size, \$size = $size\n");
|
||||
|
@ -636,3 +639,23 @@ sub add_to_cd {
|
|||
push(@{$cds{$cd}}, @{$ref});
|
||||
}
|
||||
|
||||
# Unexclude packages before given CD is started
|
||||
sub unexclude {
|
||||
my $cd = shift;
|
||||
my $unexclude = $ENV{"UNEXCLUDE$cd"} || "$list.unexclude$cd";
|
||||
|
||||
if (-e $unexclude) {
|
||||
open (UNEXCL, "< $unexclude") || die "Can't open $unexclude : $!\n";
|
||||
while (defined($_=<UNEXCL>)) {
|
||||
chomp;
|
||||
if (not exists $packages{$_}) {
|
||||
msg(1, "Package '$_' is in unexcluded but " .
|
||||
"doesn't exist. Ignored.\n");
|
||||
next;
|
||||
}
|
||||
$excluded{$_} = 0;
|
||||
msg(1, "Unexcluding package '$_'\n");
|
||||
}
|
||||
close UNEXCL;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue