public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Alexander Smirnov <asmirnov@ilbers.de>,
	isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCH] Skip over event handler calls with incomplete environment
Date: Thu, 8 Feb 2018 08:27:35 +0100	[thread overview]
Message-ID: <6668d588-8a78-d440-35ae-6e5b7ede836d@siemens.com> (raw)
In-Reply-To: <e57b73c0-bf3e-0f58-9971-04c9501327ed@ilbers.de>

On 2018-02-07 17:12, Alexander Smirnov wrote:
> On 02/07/2018 06:59 PM, Jan Kiszka wrote:
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> The cleanup handler is called a couple of times per shutdown and,
>> depending on the setup, some may not have a complete config. Avoid that
>> we stumble and fall over any of the environment variables being
>> undefined.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> 
> Should I apply me previous one?

You mean "isar: Clean mount point on bitbake exit"? Besides this issue,
I didn't find other problems so far.

Jan

> 
> Alex
> 
>> ---
>>   meta/classes/isar-events.bbclass | 17 +++++++++--------
>>   1 file changed, 9 insertions(+), 8 deletions(-)
>>
>> diff --git a/meta/classes/isar-events.bbclass
>> b/meta/classes/isar-events.bbclass
>> index ae0f791..4b5e97e 100644
>> --- a/meta/classes/isar-events.bbclass
>> +++ b/meta/classes/isar-events.bbclass
>> @@ -15,15 +15,16 @@ python isar_handler () {
>>           distro = d.getVar('DISTRO', True)
>>           arch = d.getVar('DISTRO_ARCH', True)
>>   -        w = tmpdir + '/work/' + distro + '-' + arch
>> +        if tmpdir and distro and arch:
>> +            w = tmpdir + '/work/' + distro + '-' + arch
>>   -        # '/proc/mounts' contains all the active mounts, so knowing
>> 'w' we
>> -        # could get the list of mounts for the specific multiconfig and
>> -        # clean them.
>> -        with open('/proc/mounts', 'rU') as f:
>> -            for line in f:
>> -                if w in line:
>> -                    subprocess.call('sudo umount -f ' +
>> line.split()[1], stdout=devnull, stderr=devnull, shell=True)
>> +            # '/proc/mounts' contains all the active mounts, so
>> knowing 'w' we
>> +            # could get the list of mounts for the specific
>> multiconfig and
>> +            # clean them.
>> +            with open('/proc/mounts', 'rU') as f:
>> +                for line in f:
>> +                    if w in line:
>> +                        subprocess.call('sudo umount -f ' +
>> line.split()[1], stdout=devnull, stderr=devnull, shell=True)
>>         devnull.close()
>>   }
>>


-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

      reply	other threads:[~2018-02-08  7:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-07 15:59 Jan Kiszka
2018-02-07 16:12 ` Alexander Smirnov
2018-02-08  7:27   ` Jan Kiszka [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6668d588-8a78-d440-35ae-6e5b7ede836d@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=asmirnov@ilbers.de \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox