Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Christopher Larson <clarson@kergoth.com>
Cc: openembedded-core <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] sstate: Add eventhandler which cleans up stale recipe data
Date: Tue, 09 Jun 2015 08:34:42 +0100	[thread overview]
Message-ID: <1433835282.28975.118.camel@linuxfoundation.org> (raw)
In-Reply-To: <CABcZANmPrTTK1KCCmmauYDak9tK1mA3xaxt0Kkc31pphe85NgA@mail.gmail.com>

On Mon, 2015-06-08 at 21:36 -0500, Christopher Larson wrote:
> On Mon, Jun 8, 2015 at 5:28 PM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
>         +    for a in d.getVar("SSTATE_ARCHS", True).split():
>         +        toremove = []
>         +        i = d.expand("${SSTATE_MANIFESTS}/index-" + a)
>         +        if not os.path.exists(i):
>         +            continue
>         +        with open(i, "r") as f:
>         +            lines = f.readlines()
>         +            for l in lines:
>         +                (stamp, manifest, workdir) = l.split()
>         +                if stamp not in stamps:
>         +                    toremove.append(l)
>         +                    if stamp not in seen:
>         +                        bb.note("Stamp %s is not reachable,
>         removing related manifests" % stamp)
>         +                        seen.append(stamp)
>         +        for r in toremove:
>         +            (stamp, manifest, workdir) = r.split()
>         +            for m in glob.glob(manifest + ".*"):
>         +                sstate_clean_manifest(m, d)
>         +            bb.utils.remove(stamp + "*")
>         +            if removeworkdir:
>         +                bb.utils.remove(workdir, recurse = True)
>
> This looks like it’ll solve a lot of headaches for folks.
>  
> Should the removal of workdir bit be outside the ‘for r in toremove’
> block?

I don't think so since each item in toremove may have a different
workdir?

Cheers,

Richard




      reply	other threads:[~2015-06-09  7:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-08 22:28 [PATCH] sstate: Add eventhandler which cleans up stale recipe data Richard Purdie
2015-06-09  2:36 ` Christopher Larson
2015-06-09  7:34   ` Richard Purdie [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=1433835282.28975.118.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=clarson@kergoth.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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