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

Proposed by Michael Hudson-Doyle
Status: Merged
Merged at revision: 7a97774f20e1f243ba5195093b7c731ec2b20852
Proposed branch: ~mwhudson/debian-cd/+git/ubuntu:remove-more-stuff
Merge into: ~ubuntu-cdimage/debian-cd/+git/ubuntu:main
Diff against target: 737 lines (+11/-83)
5 files modified
CONF.sh (+0/-1)
Makefile (+5/-20)
README (+6/-6)
build_all.sh (+0/-3)
dev/null (+0/-53)
Reviewer Review Type Date Requested Status
Steve Langasek Approve
Ɓukasz Zemczak Pending
Review via email: mp+455921@code.launchpad.net

Commit message

remove the scripts from tools that are clearly no longer used and a couple of other things.

To post a comment you must log in.
Revision history for this message
Steve Langasek (vorlon) :
review: Needs Information
Revision history for this message
Michael Hudson-Doyle (mwhudson) :
Revision history for this message
Steve Langasek (vorlon) wrote :

Ah thanks for the clarification, I didn't put two and two together that this was for the generic server installer images on riscv64.

review: Approve
Revision history for this message
Steve Langasek (vorlon) wrote :

do you mind rebasing this now that your other branches have landed?

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

> do you mind rebasing this now that your other branches have landed?

done

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 b15a95a..b005f88 100644
3--- a/CONF.sh
4+++ b/CONF.sh
5@@ -298,7 +298,6 @@ export NORECOMMENDS=1
6 export NOSUGGESTS=1
7
8 # Image format:
9-# vfat = Output an image in VFAT format (.img)
10 # iso = Output an image in ISO 9660 format (.iso)
11 # img = Output a raw partitioned disk image (.img)
12 if [ -z "$IMAGE_FORMAT" ]; then
13diff --git a/Makefile b/Makefile
14index 74d82a0..b4888ad 100644
15--- a/Makefile
16+++ b/Makefile
17@@ -109,7 +109,6 @@ fastsums=$(BASEDIR)/tools/fast_sums
18 add_live_filesystem=$(BASEDIR)/tools/add_live_filesystem
19 add_winfoss=$(BASEDIR)/tools/add_winfoss
20 verbose=$(BASEDIR)/tools/verbose_command
21-make_vfat_img=$(BASEDIR)/tools/make-vfat-img
22 make_raw_img=$(BASEDIR)/tools/make-raw-img
23 hardlink=$(BASEDIR)/tools/hardlink
24
25@@ -119,14 +118,9 @@ SDIR=$(TDIR)/$(CODENAME)-src
26
27 FIRSTDISKS=CD1
28
29-# we don't know how to generate ISOs for arm; force vfat images
30-ifneq (,$(findstring $(ARCH),armel armhf))
31-IMAGE_FORMAT := vfat
32-else
33- # also, riscv64 images are raw images (non-ISO)
34- ifeq ($(ARCH),riscv64)
35- IMAGE_FORMAT := img
36- endif
37+# riscv64 images are raw images (non-ISO)
38+ifeq ($(ARCH),riscv64)
39+ IMAGE_FORMAT := img
40 endif
41
42 # CDBASE = $(CODENAME)-$(FULLARCH)-$(1)
43@@ -662,13 +656,7 @@ bin-images: ok bin-md5list $(OUT)
44 opts=`cat $(BDIR)/1.mkisofs_opts`; \
45 volid=`cat $(BDIR)/1.volid`; \
46 rm -f $(OUT)/$(CDBASE).raw; \
47- if [ "$(IMAGE_FORMAT)" = "vfat" ]; then \
48- if [ -d boot1/ ]; then \
49- cp -a boot1/* CD1; \
50- fi; \
51- $(make_vfat_img) -d CD1 \
52- -o $(OUT)/$(CDBASE).raw; \
53- elif [ "$(IMAGE_FORMAT)" = "img" ]; then \
54+ if [ "$(IMAGE_FORMAT)" = "img" ]; then \
55 $(make_raw_img) -g cd-boot-images/ \
56 -d CD1 -o $(OUT)/$(CDBASE).raw; \
57 elif [ "$(IMAGE_FORMAT)" = "iso" ]; then \
58@@ -732,10 +720,7 @@ src-images: ok src-md5list $(OUT)
59 pi-makelist:
60 $(Q)set -e; \
61 cd $(OUT); for file in `find * -name \*.raw`; do \
62- if [ "$(IMAGE_FORMAT)" = "vfat" ]; then \
63- $(BASEDIR)/tools/pi-makelist-vfat \
64- $$file > $${file%%.raw}.list; \
65- elif [ "$(IMAGE_FORMAT)" = "iso" ]; then \
66+ if [ "$(IMAGE_FORMAT)" = "iso" ]; then \
67 $(BASEDIR)/tools/pi-makelist \
68 $$file > $${file%%.raw}.list; \
69 fi \
70diff --git a/README b/README
71index eb3656d..8513768 100644
72--- a/README
73+++ b/README
74@@ -51,8 +51,8 @@ $ make official_images
75 $ make bin-official_images ]
76
77 However, you really should consider reading further for more information.
78-You can also take a look at build.sh and build_all.sh for an automatized
79-way of building CD images.
80+You can also take a look at build_all.sh for an automatized way of building
81+CD images.
82
83 How to build a CD set - step by step
84 ====================================
85@@ -228,8 +228,8 @@ servers.
86 The default configuration shipped with this package will automatically
87 name the images "Unofficial". CD will work exactly in the same way
88 with all Debian tools, only the label is different. That means you
89-can use build.sh and build_all.sh to build your "Unofficial" images
90-without modifying anything.
91+can use build_all.sh to build your "Unofficial" images without modifying
92+anything.
93
94
95 Local packages
96@@ -258,10 +258,10 @@ Additional targets
97 Image format
98 ------------
99
100-You may want to generate images in ISO 9660 or VFAT formats.
101+You may want to generate images in ISO 9660 or raw formats.
102
103 Set the IMAGE_FORMAT variable in CONF.sh. You can choose "iso" for generation
104-of .iso (default), or "vfat" for generation of .img.
105+of .iso (default), or "img" for generation of raw images.
106
107
108 About the symlink farm
109diff --git a/README.devel b/README.devel
110deleted file mode 100644
111index f3c4731..0000000
112--- a/README.devel
113+++ /dev/null
114@@ -1,81 +0,0 @@
115-README for those who want to hack on yacs/debian-cd
116----------------------------------------------------
117-
118-Organisation :
119---------------
120-
121-The main source is in the Debian CVS. If you want to hack on debian-cd
122-and if you want to send me patches, please work on the latest version
123-available in the CVS.
124-
125-http://cvs.debian.org/debian-cd/
126-
127-$ cvs -d :pserver:anonymous@cvs.debian.org:/cvs/debian-boot co debian-cd
128-
129-If you want to discuss anything related to the debian-cd development, you
130-can contact me directly or, better, you can mail the
131-debian-cd@lists.debian.org mailing list where all people interested in the
132-debian-cd development are subscribed.
133-
134-Technical details :
135--------------------
136-
137-The Makefile which is the main directory will be used to launch
138-each step of the install process. Try to comment each target of
139-the makefile so that other can know why it's here. If you need
140-specific programs (perl or shell scripts), please put them
141-in the tools directory.
142-
143-The tasks directory will contain files listing packages (the
144-order in which package are listed is important, each package
145-added will be added to the current CD until it's full).
146-
147-The data dir will contains useful data (not directly task
148-related) like the master file from boot-floppies and so on.
149-
150-Each tool is self-documented, if you want to know what it
151-does read the sources (they are scripts).
152-
153-Debugging YACS :
154-----------------
155-
156-If you want to read more about what YACS is doing you can set
157-the VERBOSE environment variable to 1, 2 or 3 depending on the
158-level of noise that you want.
159-
160-Some scripts generates their own log files in the temp dir. You
161-can take a look at them if you want to check for warnings
162-and so on.
163-Log files :
164-- $TDIR/$CODENAME-$ARCH/log.list2cds
165-- $TDIR/$CODENAME-SRC/log.cds2src
166-
167-TODO list :
168------------
169-+ put the doc directory only on the first binary CD
170-+ a way to force the inclusion of packages (even broken)
171-+ possibility to add project/* to the last CD
172-+ check the source files on the mirror (with Sources.gz)
173- when doing make mirrorcheck
174-
175-Bugs / Problems :
176------------------
177-* make list will not add contrib packages if you do not
178- select NONFREE too. That's because contrib is broken
179- without non-free. And the building process only allow
180- functional packages to be added.
181-
182-Technical choices :
183--------------------
184-
185-For the multiboot on the first CD of an i386 CD set, we had two options
186-isolinux and el-torito native multiboot. We selected isolinux
187-because it works well and it lets you display information to the user.
188-The el-torito multiboot just displays a menu with each item
189-being the same "2.88Mb boot image". Both multiboot mechanism may
190-not work on older hardware with very old BIOSes however the el-torito
191-one works a bit better because it's usually able to boot the first choice
192-without displaying the menu then. This is a non-issue since people
193-may still boot on CD 2,3,4,5 with the usual boot method if the multiboot
194-doesn't work.
195-
196diff --git a/build.sh b/build.sh
197deleted file mode 100755
198index 8bb22c0..0000000
199--- a/build.sh
200+++ /dev/null
201@@ -1,58 +0,0 @@
202-#!/bin/sh -e
203-
204-# Script to build one arch
205-
206-if [ -z "$CF" ] ; then
207- CF=./CONF.sh
208-fi
209-. $CF
210-
211-if [ -z "$COMPLETE" ] ; then
212- export COMPLETE=1
213-fi
214-
215-if [ -n "$1" ] ; then
216- FULLARCH="$1"
217- export ARCH="${FULLARCH%%+*}"
218- if [ "$ARCH" = "$FULLARCH" ]; then
219- export SUBARCH=
220- else
221- export SUBARCH="${FULLARCH#*+}"
222- fi
223-fi
224-
225-make distclean
226-make ${CODENAME}_status
227-echo " ... WARNING: skipping mirror check"
228-echo " ... selecting packages to include"
229-if [ -f $BASEDIR/tools/boot/$DI_CODENAME/boot-$FULLARCH.calc ]; then
230- . $BASEDIR/tools/boot/$DI_CODENAME/boot-$FULLARCH.calc
231-fi
232-SIZE_ARGS=''
233-for CD in 1; do
234- size=`eval echo '$'"BOOT_SIZE_${CD}"`
235- [ "$size" = "" ] && size=0
236- mult=`eval echo '$'"SIZE_MULT_${CD}"`
237- [ "$mult" = "" ] && mult=100
238- FULL_SIZE=`echo "($DEFBINSIZE - $size) * 1024 * 1024" | bc`
239- echo "INFO: Reserving $size MB on CD $CD for boot files. SIZELIMIT=$FULL_SIZE."
240- if [ $mult != 100 ]; then
241- echo " INFO: Reserving "$((100-$mult))"% of the CD for extra metadata"
242- FULL_SIZE=`echo "$FULL_SIZE * $mult" / 100 | bc`
243- echo " INFO: SIZELIMIT now $FULL_SIZE."
244- fi
245- SIZE_ARGS="$SIZE_ARGS SIZELIMIT${CD}=$FULL_SIZE"
246-done
247-
248-FULL_SIZE=`echo "($DEFSRCSIZE - $size) * 1024 * 1024" | bc`
249-make bin-list $SIZE_ARGS SRCSIZELIMIT=$FULL_SIZE
250-echo " ... building the images"
251-export OUT="$OUT/$FULLARCH"
252-mkdir -p "$OUT"
253-if [ -z "$IMAGETARGET" ] ; then
254- IMAGETARGET="bin-official_images"
255-fi
256-make $IMAGETARGET $SIZE_ARGS SRCSIZELIMIT=$FULL_SIZE
257-
258-make imagesums
259-make pi-makelist
260diff --git a/build_all.sh b/build_all.sh
261index c9561b2..89589a0 100755
262--- a/build_all.sh
263+++ b/build_all.sh
264@@ -36,9 +36,6 @@ do
265 make ${CODENAME}_status
266
267 echo " ... selecting packages to include"
268- if [ -f $BASEDIR/tools/boot/$CODENAME/boot-$FULLARCH.calc ]; then
269- . $BASEDIR/tools/boot/$CODENAME/boot-$FULLARCH.calc
270- fi
271 SIZE_ARGS=''
272 for CD in 1; do
273 size=`eval echo '$'"BOOT_SIZE_${CD}"`
274diff --git a/tools/calc b/tools/calc
275deleted file mode 100755
276index ff22461..0000000
277--- a/tools/calc
278+++ /dev/null
279@@ -1,52 +0,0 @@
280-#!/bin/sh
281-
282-# This script tries to get good estimations into the .calc files at
283-# boot/$CODENAME/boot-$FULLARCH.calc, so you can use it whenever you want to
284-# update these .calc files with more recent estimations.
285-
286-# It uses info taken from the temporary dir of a previous build for $FULLARCH,
287-# $CODENAME. This doesn't need to be a full build, you can get the needed
288-# stuff by running a build.sh with something like:
289-# IMAGETARGET="ok bootable upgrade bin-infos bin-list"
290-
291-# Temporary directory of the previous build.
292-BDIR="$TDIR/$CODENAME-$FULLARCH"
293-
294-#Get info from older build if it exists
295-if [ -d "$BDIR" ];
296-then
297- echo Estimated sizes:
298- rm -f "boot/$CODENAME/boot-$FULLARCH.calc"
299- for i in `du -sm "$BDIR"/CD[0123456789]* |
300- sed -n 's/^\([0-9]\+\).*CD\([0-9]\+\)/\2=\1/p'`
301- do
302- #space used by boot images in megs (this has an error of up to a mega)
303- if [ -d "$BDIR/boot${i%=*}" ]
304- then
305- imgdu=`du -sm "$BDIR/boot${i%=*}" |
306- sed -n 's/^\([0-9]\+\).*/\1/p'`
307- else
308- imgdu=1
309- fi
310- #add it all up and write it to the .calc file
311- echo BOOT_SIZE_${i%=*}=${i#*=}+$imgdu
312- echo BOOT_SIZE_${i%=*}=$((${i#*=}+$imgdu)) >> "boot/$CODENAME/boot-$FULLARCH.calc"
313- case "$FULLARCH" in
314- m68k) echo SIZE_MULT_${i%=*}=97 >> "boot/$CODENAME/boot-$FULLARCH.calc";;
315- esac
316- done
317-fi
318-
319-#Use different corrections depending on the size of the ISO
320-if [ -n "$SIZELIMIT1" ] && [ "$SIZELIMIT1" -gt 1000000000 ] ||
321- [ -n "$SIZELIMIT" ] && [ "$SIZELIMIT" -gt 1000000000 ] ||
322- [ -n "$DEFBINSIZE" ] && [ "$DEFBINSIZE" -gt 1000 ]
323-then
324- case "$FULLARCH" in
325- powerpc) echo SIZE_MULT_1=92 >> "boot/$CODENAME/boot-$FULLARCH.calc";;
326- esac
327-else
328- case "$FULLARCH" in
329- powerpc) echo SIZE_MULT_1=96 >> "boot/$CODENAME/boot-$FULLARCH.calc";;
330- esac
331-fi
332diff --git a/tools/get_diskusage.pl b/tools/get_diskusage.pl
333deleted file mode 100755
334index cf02a5c..0000000
335--- a/tools/get_diskusage.pl
336+++ /dev/null
337@@ -1,37 +0,0 @@
338-#!/usr/bin/perl -w
339-#
340-# Author: Petter Reinholdtsen <pere@hungry.com>
341-# Date: 2001-11-20
342-#
343-# Parse logfile from Debian debian-cd build, and report how much each package
344-# added to the CD size.
345-
346-$logfile = ($ARGV[0] ||
347- "$ENV{TDIR}/$ENV{CODENAME}-$ENV{FULLARCH}/log.list2cds");
348-
349-open(LOG, $logfile) || die "Unable to open $logfile";
350-
351-my $pkg;
352-while (<LOG>) {
353- chomp;
354- $pkg = $1 if (/^\+ Trying to add (.+)\.\.\./);
355- if (/ \$cd_size = (\d+), \$size = (\d+)/) {
356- $cdsize{$pkg} = $1;
357- $size{$pkg} = $2;
358- }
359- last if (/Limit for CD 2 is/);
360- # Add delimiter
361- if (/Standard system already takes (.\d+)/) {
362- my $pkg = "<=============== end of standard pkgs";
363- $size{$pkg} = 0;
364- $cdsize{$pkg} = $1;
365- }
366-}
367-close(LOG);
368-
369-print " +size cdsize pkgname\n";
370-print "-----------------------\n";
371-
372-for $pkg (sort { $cdsize{$a} <=> $cdsize{$b} } keys %size) {
373- printf "%7d %7d %s\n", $size{$pkg} / 1024, $cdsize{$pkg} / 1024, $pkg;
374-}
375diff --git a/tools/make-vfat-img b/tools/make-vfat-img
376deleted file mode 100755
377index 0ef7ab7..0000000
378--- a/tools/make-vfat-img
379+++ /dev/null
380@@ -1,28 +0,0 @@
381-#!/bin/sh
382-
383-set -e
384-
385-dir=""
386-size=20
387-outfile=""
388-while getopts d:s:o: opt; do
389- case "$opt" in
390- d) dir="$OPTARG";;
391- s) size="$OPTARG";;
392- o) outfile="$OPTARG";;
393- esac
394-done
395-if [ -z "$dir" ] || [ -z "$outfile" ]; then
396- echo "Usage: $0 -d <DIR> -s <SIZE> -o <OUTFILE>"
397- exit 1
398-fi
399-
400-size=$(((($(du -sk $dir | cut -d' ' -f1) + ($size * 1024)) / 32) * 32))
401-/sbin/mkdosfs -C $outfile $size
402-for indir in $(find $dir -mindepth 1 -type d | cut -d/ -f2-); do
403- mmd -i $outfile $indir
404-done
405-for file in $(find $dir -type f | cut -d/ -f2-); do
406- mcopy -i $outfile $dir/$file ::$file
407-done
408-
409diff --git a/tools/my-dpkg-scanpackages b/tools/my-dpkg-scanpackages
410deleted file mode 100755
411index 146e91a..0000000
412--- a/tools/my-dpkg-scanpackages
413+++ /dev/null
414@@ -1,264 +0,0 @@
415-#! /usr/bin/perl
416-
417-$version="1.9.17"; # diverted from dpkg 1.9.17
418-
419-%kmap= ('optional','suggests',
420- 'recommended','recommends',
421- 'class','priority',
422- 'package_revision','revision');
423-
424-@fieldpri= ('Package',
425- 'Version',
426- 'Priority',
427- 'Section',
428- 'Essential',
429- 'Maintainer',
430- 'Pre-Depends',
431- 'Depends',
432- 'Recommends',
433- 'Suggests',
434- 'Conflicts',
435- 'Provides',
436- 'Replaces',
437- 'Architecture',
438- 'Filename',
439- 'Size',
440- 'MD5sum',
441- 'Description');
442-
443-$written=0;
444-$i=100; grep($pri{$_}=$i--,@fieldpri);
445-
446-if ($#ARGV > -1 && $ARGV[0] eq "-m") {
447- shift(@ARGV);
448- $opt_medium = shift(@ARGV); }
449-if ($#ARGV > -1 && $ARGV[0] eq "-a") {
450- shift(@ARGV);
451- $opt_arch = shift(@ARGV); }
452-$#ARGV == 1 || $#ARGV == 2
453- or die "Usage: dpkg-scanpackages [-m medium] [-a architecture ] binarypath overridefile [pathprefix] > Packages
454-\te.g. dpkg-scanpackages -m 'Debian GNU/Linux -a i386 binary-i386' \\
455-\t\tbinary-i386 /pub/debian/indices/override.hamm.gz \\
456-\t\tdists/stable/ > binary-i386/Packages\n";
457-
458-($binarydir, $override, $pathprefix) = @ARGV;
459--d $binarydir or die "Binary dir $binarydir not found\n";
460--e $override or die "Override file $override not found\n";
461-
462-sub vercmp {
463- ($a,$b)=@_;
464- return $vercache{$a,$b} if defined($vercache{$a,$b});
465- system("dpkg --compare-versions $a le $b");
466- $vercache{$a,$a}=$?;
467- return $?;
468-}
469-
470-# The extra slash causes symlinks to be followed.
471-open(F,"find $binarydir/ -follow -name '*.deb' -print |")
472- or die "Couldn't open pipe to find: $!\n";
473-
474-# Note: contrib and other sections are written as contrib/foo in
475-# the overrides and control file
476-($sectdir) = "$pathprefix/$binarydir" =~ m:dists/[^\\]+/([^/]+/):;
477-$sectdir =~ s:(main|hamm)/::;
478-
479-while (<F>) {
480- chomp($fn=$_);
481- substr($fn,0,length($binarydir)) eq $binarydir
482- or die "$fn not in binary dir $binarydir\n";
483- $t= `dpkg-deb -I $fn control`;
484- if ($t eq "") {
485- warn "Couldn't call dpkg-deb on $fn: $!, skipping package\n";
486- next;
487- }
488- if ($?) {
489- warn "\`dpkg-deb -I $fn control' exited with $?, skipping package\n";
490- next;
491- }
492-
493- undef %tv;
494- $o= $t;
495- while ($t =~ s/^\n*(\S+):[ \t]*(.*(\n[ \t].*)*)\n//) {
496- $k= lc $1; $v= $2;
497- if (defined($kmap{$k})) { $k= $kmap{$k}; }
498- if (@kn= grep($k eq lc $_, @fieldpri)) {
499- @kn==1 || die $k;
500- $k= $kn[0];
501- }
502- $v =~ s/\s+$//;
503- $tv{$k}= $v;
504- }
505- $t =~ /^\n*$/
506- or die "Unprocessed text from $fn control file; info:\n$o / $t\n";
507-
508- defined($tv{'Package'})
509- or die "No Package field in control file of $fn\n";
510- $p= $tv{'Package'}; delete $tv{'Package'};
511-
512- $arch=$tv{'Architecture'};
513- if (defined($opt_arch)) {
514- if ($arch =~ $opt_arch || $arch =~ "all") {
515-# print(STDERR " ! Package $p ($fn) is for the correct architecture $opt_arch: $arch\n");
516- } else {
517-# print(STDERR " ! Package $p ($fn) is not for the correct architecture $opt_arch: $arch\n");
518- next;
519- }
520- }
521-
522- if (defined($p1{$p})) {
523- if (&vercmp($tv{'Version'}, $pv{$p,'Version'})) {
524- print(STDERR " ! Package $p (filename $fn) is repeat but newer version;\n".
525- " used that one and ignored data from $pfilename{$p} !\n")
526- || die $!;
527- delete $p1{$p};
528- for $k (keys %k1) {
529- delete $pv{$p,$k};
530- }
531- } else {
532- print(STDERR " ! Package $p (filename $fn) is repeat;\n".
533- " ignored that one and using data from $pfilename{$p} !\n")
534- || die $!;
535- next;
536- }
537- }
538- print(STDERR " ! Package $p (filename $fn) has Filename field!\n") || die $!
539- if defined($tv{'Filename'});
540-
541- $tv{'Filename'}= "$pathprefix$fn";
542-
543- open(C,"md5sum $fn |") || die "$fn $!";
544- chop($_=<C>); close(C); $? and die "\`md5sum < $fn' exited with $?\n";
545- /^[0-9a-f]{32}/ or die "Strange text from \`md5sum < $fn': \`$_'\n";
546- s/\ .*$//;
547- $tv{'MD5sum'}= $_;
548-
549- @stat= stat($fn) or die "Couldn't stat $fn: $!\n";
550- $stat[7] or die "$fn is empty\n";
551- $tv{'Size'}= $stat[7];
552-
553- if (length($tv{'Revision'})) {
554- $tv{'Version'}.= '-'.$tv{'Revision'};
555- delete $tv{'Revision'};
556- }
557-
558- for $k (keys %tv) {
559- $pv{$p,$k}= $tv{$k};
560- $k1{$k}= 1;
561- $p1{$p}= 1;
562- }
563-
564- $_= substr($fn,length($binarydir));
565- s#/[^/]+$##; s#^/*##;
566- $psubdir{$p}= $_;
567- $pfilename{$p}= $fn;
568-}
569-close(F);
570-$? and warn "find exited with $?\n";
571-
572-select(STDERR); $= = 1000; select(STDOUT);
573-
574-format STDERR =
575- ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
576-$packages
577-.
578-
579-sub writelist {
580- $title= shift(@_);
581- return unless @_;
582- print(STDERR " $title\n") || die $!;
583- $packages= join(' ',sort @_);
584- while (length($packages)) { write(STDERR) || die $!; }
585- print(STDERR "\n") || die $!;
586-}
587-
588-@samemaint=();
589-
590-if ($override =~ /\.gz$/) {
591-open(O, "/bin/zcat $override|")
592- or die "Couldn't open override file $override: $!\n";
593-} else {
594-open(O, $override)
595- or die "Couldn't open override file $override: $!\n";
596-}
597-while (<O>) {
598- s/\#.*//;
599- s/\s+$//;
600- ($p,$priority,$section,$maintainer)= split(/\s+/,$_,4);
601- next unless defined($p1{$p});
602- if (length($maintainer)) {
603- if ($maintainer =~ m/\s*=\>\s*/) {
604- $oldmaint= $`; $newmaint= $'; $debmaint= $pv{$p,'Maintainer'};
605- if (!grep($debmaint eq $_, split(m:\s*//\s*:, $oldmaint))) {
606- push(@changedmaint,
607- " $p (package says $pv{$p,'Maintainer'}, not $oldmaint)\n");
608- } else {
609- $pv{$p,'Maintainer'}= $newmaint;
610- }
611- } elsif ($pv{$p,'Maintainer'} eq $maintainer) {
612- push(@samemaint," $p ($maintainer)\n");
613- } else {
614- print(STDERR " * Unconditional maintainer override for $p *\n") || die $!;
615- $pv{$p,'Maintainer'}= $maintainer;
616- }
617- }
618- $pv{$p,'Priority'}= $priority;
619- $pv{$p,'Section'}= $section;
620- ($sectioncut = $section) =~ s:^[^/]*/::;
621- if (length($psubdir{$p}) && $section ne $psubdir{$p} &&
622- $sectioncut ne $psubdir{$p}) {
623- print(STDERR " !! Package $p has \`Section: $section',".
624- " but file is in \`$psubdir{$p}' !!\n") || die $!;
625- $ouches++;
626- }
627- $o1{$p}= 1;
628-}
629-close(O);
630-print(STDERR "\n") || die $! if $ouches;
631-
632-$k1{'Maintainer'}= 1;
633-$k1{'Priority'}= 1;
634-$k1{'Section'}= 1;
635-
636-@missingover=();
637-
638-for $p (sort keys %p1) {
639- if (!defined($o1{$p})) {
640- push(@missingover,$p);
641- }
642- $r= "Package: $p\n";
643- for $k (sort { $pri{$b} <=> $pri{$a} } keys %k1) {
644- next unless length($pv{$p,$k});
645- $r.= "$k: $pv{$p,$k}\n";
646- }
647- $r.= "X-Medium: $opt_medium\n" if (defined $opt_medium);
648- $r.= "\n";
649- $written++;
650- $p1{$p}= 1;
651- print(STDOUT $r) or die "Failed when writing stdout: $!\n";
652-}
653-close(STDOUT) or die "Couldn't close stdout: $!\n";
654-
655-@spuriousover= grep(!defined($p1{$_}),sort keys %o1);
656-
657-&writelist("** Packages in archive but missing from override file: **",
658- @missingover);
659-if (@changedmaint) {
660- print(STDERR
661- " ++ Packages in override file with incorrect old maintainer value: ++\n",
662- @changedmaint,
663- "\n") || die $!;
664-}
665-if (@samemaint) {
666- print(STDERR
667- " -- Packages specifying same maintainer as override file: --\n",
668- @samemaint,
669- "\n") || die $!;
670-}
671-if (@spuriousover) {
672- print(STDERR
673- " -- Packages in override file but not in archive: --\n",
674- @spuriousover,
675- "\n") || die $!;
676-}
677-
678-print(STDERR " Wrote $written entries to output Packages file.\n") || die $!;
679diff --git a/tools/pi-makelist-vfat b/tools/pi-makelist-vfat
680deleted file mode 100755
681index 8938d02..0000000
682--- a/tools/pi-makelist-vfat
683+++ /dev/null
684@@ -1,53 +0,0 @@
685-#!/bin/sh
686-
687-set -e
688-
689-if [ $# != 1 ]; then
690- cat << EOF
691-Usage: pi-makelist-vfat image.img >image.list
692-
693-Outputs list of files in a VFAT or in the VFAT of the second partition
694-EOF
695- exit 1
696-fi
697-IMG="$1"
698-
699-MTOOLSRC=""
700-cleanup() {
701- if [ -n "$MTOOLSRC" ]; then
702- rm -f "$MTOOLSRC"
703- fi
704-}
705-trap "cleanup" 0 1 2 3 9 11 13 15
706-export MTOOLSRC=`tempfile --prefix pimkl --mode 644`
707-
708-# will try both of C: and D:
709-cat >$MTOOLSRC <<EOF
710-drive c:
711- file="$IMG"
712-
713-drive d:
714- file="$IMG"
715- partition=1
716-
717-drive e:
718- file="$IMG"
719- partition=2
720-EOF
721-
722-ARGS="-/ -f -a -b"
723-
724-drive=""
725-for d in "c:" "d:" "e:"; do
726- if mdir "$d" $ARGS >/dev/null 2>&1; then
727- drive="$d"
728- break
729- fi
730-done
731-
732-if [ -z "$drive" ]; then
733- echo "$0: Couldn't list any drive" >&2
734- exit 1
735-fi
736-
737-mdir "$drive" $ARGS | sed '/\/$/ d; s/^[CDE]://'

Subscribers

People subscribed via source and target branches