Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Saul Wold <sgw@linux.intel.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: openembedded-core <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] lib/oe/patch: Use force option when creating symlinks to patches
Date: Fri, 14 Dec 2012 09:33:46 -0800	[thread overview]
Message-ID: <50CB62FA.7090702@linux.intel.com> (raw)
In-Reply-To: <1355505665.32519.29.camel@ted>

On 12/14/2012 09:21 AM, Richard Purdie wrote:
> Under the scenario where you have an existing source tree and you then
> change one of the patches, maybe to be architecture or machine specific,
> then rebuild, the build will fail since the symlink already exists
> but should now point at a different file.
>
> The easiest fix is to tell the system to remove and recreate the link
> which is done with the force option.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Acked-by: Saul Wold <sgw@linux.intel.com>

> ---
> diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
> index bc86bb5..7ab74fa 100644
> --- a/meta/lib/oe/patch.py
> +++ b/meta/lib/oe/patch.py
> @@ -278,7 +278,7 @@ class QuiltTree(PatchSet):
>           if not self.initialized:
>               self.InitFromDir()
>           PatchSet.Import(self, patch, force)
> -        oe.path.symlink(patch["file"], self._quiltpatchpath(patch["file"]))
> +        oe.path.symlink(patch["file"], self._quiltpatchpath(patch["file"]), force=True)
>           f = open(os.path.join(self.dir, "patches","series"), "a");
>           f.write(os.path.basename(patch["file"]) + " -p" + patch["strippath"]+"\n")
>           f.close()
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
>



      reply	other threads:[~2012-12-14 17:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-14 17:21 [PATCH] lib/oe/patch: Use force option when creating symlinks to patches Richard Purdie
2012-12-14 17:33 ` Saul Wold [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=50CB62FA.7090702@linux.intel.com \
    --to=sgw@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.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