Skip to contentSkip to conversation

lib/oe/patch.py: Dont import patches but symlink them instead

PATCH In review Khem Raj 3 participants 4 messages Jun 10, 2010

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 lib/oe/patch.py: Dont import patches but symlink them instead

* This patch removes the usage of quilt import <patch> 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.

---
 lib/oe/patch.py |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)
lib/oe/patch.py +4 -9
index 7f6b0fe..607ad44 100644
@@ -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"])
 
Signature · 1 line
1.7.0.4
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Khem Raj

* This patch removes the usage of quilt import <patch> 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.

Quoted 7 lines

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

Signature · 5 lines
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
author
#2 lore raw
In reply to Khem Raj
Quoted 40 lines · Khem Raj

* This patch removes the usage of quilt import <patch> 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.

---
 lib/oe/patch.py |   13 ++++---------

 1 files changed, 4 insertions(+), 9 deletions(-)
lib/oe/patch.py +0 -0
index 7f6b0fe..607ad44 100644
@@ -230,15 +230,10 @@ class QuiltTree(PatchSet):

        if not self.initialized:
            self.InitFromDir()
        PatchSet.Import(self, patch, force)

lib/oe/patch.py +4 -9
-
-        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"])

Quoted 4 lines

--
1.7.0.4

a native-sdk-image build fine too and saved me 5mins :)

Acked-by on v1 1/1
#3 lore raw
In reply to Khem Raj

В сообщении от Четверг 10 июня 2010 04:36:15 автор Khem Raj написал:

Quoted 5 lines

* This patch removes the usage of quilt import <patch> 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.

Quoted 7 lines

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

Signature · 3 lines
 http://roman.khimov.ru
mailto: [email protected]
gpg --keyserver hkp://subkeys.pgp.net --recv-keys 0xE5E055C3