Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
To: Paul Eggleton <paul.eggleton@linux.intel.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] buildhistory.bbclass: Check output folder is present before creating files-in-$pkg.txt
Date: Wed, 01 Jul 2015 11:55:58 -0500	[thread overview]
Message-ID: <55941B9E.3080009@linux.intel.com> (raw)
In-Reply-To: <1693409.84CV3Pd8dR@peggleto-mobl.ger.corp.intel.com>


Hi Paul,

On 07/01/2015 07:54 AM, Paul Eggleton wrote:
> Hi Leonardo,
>
> On Tuesday 30 June 2015 11:19:40 leonardo.sandoval.gonzalez@linux.intel.com
> wrote:
>> From: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
>>
>> This is just a safe check to make sure the output folder is present, before
>> creating the files-in-$pkg.txt file.
>>
>> Signed-off-by: Leonardo Sandoval
>> <leonardo.sandoval.gonzalez@linux.intel.com> ---
>>   meta/classes/buildhistory.bbclass | 8 +++++++-
>>   1 file changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta/classes/buildhistory.bbclass
>> b/meta/classes/buildhistory.bbclass index 8fc8a3a..cad5116 100644
>> --- a/meta/classes/buildhistory.bbclass
>> +++ b/meta/classes/buildhistory.bbclass
>> @@ -444,7 +444,13 @@ buildhistory_list_pkg_files() {
>>           # Create individual files-in-package for each recipe's package
>>           for pkgdir in $(find ${PKGDEST}/* -maxdepth 0 -type d); do
>>                   pkgname=$(basename ${pkgdir})
>> -
>> outfile="${BUILDHISTORY_DIR_PACKAGE}/${pkgname}/${file_prefix}${pkgname}.tx
>> t" +                outfolder="${BUILDHISTORY_DIR_PACKAGE}/${pkgname}" +
>>             outfile="${outfolder}/${file_prefix}${pkgname}.txt" +
>>      # Make sure the output folder, exist so we can create the
>> files-in-$pkgname.txt file +                if [ ! -d ${outfolder} ] ; then
>> +                        bbdebug 2 "Folder ${outfolder} does not exist, file
>> ${outfile} not created" +                        continue
>
> This isn't the way we normally handle this sort of situation - we should be
> simply creating the directory unconditionally before writing the file.
>
> In any case, how is it that the directory doesn't exist at this point?
>
files-in-$pkg.txt files are created and placed on top of the 
corresponding buildhistory/packages folders. By the time this task is 
done, the latter folders are *already* created, so that is why in the 
first patch version, I did not include the check. BTW, I could not 
reproduce the issue that Andre had (failed on cairo) so I will ask him 
more detail on his setup.
> Cheers,
> Paul
>


  reply	other threads:[~2015-07-01 16:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-30 11:19 [PATCH] buildhistory.bbclass: Check output folder is present before creating files-in-$pkg.txt leonardo.sandoval.gonzalez
2015-07-01  6:06 ` Andre McCurdy
2015-07-01 12:54 ` Paul Eggleton
2015-07-01 16:55   ` Leonardo Sandoval [this message]
2015-07-02 22:06     ` Khem Raj

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=55941B9E.3080009@linux.intel.com \
    --to=leonardo.sandoval.gonzalez@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=paul.eggleton@linux.intel.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