Merge ~mwhudson/debian-cd/+git/ubuntu:more-pruning into ~ubuntu-cdimage/debian-cd/+git/ubuntu:main

Proposed by Michael Hudson-Doyle
Status: Needs review
Proposed branch: ~mwhudson/debian-cd/+git/ubuntu:more-pruning
Merge into: ~ubuntu-cdimage/debian-cd/+git/ubuntu:main
Diff against target: 405 lines (+18/-230)
7 files modified
CONF.sh (+0/-13)
Makefile (+4/-30)
dev/null (+0/-61)
tools/add_dirs (+14/-41)
tools/list2cds (+0/-71)
tools/scanpackages (+0/-8)
tools/sorting_weights (+0/-6)
Reviewer Review Type Date Requested Status
Ubuntu CD Image Team Pending
Review via email: mp+462188@code.launchpad.net

Commit message

remove cruft

Description of the change

What do you do while you're waiting for the PPA publisher to do its thing? Why not remove unused bits and pieces from debian-cd.

To post a comment you must log in.

Unmerged commits

3bd15c4... by Michael Hudson-Doyle

more vestigal support for multiple ISOs

40e46f7... by Michael Hudson-Doyle

remove unused variable from Makefile

f5428e0... by Michael Hudson-Doyle

remove "extras" facility and add_files script

9ce1148... by Michael Hudson-Doyle

remove references to NONFREE & CONTRIB

also tidy up add_dirs a bit.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/CONF.sh b/CONF.sh
2index e362162..c193797 100644
3--- a/CONF.sh
4+++ b/CONF.sh
5@@ -3,9 +3,6 @@
6 #
7
8 # Unset all optional variables first to start from a clean state
9-unset NONFREE || true
10-unset CONTRIB || true
11-unset EXTRANONFREE || true
12 unset RESTRICTED || true
13 unset UNIVERSE || true
14 unset MULTIVERSE || true
15@@ -156,16 +153,6 @@ export DEBOOTSTRAP=$CDIMAGE_ROOT/scratch/$SUBTREE$PROJECT/$DIST/$IMAGE_TYPE/debo
16 # Where live filesystem images live
17 export LIVEIMAGES=$CDIMAGE_ROOT/scratch/$SUBTREE$PROJECT/$DIST/$IMAGE_TYPE/live
18
19-# Do I want to have NONFREE merged in the CD set
20-# export NONFREE=1
21-
22-# Do I want to have CONTRIB merged in the CD set
23-#export CONTRIB=1
24-
25-# Do I want to have NONFREE on a separate CD (the last CD of the CD set)
26-# WARNING: Don't use NONFREE and EXTRANONFREE at the same time !
27-# export EXTRANONFREE=1
28-
29 if [ -z "$CDIMAGE_ONLYFREE" ]; then
30 export RESTRICTED=1
31 fi
32diff --git a/Makefile b/Makefile
33index 021bb6c..8d68e41 100644
34--- a/Makefile
35+++ b/Makefile
36@@ -96,9 +96,7 @@ apt=$(BASEDIR)/tools/apt-selection
37 list2cds=$(BASEDIR)/tools/list2cds
38 add_packages=$(BASEDIR)/tools/add_packages
39 add_dirs=$(BASEDIR)/tools/add_dirs
40-add_bin_doc=$(BASEDIR)/tools/add-bin-doc
41 scanpackages=$(BASEDIR)/tools/scanpackages
42-add_files=$(BASEDIR)/tools/add_files
43 set_mkisofs_opts=$(BASEDIR)/tools/set_mkisofs_opts
44 add_secured=$(BASEDIR)/tools/add_secured
45 md5sum=/usr/bin/md5sum
46@@ -114,8 +112,6 @@ hardlink=$(BASEDIR)/tools/hardlink
47 BDIR=$(TDIR)/$(CODENAME)-$(FULLARCH)
48 ADIR=$(APTTMP)/$(CODENAME)-$(FULLARCH)
49
50-FIRSTDISKS=CD1
51-
52 # riscv64 images are raw images (non-ISO)
53 ifeq ($(ARCH),riscv64)
54 IMAGE_FORMAT := img
55@@ -222,11 +218,6 @@ endif
56 ifndef OUT
57 @echo OUT undefined -- set up CONF.sh; false
58 endif
59-ifdef NONFREE
60-ifdef EXTRANONFREE
61- @echo Never use NONFREE and EXTRANONFREE at the same time; false
62-endif
63-endif
64
65 ## INITIALIZATION ##
66
67@@ -344,10 +335,7 @@ tree: bin-tree
68 bin-tree: ok bin-list $(BDIR)/CD1/ubuntu
69 $(BDIR)/CD1/ubuntu:
70 @echo "Adding the required directories to the binary CDs ..."
71- $(Q)set -e; \
72- dir=$(BDIR)/CD1; \
73- mkdir -p $$dir; \
74- $(add_dirs) $$dir; \
75+ $(Q)mkdir -p $(BDIR)/CD1 && $(add_dirs) $(BDIR)/CD1
76
77 # CD labels / volume ids / disk info
78 infos: bin-infos
79@@ -433,24 +421,10 @@ installtools: ok bin-infos $(BDIR)/CD1/install
80 $(BDIR)/CD1/install:
81 @echo "Adding install tools and documentation ..."
82 $(Q)set -e; \
83- for DISK in $(FIRSTDISKS) ; do \
84- mkdir $(BDIR)/$$DISK/install ; \
85- if [ -x "$(BASEDIR)/tools/$(CODENAME)/installtools.sh" ]; then \
86- $(BASEDIR)/tools/$(CODENAME)/installtools.sh $(BDIR)/$$DISK ; \
87- fi ; \
88- done
89-
90-## EXTRAS ##
91-
92-# Launch the extras scripts correctly for customizing the CDs
93-extras: bin-extras
94-bin-extras: ok
95- $(Q)if [ -z "$(DIR)" -o -z "$(CD)" -o -z "$(ROOTSRC)" ]; then \
96- echo "Give me more parameters (DIR, CD and ROOTSRC are required)."; \
97- false; \
98+ mkdir $(BDIR)/$$DISK/install ; \
99+ if [ -x "$(BASEDIR)/tools/$(CODENAME)/installtools.sh" ]; then \
100+ $(BASEDIR)/tools/$(CODENAME)/installtools.sh $(BDIR)/CD1 ; \
101 fi
102- @echo "Adding dirs '$(DIR)' from '$(ROOTSRC)' to '$(BDIR)/CD$(CD)'" ...
103- $(Q)$(add_files) $(BDIR)/CD$(CD) $(ROOTSRC) $(DIR)
104
105 ## IMAGE BUILDING ##
106
107diff --git a/tools/add_dirs b/tools/add_dirs
108index 4262920..49773b4 100755
109--- a/tools/add_dirs
110+++ b/tools/add_dirs
111@@ -4,29 +4,19 @@
112
113 set -e
114
115-# There's no difference between NONFREE and EXTRANONFREE for this script
116-if [ "${EXTRANONFREE:-0}" != "0" ]
117-then
118- NONFREE=1
119-fi
120-
121 cd $1
122
123-if [ ! -e ubuntu ] ; then
124- ln -sf . ubuntu
125-fi
126+ln -sf . ubuntu
127 if [ "$ARCH" != "amd64" ] && [ "$ARCH" != "i386" ]; then
128 if [ ! -e ubuntu-ports ]; then
129 ln -sf . ubuntu-ports
130 fi
131 fi
132
133-if [ ! -d dists/$CODENAME ] ; then
134- mkdir -p dists/$CODENAME
135- for name in stable unstable; do
136- ln -sf $CODENAME dists/$name
137- done
138-fi
139+mkdir -p dists/$CODENAME
140+for name in stable unstable; do
141+ ln -sf $CODENAME dists/$name
142+done
143
144 if [ ! -d .disk ] ; then
145 mkdir .disk
146@@ -37,37 +27,20 @@ if [ -e "$BASEDIR/data/$CODENAME/multiarch/$ARCH" ]; then
147 ALL_ARCHES="$ALL_ARCHES $(cat "$BASEDIR/data/$CODENAME/multiarch/$ARCH")"
148 fi
149
150-for ONE_ARCH in $ALL_ARCHES; do
151- mkdir -p dists/$CODENAME/main/binary-$ONE_ARCH
152-done
153-mkdir -p dists/$CODENAME/main/source
154-if [ "${CONTRIB:-0}" != 0 ]; then
155- for ONE_ARCH in $ALL_ARCHES; do
156- mkdir -p dists/$CODENAME/contrib/binary-$ONE_ARCH
157- done
158- mkdir -p dists/$CODENAME/contrib/source
159-fi
160-if [ "${NONFREE:-0}" != "0" ]; then
161+mkdirs_for () {
162 for ONE_ARCH in $ALL_ARCHES; do
163- mkdir -p dists/$CODENAME/non-free/binary-$ONE_ARCH
164+ mkdir -p dists/$CODENAME/$1/binary-$ONE_ARCH
165 done
166- mkdir -p dists/$CODENAME/non-free/source
167-fi
168+ mkdir -p dists/$CODENAME/$1/source
169+}
170+
171+mkdirs_for main
172 if [ "${RESTRICTED:-0}" != "0" ]; then
173- for ONE_ARCH in $ALL_ARCHES; do
174- mkdir -p dists/$CODENAME/restricted/binary-$ONE_ARCH
175- done
176- mkdir -p dists/$CODENAME/restricted/source
177+ mkdirs_for restricted
178 fi
179 if [ "${UNIVERSE:-0}" != "0" ]; then
180- for ONE_ARCH in $ALL_ARCHES; do
181- mkdir -p dists/$CODENAME/universe/binary-$ONE_ARCH
182- done
183- mkdir -p dists/$CODENAME/universe/source
184+ mkdirs_for universe
185 fi
186 if [ "${MULTIVERSE:-0}" != "0" ]; then
187- for ONE_ARCH in $ALL_ARCHES; do
188- mkdir -p dists/$CODENAME/multiverse/binary-$ONE_ARCH
189- done
190- mkdir -p dists/$CODENAME/multiverse/source
191+ mkdirs_for multivers
192 fi
193diff --git a/tools/add_files b/tools/add_files
194deleted file mode 100755
195index 3c61992..0000000
196--- a/tools/add_files
197+++ /dev/null
198@@ -1,61 +0,0 @@
199-#!/usr/bin/perl -w
200-
201-# First arg, the root of the destination
202-# Second arg, the root of the source
203-# Other args, the directories/files to copy (relative to the root source)
204-
205-use strict;
206-use File::Find;
207-
208-my $basedir = $ENV{'BASEDIR'} || die;
209-require "$basedir/tools/link.pl";
210-
211-my $rootdest = shift || die ;
212-my $rootsrc = shift || die ;
213-my @files = @ARGV;
214-my $verbose = $ENV{'VERBOSE'} || 0;
215-
216-chdir $rootsrc;
217-
218-sub relative ($) {
219- my $file = shift;
220- $file =~ s#^/*$rootsrc/##;
221- return $file;
222-}
223-
224-sub mkdirs {
225- if (-d and not -l) {
226- my $dir = "$rootdest/" . relative($File::Find::name);
227- return if -d $dir;
228- print "Creating $dir directory ...\n" if ($verbose >= 2);
229-
230- if (not mkdir ($dir, 0775)) {
231- print STDERR "Cannot mkdir $dir : $!\n";
232- }
233- }
234-}
235-
236-sub add_files {
237- if (-f and not -l) {
238- good_link ("$rootsrc/" . relative($File::Find::name),
239- "$rootdest/" . relative($File::Find::name));
240- } elsif (-l) {
241- #Check if the link is valid in the desttree otherwise
242- #hardlink it
243- my $file = $File::Find::name;
244- $file =~ s#/[^/]+$##;
245- $file .= "/" . readlink;
246- if (-e "$rootdest/" . relative($file)) {
247- good_link ("$rootsrc/" . relative($File::Find::name),
248- "$rootdest/" . relative($File::Find::name));
249- } else {
250- $file = real_file ("$rootsrc/$File::Find::name");
251- good_link ($file,
252- "$rootdest/" . relative($File::Find::name));
253- }
254- }
255-}
256-
257-find (\&mkdirs, @files);
258-find (\&add_files, @files);
259-
260diff --git a/tools/list2cds b/tools/list2cds
261index 1100519..015e6b2 100755
262--- a/tools/list2cds
263+++ b/tools/list2cds
264@@ -14,8 +14,6 @@ my $list = shift;
265 my $deflimit = $ENV{'SIZELIMIT'} || shift || 639631360;
266 my $limit = $ENV{'SIZELIMIT1'} || $deflimit;
267
268-my $nonfree = $ENV{'NONFREE'} || 0;
269-my $extranonfree = $ENV{'EXTRANONFREE'} || 0;
270 my $complete = $ENV{'COMPLETE'} || 0;
271 my $exclude = "$list.exclude";
272 my $nodepends = $ENV{'NODEPENDS'} || 0;
273@@ -51,7 +49,6 @@ List of prefered packages: $list
274 Exclude file: $exclude
275 ");
276 msg(0, "Complete selected packages with all the rest: "); msg(0, yesno($complete)."\n");
277-msg(0, "Include non-free packages: "); msg(0, yesno($nonfree)."\n");
278 msg(0, "======================================================================
279 ");
280
281@@ -97,15 +94,6 @@ if (-e $exclude) {
282 close EXCL;
283 }
284
285-# Now exclude more packages because of the non-free rules
286-if (not $nonfree) {
287- foreach (grep { $packages{$_}{"Section"} =~ /non-free/ }
288- (keys %packages)) {
289- $excluded{$_} = 'nonfree';
290- $count_excl++;
291- }
292-}
293-
294 msg(0, "Statistics:
295 Number of packages: @{ [scalar(keys %packages)] }
296 Number of excluded: $count_excl of @{ [scalar(keys %excluded)] }
297@@ -199,65 +187,6 @@ if ($complete) {
298 }
299 msg(0, "CD $cd will only be filled with $cd_size bytes ...\n");
300
301-# Now select the non-free packages for an extra CD
302-if ($extranonfree and (! $nonfree))
303-{
304- my ($p, @toinclude);
305-
306- # Finally accept non-free packages ...
307- foreach $p (grep { $excluded{$_} eq "nonfree" } (keys %excluded))
308- {
309- $excluded{$p} = 0;
310- push @toinclude, $p;
311- }
312-
313- # Start a new CD
314- $cd++;
315- $cd_size = 0;
316- $limit = $ENV{"SIZELIMIT$cd"} || $deflimit;
317- msg(0, "Limit for non-free CD $cd is $limit.\n");
318-
319- # Include non-free packages
320- foreach $p (@toinclude)
321- {
322- add_package($p, 1, 1);
323- }
324-
325- # If a contrib package was listed in the list of packages to
326- # include and if COMPLETE=0 there's a chance that the package
327- # will not get included in any CD ... so I'm checking the complete
328- # list again
329- open (LIST, "< $list") || die "Can't open $list : $!\n";
330- while (defined($_=<LIST>)) {
331- chomp;
332- next if m/^\s*$/;
333- next if $_ eq 'FORCE-CD-BREAK';
334- next if $included{$_};
335- next if $excluded{$_};
336- if (not exists $packages{$_}) {
337- msg(1, "WARNING: '$_' does not appear to be available ... " .
338- "(ignored)\n");
339- next;
340- }
341- add_package ($_, 1, 1);
342- }
343- close LIST;
344-
345- # Try to include other packages that could not be included
346- # before (because they depends on excluded non-free packages)
347- if ($complete)
348- {
349- foreach $p (sort { ($packages{$a}{"Section"}
350- cmp $packages{$b}{"Section"}) || ($a cmp $b) }
351- grep { not ($included{$_} or $excluded{$_}) }
352- keys %packages)
353- {
354- add_package ($p, 0, 0);
355- }
356- }
357-
358- msg(0, "CD $cd will only be filled with $cd_size bytes ...\n");
359-}
360
361 # Remove old files
362 foreach (glob("$dir/*.packages")) {
363diff --git a/tools/scanpackages b/tools/scanpackages
364index 84c25d3..23881b1 100755
365--- a/tools/scanpackages
366+++ b/tools/scanpackages
367@@ -14,12 +14,6 @@ BDIR=$TDIR/$CODENAME-$FULLARCH
368 PREFIX=`echo $2 | sed "s?$BDIR/CD?$BDIR/?"`
369
370 SECTIONS="main"
371-if [ "${NONFREE:-0}" != "0" -o "${EXTRANONFREE:-0}" != "0" ]; then
372- SECTIONS="${SECTIONS} non-free"
373-fi
374-if [ "${CONTRIB:-0}" != "0" ]; then
375- SECTIONS="${SECTIONS} contrib"
376-fi
377 if [ "${RESTRICTED:-0}" != "0" ]; then
378 SECTIONS="${SECTIONS} restricted"
379 fi
380@@ -88,8 +82,6 @@ DISTS=""
381 for i in `cd dists; echo *; cd ..`; do
382 if [ ! -L "dists/$i" -a -d "dists/$i" ]; then
383 if [ -d "dists/$i/main/binary-$ARCH" -o \
384- -d "dists/$i/non-free/binary-$ARCH" -o \
385- -d "dists/$i/contrib/binary-$ARCH" -o \
386 -d "dists/$i/restricted/binary-$ARCH" -o \
387 -d "dists/$i/universe/binary-$ARCH" -o \
388 -d "dists/$i/multiverse/binary-$ARCH" ]; then
389diff --git a/tools/sorting_weights b/tools/sorting_weights
390index ae4df73..0518e12 100755
391--- a/tools/sorting_weights
392+++ b/tools/sorting_weights
393@@ -11,12 +11,6 @@ CD="$1"
394 shift
395
396 SECTIONS="main"
397-if [ "${CONTRIB:-0}" != 0 ]; then
398- SECTIONS="$SECTIONS contrib"
399-fi
400-if [ "${NONFREE:-0}" != 0 ] || [ "${EXTRANONFREE:-0}" != 0 ]; then
401- SECTIONS="$SECTIONS non-free"
402-fi
403 if [ "${RESTRICTED:-0}" != 0 ]; then
404 SECTIONS="$SECTIONS restricted"
405 fi

Subscribers

People subscribed via source and target branches