From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6566555412143800320 X-Received: by 2002:adf:de03:: with SMTP id b3-v6mr128927wrm.4.1529061118518; Fri, 15 Jun 2018 04:11:58 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:adf:e68b:: with SMTP id r11-v6ls3433731wrm.0.gmail; Fri, 15 Jun 2018 04:11:58 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJnbWJ1gi73I6FMEnDHszMae4YLncpSWNKVbkzuqxy0fJ2IW7vKMt0R5BWmZcL1q+dQ1ix5 X-Received: by 2002:adf:f082:: with SMTP id n2-v6mr126787wro.11.1529061118170; Fri, 15 Jun 2018 04:11:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529061118; cv=none; d=google.com; s=arc-20160816; b=ZTlDYwEPsWnKfdnXmh4jcxZaw2lkt/joYNOiOUu4ZWpoypFTyMGbtF6HGakLRScJyy 8ektltW8bGa8Z7lgTz9+WBH++hnA/EDrrKbzE7ED326qdz0BauQwMgtIgrLMO/4JVTa2 ZtBJnIhx+AaO/gJ0krtrdSvuZ26/kwOUgsEo2vCtOCY67M/t52YYW9VQPAtB6QD1jGjU D8F8NyD3ULuclJb6TK9kOzvzzufwlKn2HL29bQ3CXnZYdoqUbIybk71Nt8skVC+wQinM RZigIoXF/lN0h4o808B/cYykPPZfNg/2bMdtfMP07VYchCPeeIcvgsvbV/SP+k1Ru2yg u85Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:arc-authentication-results; bh=vgIubnzXUm5udn3g/ZrWre4Ii2hyilWaevIdiN9HmVk=; b=mkBzfBpxIeRC948neGiOyVHB5TV2KHvvR/uKjG5J9gwHYEX9yH+vbt7nsavkWf3EZx vGUa9OJV/7+677MA7vSo55N9XOuH23tuLClSH/rQ1MCWaJPCHn7uUoX3SqoLIQ83Sm8u 26wju7fJ4G+G+Qu0ODJDS5e6QG4Ya+Lv1I/Zy3o2s8U65xrVFR6azJxUEt85JRcJL9ew DqfB21B7QajbgprsI4rqdLG5/Poh6tnrt3607BwOWZPy4FSMrCFR6IKHejExCnK2gO0o 7O++//sO/oZUpTlWL/OpmHWboVQnbbemcbR9FeQXOZtN8CbeIIQVVipFgdY7f5emYceE C5IQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Return-Path: Received: from aqmola.ilbers.de (aqmola.ilbers.de. [85.214.62.211]) by gmr-mx.google.com with ESMTPS id r7-v6si170771wmc.0.2018.06.15.04.11.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Jun 2018 04:11:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) client-ip=85.214.62.211; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Received: from azat.radix50.net (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id w5FBBs6x005089 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT); Fri, 15 Jun 2018 13:11:57 +0200 Date: Fri, 15 Jun 2018 13:11:54 +0200 From: Alexander Smirnov To: Henning Schild Cc: isar-users@googlegroups.com Subject: Re: [PATCH 1/9] isar-bootstrap: Add routin to determine host arch Message-ID: <20180615111154.GE24273@azat.radix50.net> References: <20180613130807.2461-1-asmirnov@ilbers.de> <20180613130807.2461-2-asmirnov@ilbers.de> <20180614132318.5f3ce768@md1pvb1c.ad001.siemens.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180614132318.5f3ce768@md1pvb1c.ad001.siemens.net> User-Agent: Mutt/1.5.23 (2014-03-12) X-TUID: hKXEOhfiuJCf Hi Henning, > Am Wed, 13 Jun 2018 15:07:59 +0200 > schrieb Alexander Smirnov : > > > This method will be used to distinguish host and target bootstraps. > > The standard python platform module is not robust here, because it > > provides the architecture label from kernel. For example running > > platfotm.machine() on Fedora kernel will return 'x86_64', what is > > invalid specificator for Debian systems. > > > > Signed-off-by: Alexander Smirnov > > --- > > meta/classes/isar-bootstrap-helper.bbclass | 9 +++++++++ > > 1 file changed, 9 insertions(+) > > > > diff --git a/meta/classes/isar-bootstrap-helper.bbclass > > b/meta/classes/isar-bootstrap-helper.bbclass index 3c10fc7..2598ea3 > > 100644 --- a/meta/classes/isar-bootstrap-helper.bbclass > > +++ b/meta/classes/isar-bootstrap-helper.bbclass > > @@ -14,6 +14,15 @@ def reverse_bb_array(d, varname): > > array = reversed(array.split()) > > return " ".join(i for i in array) > > > > +python () { > > + import subprocess > > + host_arch = subprocess.Popen("/usr/bin/dpkg > > --print-architecture", > > + shell=True, > > + stdout=subprocess.PIPE > > + ).stdout.read().decode('utf-8').strip() > > + d.setVar("HOST_ARCH", host_arch); > > +} > > Consider not using an absolute path. That defeats the magic of PATH. I agree with you here, but btw, do you (or probably somebody else) know how to workaround this in python subprocess? An attempt to run just 'dpkg' fails with the error: command not found. Alex > Henning > > > + > > setup_root_file_system() { > > CLEAN="" > > FSTAB="" >