All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] lib/oe/patch: Use force option when creating symlinks to patches
@ 2012-12-14 17:21 Richard Purdie
  2012-12-14 17:33 ` Saul Wold
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Purdie @ 2012-12-14 17:21 UTC (permalink / raw)
  To: openembedded-core

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>
---
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()





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] lib/oe/patch: Use force option when creating symlinks to patches
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Saul Wold @ 2012-12-14 17:33 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

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
>
>



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-12-14 17:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.