From 428c2de6d27dd49274b9884c3123b053c42af0ce Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 9 Jun 2010 17:30:04 -0700 Subject: lib/oe/patch.py: Dont import patches but symlink them instead * This patch removes the usage of quilt import instead it creasted a symlink to the patch in the patches directory and synthesizes the series file which otherwise would be done automatically by quilt import. * This should help a bit in reducing build time as it avoids copying of the patch and also other things that quilt import would otherwise do. * Tested by doing minimal-image on qemuarm. Signed-off-by: Khem Raj --- lib/oe/patch.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'lib/oe/patch.py') diff --git a/lib/oe/patch.py b/lib/oe/patch.py index 7f6b0fe8de..607ad44321 100644 --- a/lib/oe/patch.py +++ b/lib/oe/patch.py @@ -230,15 +230,10 @@ class QuiltTree(PatchSet): if not self.initialized: self.InitFromDir() PatchSet.Import(self, patch, force) - - args = ["import", "-p", patch["strippath"]] - if force: - args.append("-f") - args.append("-dn") - args.append(patch["file"]) - - self._runcmd(args) - + os.symlink(patch["file"], self._quiltpatchpath(patch["file"])) + f = open(os.path.join(self.dir, "patches","series"), "a"); + f.write(os.path.basename(patch["file"]) + " -p" + patch["strippath"]+"\n") + f.close() patch["quiltfile"] = self._quiltpatchpath(patch["file"]) patch["quiltfilemd5"] = bb.utils.md5_file(patch["quiltfile"]) -- cgit v1.2.3 From bfe9198ddabf08f84c744dcbf82d4a52c295508d Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 9 Jun 2010 18:04:09 -0700 Subject: Revert "lib/oe/patch.py: Dont import patches but symlink them instead" pushed wrong branch. It needs to be reviewed before pushing. This reverts commit 428c2de6d27dd49274b9884c3123b053c42af0ce. --- lib/oe/patch.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'lib/oe/patch.py') diff --git a/lib/oe/patch.py b/lib/oe/patch.py index 607ad44321..7f6b0fe8de 100644 --- a/lib/oe/patch.py +++ b/lib/oe/patch.py @@ -230,10 +230,15 @@ class QuiltTree(PatchSet): if not self.initialized: self.InitFromDir() PatchSet.Import(self, patch, force) - os.symlink(patch["file"], self._quiltpatchpath(patch["file"])) - f = open(os.path.join(self.dir, "patches","series"), "a"); - f.write(os.path.basename(patch["file"]) + " -p" + patch["strippath"]+"\n") - f.close() + + args = ["import", "-p", patch["strippath"]] + if force: + args.append("-f") + args.append("-dn") + args.append(patch["file"]) + + self._runcmd(args) + patch["quiltfile"] = self._quiltpatchpath(patch["file"]) patch["quiltfilemd5"] = bb.utils.md5_file(patch["quiltfile"]) -- cgit v1.2.3 From 7dc8f297689cdbba9021c2c620bd025ca234c58a Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 9 Jun 2010 14:36:15 +0000 Subject: lib/oe/patch.py: Dont import patches but symlink them instead * This patch removes the usage of quilt import instead it creasted a symlink to the patch in the patches directory and synthesizes the series file which otherwise would be done automatically by quilt import. * This should help a bit in reducing build time as it avoids copying of the patch and also other things that quilt import would otherwise do. * Tested by doing minimal-image on qemuarm. Signed-off-by: Khem Raj Acked-by: Chris Larson Acked-by: Roman I Khimov --- lib/oe/patch.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'lib/oe/patch.py') diff --git a/lib/oe/patch.py b/lib/oe/patch.py index 7f6b0fe8de..607ad44321 100644 --- a/lib/oe/patch.py +++ b/lib/oe/patch.py @@ -230,15 +230,10 @@ class QuiltTree(PatchSet): if not self.initialized: self.InitFromDir() PatchSet.Import(self, patch, force) - - args = ["import", "-p", patch["strippath"]] - if force: - args.append("-f") - args.append("-dn") - args.append(patch["file"]) - - self._runcmd(args) - + os.symlink(patch["file"], self._quiltpatchpath(patch["file"])) + f = open(os.path.join(self.dir, "patches","series"), "a"); + f.write(os.path.basename(patch["file"]) + " -p" + patch["strippath"]+"\n") + f.close() patch["quiltfile"] = self._quiltpatchpath(patch["file"]) patch["quiltfilemd5"] = bb.utils.md5_file(patch["quiltfile"]) -- cgit v1.2.3