Skip to content

Commit 91d4706

Browse files
authored
Merge pull request mvallim#27 from mvallim/feat-configure-manifest
Customize package removal
2 parents 3945454 + ceaa543 commit 91d4706

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

scripts/build.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ function load_config() {
8888
# Verify that necessary configuration values are set and they are valid
8989
function check_config() {
9090
local expected_config_version
91-
expected_config_version="0.2"
91+
expected_config_version="0.3"
9292

9393
if [[ "$CONFIG_FILE_VERSION" != "$expected_config_version" ]]; then
9494
>&2 echo "Invalid or old config version $CONFIG_FILE_VERSION, expected $expected_config_version. Please update your configuration file from the default."
@@ -192,11 +192,9 @@ EOF
192192
# generate manifest
193193
sudo chroot chroot dpkg-query -W --showformat='${Package} ${Version}\n' | sudo tee image/casper/filesystem.manifest
194194
sudo cp -v image/casper/filesystem.manifest image/casper/filesystem.manifest-desktop
195-
sudo sed -i '/ubiquity/d' image/casper/filesystem.manifest-desktop
196-
sudo sed -i '/casper/d' image/casper/filesystem.manifest-desktop
197-
sudo sed -i '/discover/d' image/casper/filesystem.manifest-desktop
198-
sudo sed -i '/laptop-detect/d' image/casper/filesystem.manifest-desktop
199-
sudo sed -i '/os-prober/d' image/casper/filesystem.manifest-desktop
195+
for pkg in $TARGET_PACKAGE_REMOVE; do
196+
sudo sed -i "/$pkg/d" image/casper/filesystem.manifest-desktop
197+
done
200198

201199
# compress rootfs
202200
sudo mksquashfs chroot image/casper/filesystem.squashfs \

scripts/default_config.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@ export GRUB_LIVEBOOT_LABEL="Try Ubuntu FS without installing"
2323
# The text label shown in GRUB for starting installation
2424
export GRUB_INSTALL_LABEL="Install Ubuntu FS"
2525

26+
# Packages to be removed from the target system after installation completes succesfully
27+
export TARGET_PACKAGE_REMOVE="
28+
ubiquity \
29+
casper \
30+
discover \
31+
laptop-detect \
32+
os-prober \
33+
"
34+
2635
# Package customisation function. Update this function to customize packages
2736
# present on the installed system.
2837
function customize_image() {
@@ -55,4 +64,4 @@ function customize_image() {
5564

5665
# Used to version the configuration. If breaking changes occur, manual
5766
# updates to this file from the default may be necessary.
58-
export CONFIG_FILE_VERSION="0.2"
67+
export CONFIG_FILE_VERSION="0.3"

0 commit comments

Comments
 (0)