[Tails-dev] Please review'n'merge liveusb-creator's bugfix/d…

Delete this message

Reply to this message
Author: intrigeri
Date:  
To: tails-dev
Subject: [Tails-dev] Please review'n'merge liveusb-creator's bugfix/dont-fail-upgrade-if-tmp-dir-exists-on-destination
Hi,

yet another incremental merge request for incremental updates :)

please review'n'merge the
bugfix/dont-fail-upgrade-if-tmp-dir-exists-on-destination branch into
master, in the liveusb-creator Git repository. This is a one-word
change, and needs to be merged as a pre-requisite for incremental
updates. Thus candidate for 0.22. No ticket, no branch in the main
Tails repo.

I've not bothered creating a snapshot .deb etc., so please just apply
the one-word patch to a running Tails copy for testing.

Credits go to mercedes508 for reporting the bug with enough
information to debug it.

The commit in there is:

commit 95b9557b42b2cadaadd330ed2defac5558d79f1f
Author: Tails developers <tails@???>
Date: Mon Nov 18 15:42:27 2013 +0000

    Add "tmp" to the liveos_toplevel_files list.


    Then, get_liveos_toplevel_files will return it,
    and delete_liveos will delete it at "clone and upgrade" time,
    before the source files are copied to the destination filesystem.


    This is especially important once incremental updates are deployed,
    since "tmp" will be used by tails-iuk, and possibly not removed
    every time.


    Without this change, one gets the following stack trace (and a partially
    upgraded device) when a "tmp" directory exists both on the source and
    destination Tails system partitions:


      File "/usr/lib/python2.6/dist-packages/liveusb/gui.py", line 253, in run self.live.extract_iso()
      File "/usr/lib/python2.6/dist-packages/liveusb/creator.py", line 147, in extract_iso self.source.clone(self.dest)
      File "/usr/lib/python2.6/dist-packages/liveusb/source.py", line 97, in clone shutil.copytree(src, dst)
      File "/usr/lib/python2.6/shutil.py", line 142, in copytree os.makedirs(dst)
      File "/usr/lib/python2.6/os.py", line 157, in makedirs mkdir(name, mode)


Cheers,
--
intrigeri
| GnuPG key @ https://gaffer.ptitcanardnoir.org/intrigeri/intrigeri.asc
| OTR fingerprint @ https://gaffer.ptitcanardnoir.org/intrigeri/otr.asc