[elbe-devel] [PATCH v2 08/24] rfs: debootstrap always into clean target dir

Torben Hohn torben.hohn at linutronix.de
Thu Feb 8 15:14:20 CET 2018


On Thu, Feb 08, 2018 at 02:16:54PM +0100, Manuel Traut wrote:
> deboostraping causes errors if running on an existing filesystem.
> Ensure on call to run on a plain but preinitialized directory.
> 
> Signed-off-by: Manuel Traut <manut at linutronix.de>

Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>

> ---
>  elbepack/rfs.py | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/elbepack/rfs.py b/elbepack/rfs.py
> index 111408b1..6c2ffa4a 100644
> --- a/elbepack/rfs.py
> +++ b/elbepack/rfs.py
> @@ -43,6 +43,9 @@ class BuildEnv ():
>          if clean:
>              self.rfs.rmtree("")
>  
> +        self.gen_base_files()
> +
> +    def gen_base_files(self):
>          # TODO think about reinitialization if elbe_version differs
>          if not self.rfs.isfile("etc/elbe_version"):
>              # avoid starting daemons inside the buildenv
> @@ -99,6 +102,11 @@ class BuildEnv ():
>          cleanup = False
>          suite = self.xml.prj.text("suite")
>  
> +        # deboostraping causes errors if running on an existing filesystem
> +        # ensure to run on an empty directory
> +        self.rfs.rmtree("/")
> +        self.gen_base_files()
> +
>          primary_mirror = self.xml.get_primary_mirror(
>              self.rfs.fname('/cdrom/targetrepo'))
>  
> -- 
> 2.15.1
> 

-- 
Mit freundlichen Grüßen
Torben Hohn

Linutronix GmbH

Standort: Bremen

Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99

Firmensitz / Registered Office: D-88690 Uhldingen, Bahnhofstr. 3
Registergericht / Local District Court: Amtsgericht Freiburg i. Br.; HRB
Nr. / Trade register no.: 700 806

Geschäftsführer / Managing Directors: Heinz Egger, Thomas Gleixner

Eine Bitte von uns: Sollten Sie diese E-Mail irrtümlich erhalten haben,
benachrichtigen Sie uns in diesem Falle bitte sobald wie es Ihnen
möglich ist, durch Antwort-Mail. Vielen Dank!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.linutronix.de/pipermail/elbe-devel/attachments/20180208/d1a44841/attachment.sig>


More information about the elbe-devel mailing list