Re: [Tails-dev] Please review'n'merge liveusb-creator's bug…

Delete this message

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

On Mon, 18 Nov 2013 17:59:29 +0100 intrigeri <intrigeri@???> wrote:
> 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)

>

- created directory `tmp` in the source tails and in the destination
tails
- applied the patch on the running source
- ran "clone and upgrade" (or `/usr/bin/liveusb-creator -u -n -x --clone -v`)
- got the same stacktrace. I don't see what I have done wrong, so I'm
afraid the fix doesn't work