From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6664521764891000832 X-Received: by 2002:a2e:391d:: with SMTP id g29mr2247083lja.17.1552407456306; Tue, 12 Mar 2019 09:17:36 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:3e16:: with SMTP id l22ls2540983lja.2.gmail; Tue, 12 Mar 2019 09:17:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqxufT9EXzD5VthFTiRSk8hMHkLcc4lvpjeMS47PsiKDv8Fky6oOcHgSSaNXjsm10XJHiHpE X-Received: by 2002:a2e:9ec6:: with SMTP id h6mr2156170ljk.23.1552407455737; Tue, 12 Mar 2019 09:17:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552407455; cv=none; d=google.com; s=arc-20160816; b=fdychExtnU8AUYayk+bYiX4UdmGJF8/4bH5qLvbw4ER4mPJJILFMK4YUSLVfFxyCmC SWWyqxxT5N+wP9UZmAgltDu/cqfZB75wTQGiEcEIqWXFkR1as0WrYudsm7PNKzvl4/Df w/ezUjtahkzZ/Tr/tpFzUKX+eaDIxxZGZbncEAjx7y+rx3n5QkPt2JQxk0FKVl5hTPZr dP0Ea2sEGcf+fz7sWd7Q+iCiOaZMZHiktJu12rYwEfiSRkf5VpoXdl+vBBPP/Jq0auQt fpk9ERIBHiDhTiyn8LzXQTXN/100hct8u2ivPgZmm8tEB+qbc5OXDIfrIccB2iJnYy/I plOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id; bh=qs98WgtL+xjmoER9JZYkOCiVLIAr1S+p/0GXQubNmuk=; b=KeOntOMVubKIpglnR96cOXZjhG+QXIbKaRzFbmxdFTaOLi6mJFUMYkm9up6HuyVyYG F6a8D/i8WpNtFPupuGQ6zPQYDImH7CQS7oSiS680ed72L6VG17JcG5ljNdaYhBlVmDxv 6ik503X5SnQIbaMIRaVSNRSI/BtxD1AOgBIdjiFpa8OQqu1AwDWltqtsm8XrXJ00YCF3 9n1qFQdf3FVsaUHKY/bw2o9lfWvSkp5ulYrLLMczyOJ6avM9FoMSwErJjutBNsA35TBw bx97oMZz84KSn2AVNTPXrVZfoeHYXk8vp4YLmJqV6Ppex6aPx/UxP1ddB0GG1MQe3eK/ cCrA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of claudius.heine.ext@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=claudius.heine.ext@siemens.com Return-Path: Received: from gecko.sbs.de (gecko.sbs.de. [194.138.37.40]) by gmr-mx.google.com with ESMTPS id s66si149585lje.3.2019.03.12.09.17.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Mar 2019 09:17:35 -0700 (PDT) Received-SPF: pass (google.com: domain of claudius.heine.ext@siemens.com designates 194.138.37.40 as permitted sender) client-ip=194.138.37.40; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of claudius.heine.ext@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=claudius.heine.ext@siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by gecko.sbs.de (8.15.2/8.15.2) with ESMTPS id x2CGHXKK011234 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 12 Mar 2019 17:17:34 +0100 Received: from linux-ses-ext02.ppmd.siemens.net (linux-ses-ext02.ppmd.siemens.net [139.25.69.232]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id x2CGHXTV003846; Tue, 12 Mar 2019 17:17:33 +0100 Message-ID: Subject: Re: [PATCH v4 0/6] Python refactoring From: Claudius Heine To: Jan Kiszka , isar-users@googlegroups.com Cc: Claudius Heine Date: Tue, 12 Mar 2019 17:17:33 +0100 In-Reply-To: References: <20190304130801.20628-1-claudius.heine.ext@siemens.com> <9ca8abb2-3f3c-747a-f3dc-19a0a2eb8b41@siemens.com> <961f1436-d453-48db-4519-81ab1ca0b42e@siemens.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TUID: UZ+yPcavcFMh On Tue, 2019-03-12 at 17:03 +0100, Jan Kiszka wrote: > On 12.03.19 16:34, Claudius Heine wrote: > > On 12/03/2019 16.26, Jan Kiszka wrote: > > > On 12.03.19 15:56, [ext] Claudius Heine wrote: > > > > This should probaly also be part of the isar release. It should > > > > fix > > > > those 'ResourceWarning: unclosed file <_io.BufferedReader > > > > name=32>' > > > > bitbake warnings. > > > > > > Which of the commits should fix that, and why? Remains non- > > > obvious to me. > > > > The first one 'Remove all uses of subprocess.call(shell=True)'. > > > > The usage of 'Popen' requires that the process handler should be > > closed, which > > was not done in isar-bootstrap-helper.bbclass. The right solution > > is either not > > use Popen (which this patch changes) or use Popen with a context > > manager (which > > I have done in the template.bbclass). > > > > Ah, ok. Should be in the commit log then. These warnings were pretty > annoying. I don't think that Harald was aware that his patch fixed those when he wrote his patch. He just fixed general mispractices in the python code that he discovered by himself or by using pylint etc. This is also just my expectation of what this change probably fixes. I have not investigated that if that is definitely the case. So that was more or less just a side-note from me. If someone wants to determine if my theory is correct, then be welcomed to it. Claudius > > Jan > > > > But I don't disagree that fixes, even minor ones, should be part > > > of the > > > release. There are way more fixes pending, let's give Maxim some > > > time. > > > > I just wanted to give the additional information here, because that > > could have > > been missed. > > > > Claudius > > > > > Jan > > > > > > > On Mon, 2019-03-04 at 14:07 +0100, [ext] > > > > claudius.heine.ext@siemens.com > > > > wrote: > > > > > From: Claudius Heine > > > > > > > > > > Hi, > > > > > > > > > > I just took Haralds patchset + Maxims rebase and fixed it up. > > > > > > > > > > There was just a tiny change necessary, I added that in an > > > > > additional > > > > > patch. > > > > > It builds on my machine (qemuamd64) and I am currently > > > > > testing it on > > > > > isar-ci. > > > > > > > > > > If that is successful and review is ok, my patch can be > > > > > merged into > > > > > the > > > > > 'Remove all uses of subprocess.call(shell=True)' or left > > > > > separately. > > > > > > > > > > regards, > > > > > Claudius > > > > > > > > > > Claudius Heine (1): > > > > > isar-bootstrap-helper: get_deb_host_arch: fix decoding > > > > > > > > > > Harald Seiler (5): > > > > > Remove all uses of subprocess.call(shell=True) > > > > > Use modern python formatting > > > > > image: Remove recursion in get_image_name > > > > > wic: Refactor fakeroot script > > > > > Fix python style > > > > > > > > > > .../example-module/example-module.bb | 8 ++- > > > > > meta/classes/base.bbclass | 70 > > > > > ++++++++++++----- > > > > > -- > > > > > meta/classes/image.bbclass | 22 ++++-- > > > > > meta/classes/isar-bootstrap-helper.bbclass | 8 +-- > > > > > meta/classes/isar-events.bbclass | 14 ++-- > > > > > meta/classes/patch.bbclass | 13 ++-- > > > > > meta/classes/wic-img.bbclass | 21 ++++-- > > > > > .../isar-bootstrap/isar-bootstrap-host.bb | 9 ++- > > > > > .../isar-bootstrap/isar-bootstrap-target.bb | 5 +- > > > > > .../isar-bootstrap/isar-bootstrap.inc | 12 ++-- > > > > > scripts/wic_fakeroot | 9 +-- > > > > > 11 files changed, 120 insertions(+), 71 deletions(-) > > > > > > > > > > -- > > > > > 2.20.1 > > > > >