Merge ~mwhudson/debian-cd/+git/ubuntu:no-status into ~ubuntu-cdimage/debian-cd/+git/ubuntu:main

Proposed by Michael Hudson-Doyle
Status: Merged
Merged at revision: 59fa681355fbaf95ad80df6b7e00e23977b8e73c
Proposed branch: ~mwhudson/debian-cd/+git/ubuntu:no-status
Merge into: ~ubuntu-cdimage/debian-cd/+git/ubuntu:main
Diff against target: 178 lines (+12/-83)
5 files modified
Makefile (+7/-49)
README (+2/-9)
build_all.sh (+1/-1)
tools/apt-selection (+1/-3)
tools/list2cds (+1/-21)
Reviewer Review Type Date Requested Status
Steve Langasek Approve
Review via email: mp+456813@code.launchpad.net

Commit message

remove all mention of apt/dpkg status file

There is support for using a dpkg status file to seed the list of
package that get included on an ISO. I'm not sure if this way of doing
things has ever been relevant for Ubuntu but it certainly is not any
more.

Description of the change

Step 0.1 of doing apt stuff differently in ubuntu-cdimage and debian-cd

To post a comment you must log in.
Revision history for this message
Steve Langasek (vorlon) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/Makefile b/Makefile
2index b87b8a3..bfc52ff 100644
3--- a/Makefile
4+++ b/Makefile
5@@ -274,17 +274,11 @@ src-distclean:
6 $(Q)echo "Cleaning the source build directory"
7 $(Q)rm -rf $(SDIR)
8
9-## STATUS and APT ##
10+## APT ##
11
12-INDEX_EXTENSION=xz
13-INDEX_DECOMPRESSOR=xzcat
14-
15-# Regenerate the status file with only packages that
16-# are of priority standard or higher
17-status: init $(ADIR)/status
18-$(ADIR)/status:
19- @echo "Generating a fake status file for apt-get and apt-cache..."
20- :> $(ADIR)/status
21+# Configure apt stuff
22+apt-setup: init $(ADIR)/apt-setup
23+$(ADIR)/apt-setup:
24 @echo "Setting up archive keyring from host keyring"
25 $(Q)mkdir -p $(ADIR)/apt/trusted.gpg.d
26 $(Q)for file in /etc/apt/trusted.gpg.d/*; do \
27@@ -292,42 +286,11 @@ $(ADIR)/status:
28 ln -s $$file $(ADIR)/apt/trusted.gpg.d/$$(basename $$file); \
29 fi; \
30 done
31- # Updating the apt database
32+ # Create the apt state directory and update the database
33 $(Q)$(apt) update
34- #
35- # Checking the consistence of the standard system
36- # If this does fail, then launch make correctstatus
37- #
38- $(Q)$(apt) check || $(MAKE) correctstatus
39-
40-# Only useful if the standard system is broken
41-# It tries to build a better status file with apt-get -f install
42-correctstatus: status apt-update
43- # You may need to launch correctstatus more than one time
44- # in order to correct all dependencies
45- #
46- # Removing packages from the system :
47- $(Q)set -e; \
48- for i in `$(apt) deselected -f install`; do \
49- echo $$i; \
50- perl -i -000 -ne "print unless /^Package: \Q$$i\E/m" \
51- $(ADIR)/status; \
52- done
53- #
54- # Adding packages to the system :
55- $(Q)set -e; \
56- for i in `$(apt) selected -f install`; do \
57- echo $$i; \
58- $(apt) cache dumpavail | perl -000 -ne \
59- "s/^(Package: .*)\$$/\$$1\nStatus: install ok installed/m; \
60- print if /^Package: \Q$$i\E\s*\$$/m;" \
61- >> $(ADIR)/status; \
62- done
63- #
64- # Showing the output of apt-get check :
65- $(Q)$(apt) check
66+ touch $(ADIR)/apt-setup
67
68-apt-update: status
69+apt-update: apt-setup
70 @echo "Apt-get is updating its files ..."
71 $(Q)$(apt) update
72
73@@ -744,8 +707,3 @@ conf:
74 official_images: bin-official_images src-official_images
75 bin-official_images: ok bootable bin-images
76 src-official_images: ok src-infos src-images
77-
78-$(CODENAME)_status: ok init
79- @echo "Using the provided status file for $(CODENAME)-$(ARCH) ..."
80- $(Q)cp $(BASEDIR)/data/$(CODENAME)/status.$(ARCH) $(ADIR)/status \
81- 2>/dev/null || $(MAKE) status || $(MAKE) correctstatus
82diff --git a/README b/README
83index 9b93084..a447282 100644
84--- a/README
85+++ b/README
86@@ -44,7 +44,7 @@ Edit the CONF.sh and change the PATHs for the mirror and so on.
87 $ sensible-editor CONF.sh
88 $ . CONF.sh
89 $ make distclean
90-$ make status
91+$ make apt-setup
92 $ make list COMPLETE=1 SIZELIMIT1=625000000 SRCSIZELIMIT=665000000
93 $ make official_images
94 [ alternatively, if you only want binary images:
95@@ -93,14 +93,7 @@ The process of building a CD is composed of the following steps:
96
97 - then we initialize the temporary directory used for the build:
98
99- $ make status
100-
101- If this has failed then this will be automatically launched:
102-
103- $ make correctstatus
104-
105- Note however that "make status" should never fail if it is
106- used for building a CD set for the stable release...
107+ $ make apt-setup
108
109 - now you can decide what you want on your CDs
110
111diff --git a/build_all.sh b/build_all.sh
112index 89589a0..0c2cbb3 100755
113--- a/build_all.sh
114+++ b/build_all.sh
115@@ -33,7 +33,7 @@ do
116 fi
117 echo " ... cleaning"
118 make distclean
119- make ${CODENAME}_status
120+ make apt-setup
121
122 echo " ... selecting packages to include"
123 SIZE_ARGS=''
124diff --git a/tools/apt-selection b/tools/apt-selection
125index 76e8c5a..a8a524f 100755
126--- a/tools/apt-selection
127+++ b/tools/apt-selection
128@@ -24,7 +24,7 @@ if [ -z "$FULLARCH" ]; then
129 FULLARCH="$ARCH"
130 fi
131
132-options=" -q -o Dir::State::status=$APTTMP/$CODENAME-$FULLARCH/status \
133+options=" -q -o Dir::State::status=/dev/null
134 -o Dir::State=$APT_STATE -o Dir::Cache=$APT_CACHE \
135 -o Dir::Etc=$APTTMP/$CODENAME-$FULLARCH/apt/ \
136 -o APT::Cache::AllVersions=0 \
137@@ -63,8 +63,6 @@ if [ ! -d "$APTTMP/$CODENAME-$FULLARCH/apt" ]; then
138 mkdir -p "$APTTMP/$CODENAME-$FULLARCH/apt"
139 fi
140
141-touch "$APTTMP/$CODENAME-$FULLARCH/status"
142-
143 case $MIRROR in
144 *:*)
145 SCHEMA=
146diff --git a/tools/list2cds b/tools/list2cds
147index d45f2f4..1100519 100755
148--- a/tools/list2cds
149+++ b/tools/list2cds
150@@ -152,27 +152,7 @@ while (@list) {
151 }
152 =cut
153
154-msg(0, "-- Adding standard, required, important and base packages \n" .
155- " on the first CD ...\n");
156-# Automatically include packages listed in the status file
157-open(STATUS, "< $adir/status") || die "Can't open status file : $!\n";
158-while (defined($_ = <STATUS>)) {
159- next if not m/^Package: (\S+)/;
160- $p = $1;
161- if (not exists $packages{$p}) {
162- msg(1, "WARNING: Package `$p' is listed in the status file "
163- . "but doesn't exist ! (ignored) \n",
164- " TIP: Try to generate the status file with " .
165- "make (correct)status (after a make distclean)...\n");
166- next;
167- }
168- next if $excluded{$p};
169- add_package($p, ! $norecommends, ! $nosuggests);
170-}
171-close STATUS;
172-msg(0, " Standard system already takes $cd_size bytes on the first CD.\n");
173-
174-# Now start to look for packages wanted by the user ...
175+# Start to look for packages wanted by the user ...
176 msg(0, "-- Starting to add packages to the CDs ...\n");
177 open (LIST, "< $list") || die "Can't open $list : $!\n";
178 while (defined($_=<LIST>)) {

Subscribers

People subscribed via source and target branches