trynd / wren

Linux boot platform that provides a portable, multi-system, run-in-memory Linux environment.
GNU General Public License v3.0
0 stars 1 forks source link

wrender rebuild (-p) fails on uninstall step #20

Open codewithmichael opened 9 years ago

codewithmichael commented 9 years ago

In rebuilding the platform image (with the -p parameter) today I noticed an issue with both the UNINSTALL and INSTALL steps.

As long as the setlist values haven't changed for SETLIST_UNINSTALL or SETLIST_INSTALL, you can simply add the wrender options --skip-uninstall and --skip-install, but if there are any platform-level package changes that would require performing the operations manually mid-build.

The solution to the issues in both steps is probably just to check if a package is installed before performing the action — e.g. only uninstall installed packages and only install uninstalled packages. Of course, we may need to go a step further in INSTALL to check the version number.

codewithmichael commented 9 years ago

Here are the applicable wrender runtime blocks. Note that in INSTALL the new version and old version are exactly the same for each package —e.g. "Unpacking squashfs-tools (1:4.2+20130409-2) over (1:4.2+20130409-2) ..."

---------
UNINSTALL
---------

Uninstalling Packages: grub grub-common grub-pc grub2 grub2-common lilo elilo apt-xapian-index oneconf ubuntuone-installer

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'grub' is not installed, so not removed
Package 'grub-pc' is not installed, so not removed
Package 'grub2' is not installed, so not removed
Package 'lilo' is not installed, so not removed
Package 'elilo' is not installed, so not removed
Package 'apt-xapian-index' is not installed, so not removed
Package 'oneconf' is not installed, so not removed
Package 'ubuntuone-installer' is not installed, so not removed
E: Unable to locate package grub-common
E: Unable to locate package grub2-common
Unable to uninstall setlist packages - exiting...
-------
INSTALL
-------

Installing Package: squashfs-tools (squashfs-tools_1%3a4.2+20130409-2_i386.deb)

(Reading database ... 163334 files and directories currently installed.)
Preparing to unpack .../squashfs-tools_1%3a4.2+20130409-2_i386.deb ...
Unpacking squashfs-tools (1:4.2+20130409-2) over (1:4.2+20130409-2) ...
Setting up squashfs-tools (1:4.2+20130409-2) ...
Processing triggers for man-db (2.6.7.1-1) ...

Installing Package: watershed (watershed_7_i386.deb)

(Reading database ... 163334 files and directories currently installed.)
Preparing to unpack /mnt/watershed_7_i386.deb ...
Unpacking watershed (7) over (7) ...
Setting up watershed (7) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.103ubuntu4.2) ...
update-initramfs: Generating /boot/initrd.img-3.13.0-32-generic

Installing Package: lvm2 (lvm2_2.02.98-6ubuntu2_i386.deb)

(Reading database ... 163334 files and directories currently installed.)
Preparing to unpack .../lvm2_2.02.98-6ubuntu2_i386.deb ...
Unpacking lvm2 (2.02.98-6ubuntu2) over (2.02.98-6ubuntu2) ...
Setting up lvm2 (2.02.98-6ubuntu2) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for man-db (2.6.7.1-1) ...
Processing triggers for initramfs-tools (0.103ubuntu4.2) ...
update-initramfs: Generating /boot/initrd.img-3.13.0-32-generic