system-image should not generate an empty 'removed' file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu system image |
New
|
Undecided
|
Unassigned |
Bug Description
Attempting to upgrade an amd64 snappy system at s-i level r345 failed. The cause was the upgrader barfing on the fact that one of the upgrade tars contained an invalid 'removed' file.
s-i version on the snappy system:
$ dpkg -l|grep system-image
ii system-image-cli 2.5-0ubuntu1+ppa22 all Ubuntu system image updater command line client
ii system-image-common 2.5-0ubuntu1+ppa22 all Ubuntu system image updater
ii system-image-dbus 2.5-0ubuntu1+ppa22 all Ubuntu system image updater command line client
ii ubuntu-core-snappy 0.2~ppa89 all Tool to manage the ubuntu-system-image
The system was running r345, but I faked a downgrade to r344 and attempted to upgrade to r345.
Files downloaded by s-i:
device-
device-
image-master.tar.xz
image-master.
image-signing.
image-signing.
ubuntu-
ubuntu-
version-345.tar.xz
version-
The 'ubuntu_command' files contains:
load_keyring image-master.tar.xz image-master.
load_keyring image-signing.
mount system
update ubuntu-
update device-
update version-345.tar.xz version-
unmount system
The problematic update archive:
$ tar tvf device-
-rw-r--r-- root/root 1 2015-03-26 14:55 removed
drwxr-xr-x root/root 0 2015-03-26 14:13 system/boot/
-rw------- root/root 3608220 2015-03-23 17:16 system/
-rw-r--r-- root/root 1265400 2015-03-23 17:16 system/
-rw-r--r-- root/root 14443156 2015-03-26 14:13 system/
-rw------- root/root 6610240 2015-03-23 17:16 system/
lrwxrwxrwx root/root 0 2015-03-26 14:11 system/initrd.img -> boot/initrd.
lrwxrwxrwx root/root 0 2015-03-26 14:11 system/vmlinuz -> boot/vmlinuz-
The erroneous 'removed' file from above contains:
$ od -xc removed
0000000 000a
\n
0000001
Related branches
- Michael Vogt (community): Needs Information
-
Diff: 406 lines (+157/-56)5 files modifieddebian/changelog (+9/-0)
functional/test_upgrader.py (+78/-20)
ubuntucoreupgrader/tests/test_upgrader.py (+46/-10)
ubuntucoreupgrader/tests/utils.py (+6/-3)
ubuntucoreupgrader/upgrader.py (+18/-23)
I'm not sure why an empty removed file is considered invalid. If there's nothing to remove, the file should still be there (so it doesn't break the phone upgrader) and since there's nothing to iterate over, nothing gets removed.