Skip to content

Commit 636bb7d

Browse files
committed
Fix for manifest not being created properly
1 parent a357956 commit 636bb7d

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

distroshare-ubuntu-imager.sh

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#GPL2 License
1212

13-
VERSION="1.0.2"
13+
VERSION="1.0.3"
1414

1515
echo "
1616
################################################
@@ -75,6 +75,15 @@ echo "Installing the essential tools"
7575
apt-get -q=2 update
7676
apt-get -q=2 install grub2 xorriso squashfs-tools
7777

78+
echo "Installing Ubiquity"
79+
apt-get -q=2 install casper lupin-casper
80+
echo "GTK is: $GTK"
81+
if [ "$GTK" == "YES" ]; then
82+
apt-get -q=2 install ubiquity-frontend-gtk
83+
else
84+
apt-get -q=2 install ubiquity-frontend-qt
85+
fi
86+
7887
#Copy the filesystem
7988
echo "Copying the current system to the new directories"
8089
rsync -a --one-file-system --exclude=/proc/* --exclude=/dev/* \
@@ -137,15 +146,6 @@ cat > "${WORK}"/rootfs/distroshare_imager.sh <<EOF
137146
umask 022
138147
139148
#Modify copied distro
140-
echo "Installing Ubiquity"
141-
apt-get -q=2 install casper lupin-casper
142-
echo "GTK is: $GTK"
143-
if [ "$GTK" == "YES" ]; then
144-
apt-get -q=2 install ubiquity-frontend-gtk
145-
else
146-
apt-get -q=2 install ubiquity-frontend-qt
147-
fi
148-
149149
if [ -n "$UBIQUITY_KERNEL_PARAMS" ]; then
150150
echo "Replacing ubiquity default extra kernel params with: $UBIQUITY_KERNEL_PARAMS"
151151
sed -i "s/defopt_params=\"\"/defopt_params=\"${UBIQUITY_KERNEL_PARAMS}\"/" \
@@ -157,9 +157,6 @@ echo "Updating initramfs"
157157
depmod -a $(uname -r)
158158
update-initramfs -u -k all > /dev/null 2>&1
159159
160-
echo "Creating filesystem.manifest"
161-
dpkg-query -W --showformat='${Package} ${Version}\n' > /filesystem.manifest
162-
163160
#Clean up downloaded packages
164161
echo "Cleaning up files that are not needed in the new image"
165162
apt-get clean
@@ -231,16 +228,19 @@ cp -p "${WORK}"/rootfs/boot/vmlinuz-${kversion} "${CASPER}"/vmlinuz
231228
cp -p "${WORK}"/rootfs/boot/initrd.img-${kversion} "${CASPER}"/initrd.img
232229
cp -p "${WORK}"/rootfs/boot/memtest86+.bin "${CD}"/boot
233230

234-
echo "Copying filesystem.manifest"
235-
cp "${WORK}"/rootfs/filesystem.manifest "${CASPER}"/
231+
echo "Creating filesystem.manifest"
232+
dpkg-query -W --showformat='${Package} ${Version}\n' > "${CASPER}"/filesystem.manifest
236233

237234
cp "${CASPER}"/filesystem.manifest{,-desktop}
238-
REMOVE='ubiquity casper user-setup os-prober libdebian-installer4'
235+
REMOVE='ubiquity ubiquity-frontend-gtk ubiquity-frontend-kde casper user-setup os-prober libdebian-installer4'
239236
for i in $REMOVE
240237
do
241238
sed -i "/${i}/d" "${CASPER}"/filesystem.manifest-desktop
242239
done
243240

241+
echo "Uninstalling Ubiquity"
242+
apt-get -q=2 remove casper lupin-casper ubiquity
243+
244244
echo "Removing temp files"
245245
rm -rf "${WORK}"/rootfs/tmp/*
246246
rm -rf "${WORK}"/rootfs/run/*

0 commit comments

Comments
 (0)