From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6664521764891000832 X-Received: by 2002:a5d:564d:: with SMTP id j13mr1934310wrw.27.1552404893709; Tue, 12 Mar 2019 08:34:53 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a7b:c0cc:: with SMTP id s12ls416630wmh.14.gmail; Tue, 12 Mar 2019 08:34:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqy8JVKINFbTPg0nszsVI8YtIMIzUcvBDHRhWVnHps0ax3GjiqVEDf47uPF0LzS0kVqdiJoY X-Received: by 2002:a1c:cfc8:: with SMTP id f191mr288355wmg.17.1552404893245; Tue, 12 Mar 2019 08:34:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552404893; cv=none; d=google.com; s=arc-20160816; b=OiTNlW/eO4aMzQ74Hl8WY1s4J2CBzruQ4RAPwd3hxQOw09Zt91DqYIhoB1u/PNTzYe Yz6gUIKEOJyrIT8I8exOPs/MYCxkumz0MTD4aD/WpQuvBceqkWNSrjlTKKT8c+cKqaE9 rCs+PRsy30NErYhAv+tQDg8jQXTWLPnIb3pZ6BzNITowdt8Gmfh4bvqp5pj1UJpj6V3q +WoS2PL5Bv8XPg3vDg75sS6xMyAo2QxWXTf9oxrKIb5KXmJrIhvJe7QgeD9azfsoxdVH F8h1YikHj6JAKK5e+phDoVHqItEAa5Uoax09KVUHvejhjKGnW3HSGsfFd4eWOTpNl6kj bQHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject; bh=6XgIr3c8bbN/3IJQPwPz7Ia4hDoHaG5w3WDmVpt+JZw=; b=WibywDiycTmC/SJtmgogGuRTaePNN5ilg5FntCwtFNI57Cun/1ZPwfOm/m6esEJ2lr ha3uerjugT98tA/VMTsdEN0k7HFApQwp+sPDGRpNkz/w0oesdkboZYxVqn85HeqLR4Jj ojDirjoxpkB65yYgxkZx4/M57jMOfJqU/94ZJJnLQMCRDIgh15J3ASA7aS2VjnndNZAk GhBP3VsWulrJd1FjEfqjM8pLjwjPoPoMjyqKcZ6G/3p8b7tB2pIGkmhdXITGnxR/Vak1 KzJzusB+FHMf1cH6KAv4hyD8HpLoO3OuAmJ64GvrQ6sfBFj8HJvPgHNctVMtGMXbo4sh dBkA== 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 y192si98655wmd.1.2019.03.12.08.34.53 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Mar 2019 08:34:53 -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 mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by gecko.sbs.de (8.15.2/8.15.2) with ESMTPS id x2CFYqtg011991 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 12 Mar 2019 16:34:52 +0100 Received: from [139.25.69.232] (linux-ses-ext02.ppmd.siemens.net [139.25.69.232]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id x2CFYqxc021824; Tue, 12 Mar 2019 16:34:52 +0100 Subject: Re: [PATCH v4 0/6] Python refactoring To: Jan Kiszka , isar-users@googlegroups.com Cc: Claudius Heine References: <20190304130801.20628-1-claudius.heine.ext@siemens.com> <9ca8abb2-3f3c-747a-f3dc-19a0a2eb8b41@siemens.com> From: Claudius Heine Message-ID: <961f1436-d453-48db-4519-81ab1ca0b42e@siemens.com> Date: Tue, 12 Mar 2019 16:34:52 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <9ca8abb2-3f3c-747a-f3dc-19a0a2eb8b41@siemens.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-TUID: xoxhPRzfQ4fD 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). > > 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 >>> >> > -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de