* Patch from Joey Hess for LOCALDEBS.

* Patch from Michael Schlueter for a bugfix related to forcenonusoncd1.
* Patch from myself : s/*.packages/?.packages/ in tools/scanpackages !
  It's a problem that appeared with the use of FORCENONUSONCD1 and LOCAL.
This commit is contained in:
Raphaël Hertzog 2000-06-30 00:04:03 +00:00
parent d27b3760ec
commit 898a7e92f8
9 changed files with 31 additions and 8 deletions

View File

@ -60,6 +60,11 @@ export APTTMP=/ftp/tmp/apt
# uncomment the following line # uncomment the following line
# export LOCAL=1 # export LOCAL=1
# If your local packages are not under $MIRROR, but somewhere else,
# you can uncomment this line and edit to to point to a directory
# containing dists/$CODENAME/local/binary-$ARCH
# export LOCALDEBS=/home/joey/debian/va/debian
# Sparc only : bootdir (location of cd.b and second.b) # Sparc only : bootdir (location of cd.b and second.b)
# export BOOTDIR=/boot # export BOOTDIR=/boot

View File

@ -78,6 +78,9 @@ SDIR=$(TDIR)/$(CODENAME)-src
FIRSTDISKS=CD1 FIRSTDISKS=CD1
ifdef FORCENONUSONCD1 ifdef FORCENONUSONCD1
FIRSTDISKS=CD1 CD1_NONUS FIRSTDISKS=CD1 CD1_NONUS
forcenonusoncd1=1
else
forcenonusoncd1=0
endif endif
## DEBUG STUFF ## ## DEBUG STUFF ##
@ -294,7 +297,7 @@ ifdef FORCENONUSONCD1
endif endif
@perl -npe 's/\@ARCH\@/$(ARCH)/g' $(TASK) | \ @perl -npe 's/\@ARCH\@/$(ARCH)/g' $(TASK) | \
cpp -nostdinc -nostdinc++ -P -undef -D ARCH=$(ARCH) -D ARCH_$(ARCH) \ cpp -nostdinc -nostdinc++ -P -undef -D ARCH=$(ARCH) -D ARCH_$(ARCH) \
-DFORCENONUSONCD1=$(FORCENONUSONCD1) \ -DFORCENONUSONCD1=$(forcenonusoncd1) \
-I $(BASEDIR)/tasks -I $(BDIR) - - >> $(BDIR)/rawlist -I $(BASEDIR)/tasks -I $(BDIR) - - >> $(BDIR)/rawlist
## DIRECTORIES && PACKAGES && INFOS ## ## DIRECTORIES && PACKAGES && INFOS ##

2
README
View File

@ -194,6 +194,8 @@ include sources).
To include local packages, the LOCAL environment variable must be set To include local packages, the LOCAL environment variable must be set
to "1" while building the CDs. to "1" while building the CDs.
You can also set the LOCALDEBS environment variable, and it will be used
instead of MIRROR when looking for local packages.
Additionnal targets Additionnal targets
=================== ===================

5
debian/CONF.sh vendored
View File

@ -50,6 +50,11 @@ export APTTMP=/home/ftp/tmp/apt
# uncomment the following line # uncomment the following line
# export LOCAL=1 # export LOCAL=1
# If your local packages are not under $MIRROR, but somewhere else,
# you can uncomment this line and edit to to point to a directory
# containing dists/$CODENAME/local/binary-$ARCH
# export LOCALDEBS=/home/joey/debian/va/debian
# Sparc only : bootdir (location of cd.b and second.b) # Sparc only : bootdir (location of cd.b and second.b)
# export BOOTDIR=/boot # export BOOTDIR=/boot

3
debian/changelog vendored
View File

@ -18,6 +18,9 @@ debian-cd (2.2.1) frozen unstable; urgency=low
CD#1 of the set. We then make 2 copies of this, one with non-US and CD#1 of the set. We then make 2 copies of this, one with non-US and
one without. Useful for people wanting to create non-US and US-safe one without. Useful for people wanting to create non-US and US-safe
CDs without having to spend so much disk space. CDs without having to spend so much disk space.
* Added patch from Joey Hess for LOCALDEBS support. Closes: #66447
* Added patch from Michael Schlueter (corrected cpp call when
FORCENONUSONCD1 was not used)
-- Raphael Hertzog <hertzog@debian.org> Sat, 20 May 2000 23:42:58 +0200 -- Raphael Hertzog <hertzog@debian.org> Sat, 20 May 2000 23:42:58 +0200

View File

@ -9,6 +9,7 @@ if (! -d $dir) {
} }
my $mirror = $ENV{'MIRROR'} || die "Set the MIRROR var ...\n"; my $mirror = $ENV{'MIRROR'} || die "Set the MIRROR var ...\n";
my $localdebs = $ENV{'LOCALDEBS'} || $mirror;
my $nonus = $ENV{'NONUS'} || ''; my $nonus = $ENV{'NONUS'} || '';
my $basedir = $ENV{'BASEDIR'} || die "Set the BASEDIR var ...\n"; my $basedir = $ENV{'BASEDIR'} || die "Set the BASEDIR var ...\n";
@ -28,6 +29,9 @@ while (defined($_ = <LIST>)) {
$source = ($section =~ /non-US/) ? $nonus : $mirror; $source = ($section =~ /non-US/) ? $nonus : $mirror;
# This is a hack to allow the local debs to be located elsewhere.
$source=$localdebs if $file=~m:local/:;
# If arch=all and filename is a symbolic link # If arch=all and filename is a symbolic link
# we suppose that the link points to .../binary-all/... # we suppose that the link points to .../binary-all/...
# and we reproduce a similar setup on the CD # and we reproduce a similar setup on the CD

View File

@ -59,7 +59,7 @@ if [ ! -e "$APTTMP/$CODENAME-$ARCH/apt/sources.list" ]; then
fi fi
# Local packages ... # Local packages ...
if [ -n "$LOCAL" ]; then if [ -n "$LOCAL" ]; then
echo "deb file:$MIRROR $CODENAME local" \ echo "deb file:${LOCALDEBS:-MIRROR} $CODENAME local" \
>> $APTTMP/$CODENAME-$ARCH/apt/sources.list >> $APTTMP/$CODENAME-$ARCH/apt/sources.list
fi fi
fi fi

View File

@ -27,6 +27,7 @@ my $sdir = "$ENV{'TDIR'}/$ENV{'CODENAME'}-src";
my $verbose = $ENV{'VERBOSE'} || 0; my $verbose = $ENV{'VERBOSE'} || 0;
my $mirror = $ENV{'MIRROR'}; my $mirror = $ENV{'MIRROR'};
my $localdebs = $ENV{'LOCALDEBS'} || $mirror;
my $codename = $ENV{'CODENAME'}; my $codename = $ENV{'CODENAME'};
$| = 1; $| = 1;
@ -70,9 +71,9 @@ if ($nonus and ($codename eq "slink")) {
push @SOURCES, "$nonus/dists/$codename/non-US/source/Sources.gz"; push @SOURCES, "$nonus/dists/$codename/non-US/source/Sources.gz";
} }
if ($local and -e "$mirror/dists/$codename/local/source/Sources.gz") if ($local and -e "$localdebs/dists/$codename/local/source/Sources.gz")
{ {
push @SOURCES, "$mirror/dists/$codename/local/source/Sources.gz"; push @SOURCES, "$localdebs/dists/$codename/local/source/Sources.gz";
} }
foreach (@SOURCES) { foreach (@SOURCES) {

View File

@ -74,7 +74,7 @@ if [ -n "$NONUS" -a "$CODENAME" = "slink" ]; then
>dists/$CODENAME/non-US/binary-$ARCH/Packages >dists/$CODENAME/non-US/binary-$ARCH/Packages
grep -v ^X-Medium $PREFIX.Packages-non-US | gzip --best \ grep -v ^X-Medium $PREFIX.Packages-non-US | gzip --best \
>dists/$CODENAME/non-US/binary-$ARCH/Packages.gz >dists/$CODENAME/non-US/binary-$ARCH/Packages.gz
for i in $TDIR/$CODENAME-$ARCH/*.packages; do for i in $TDIR/$CODENAME-$ARCH/?.packages; do
dir=${i%%.packages} dir=${i%%.packages}
n=${dir##$TDIR/$CODENAME-$ARCH/} n=${dir##$TDIR/$CODENAME-$ARCH/}
if [ $n -le $NUM ]; then if [ $n -le $NUM ]; then
@ -87,8 +87,8 @@ if [ -n "$NONUS" -a "$CODENAME" = "slink" ]; then
fi fi
if [ -n "$LOCAL" ]; then if [ -n "$LOCAL" ]; then
if [ -e $MIRROR/dists/$CODNAME/local/binary-$ARCH/Release ]; then if [ -e ${LOCALDEBS:-MIRROR}/dists/$CODNAME/local/binary-$ARCH/Release ]; then
cp $MIRROR/dists/$CODENAME/local/binary-$ARCH/Release \ cp ${LOCALDEBS:-MIRROR}/dists/$CODENAME/local/binary-$ARCH/Release \
dists/$CODENAME/local/binary-$ARCH/ dists/$CODENAME/local/binary-$ARCH/
fi fi
grep -v ^X-Medium $PREFIX.Packages-local \ grep -v ^X-Medium $PREFIX.Packages-local \
@ -96,7 +96,7 @@ if [ -n "$LOCAL" ]; then
grep -v ^X-Medium $PREFIX.Packages-local | gzip --best \ grep -v ^X-Medium $PREFIX.Packages-local | gzip --best \
>dists/$CODENAME/local/binary-$ARCH/Packages.gz >dists/$CODENAME/local/binary-$ARCH/Packages.gz
for i in $TDIR/$CODENAME-$ARCH/*.packages; do for i in $TDIR/$CODENAME-$ARCH/?.packages; do
dir=${i%%.packages} dir=${i%%.packages}
n=${dir##$TDIR/$CODENAME-$ARCH/} n=${dir##$TDIR/$CODENAME-$ARCH/}
if [ $n -le $NUM ]; then if [ $n -le $NUM ]; then