* [PATCH 0/2] Bring in and use patchdir
@ 2011-04-01 14:37 Tom Rini
2011-04-01 14:37 ` [PATCH 1/2] patch.bbclass: allow importing patches into other dirs Tom Rini
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Tom Rini @ 2011-04-01 14:37 UTC (permalink / raw)
To: openembedded-core
The following series brings in the 'patchdir' parameter from openembedded
so that we can say that a patch needs to be applied in a subdir. This
allows us to re-write the db change for how we apply the arm patch to
be just ';subdir=..' and in meta-oe and other layers will help a number
of other patches be cleanly applied.
Pull URL: git://git.openembedded.org/openembedded-core-contrib
Branch: trini/use-patchdir-for-nonstd-paths
Browse: http://git.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=trini/use-patchdir-for-nonstd-paths
Thanks,
Tom Rini <tom_rini@mentor.com>
---
Tom Rini (2):
patch.bbclass: allow importing patches into other dirs
db: Switch to patchdir rather than applying in do_configure
meta/classes/patch.bbclass | 19 ++++++++++++++++---
meta/recipes-support/db/db_5.1.19.bb | 6 +-----
2 files changed, 17 insertions(+), 8 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] patch.bbclass: allow importing patches into other dirs
2011-04-01 14:37 [PATCH 0/2] Bring in and use patchdir Tom Rini
@ 2011-04-01 14:37 ` Tom Rini
2011-04-01 14:37 ` [PATCH 2/2] db: Switch to patchdir rather than applying in do_configure Tom Rini
2011-04-04 12:57 ` [PATCH 0/2] Bring in and use patchdir Richard Purdie
2 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2011-04-01 14:37 UTC (permalink / raw)
To: openembedded-core
This is taken from openembedded.master:
commit 9d0d70da60ca8ef278916f442125d41161846f38
Author: Chris Larson <chris_larson@mentor.com>
Date: Mon Aug 23 13:03:55 2010 -0400
patch: allow importing patches into other dirs
Use the 'patchdir' flag. If relative, it's assumed to be relative to ${S}.
It creates a patchset class per patch directory, so for quilt this results i
multiple .pc/patches directories to manage each of the patchsets.
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Tom Rini <tom_rini@mentor.com>
---
meta/classes/patch.bbclass | 19 ++++++++++++++++---
1 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/meta/classes/patch.bbclass b/meta/classes/patch.bbclass
index 80fd45f..7622163 100644
--- a/meta/classes/patch.bbclass
+++ b/meta/classes/patch.bbclass
@@ -31,10 +31,8 @@ python patch_do_patch() {
path = os.getenv('PATH')
os.putenv('PATH', bb.data.getVar('PATH', d, 1))
- patchset = cls(s, d)
- patchset.Clean()
- resolver = rcls(patchset)
+ classes = {}
workdir = bb.data.getVar('WORKDIR', d, 1)
for url in src_uri:
@@ -117,6 +115,21 @@ python patch_do_patch() {
bb.note("Patch '%s' doesn't apply to revision" % pname)
continue
+ if "patchdir" in parm:
+ patchdir = parm["patchdir"]
+ if not os.path.isabs(patchdir):
+ patchdir = os.path.join(s, patchdir)
+ else:
+ patchdir = s
+
+ if not patchdir in classes:
+ patchset = cls(patchdir, d)
+ resolver = rcls(patchset)
+ classes[patchdir] = (patchset, resolver)
+ patchset.Clean()
+ else:
+ patchset, resolver = classes[patchdir]
+
bb.note("Applying patch '%s' (%s)" % (pname, oe.path.format_display(local, d)))
try:
patchset.Import({"file":local, "remote":url, "strippath": striplevel}, True)
--
1.7.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] db: Switch to patchdir rather than applying in do_configure
2011-04-01 14:37 [PATCH 0/2] Bring in and use patchdir Tom Rini
2011-04-01 14:37 ` [PATCH 1/2] patch.bbclass: allow importing patches into other dirs Tom Rini
@ 2011-04-01 14:37 ` Tom Rini
2011-04-04 12:57 ` [PATCH 0/2] Bring in and use patchdir Richard Purdie
2 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2011-04-01 14:37 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Tom Rini <tom_rini@mentor.com>
---
meta/recipes-support/db/db_5.1.19.bb | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/meta/recipes-support/db/db_5.1.19.bb b/meta/recipes-support/db/db_5.1.19.bb
index 94ce180..7b7c4dd 100644
--- a/meta/recipes-support/db/db_5.1.19.bb
+++ b/meta/recipes-support/db/db_5.1.19.bb
@@ -17,7 +17,7 @@ CONFLICTS = "db3"
PR = "r2"
SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz"
-SRC_URI += "file://arm-thumb-mutex_db5.patch;apply=no"
+SRC_URI += "file://arm-thumb-mutex_db5.patch;patchdir=.."
SRC_URI[md5sum] = "76fcbfeebfcd09ba0b4d96bfdf8d884d"
SRC_URI[sha256sum] = "0194d4ca9266ba1a1c0bfbc233b18bfd05f63163453c81ebcdfdc7112d5ac850"
@@ -79,10 +79,6 @@ do_configure() {
oe_runconf
}
-do_patch_append() {
- os.system("cd ${S}/.. ; patch -p1 -i ${WORKDIR}/arm-thumb-mutex_db5.patch")
-}
-
do_install_append() {
mkdir -p ${D}/${includedir}/db51
#mv ${D}/${includedir}/db_185.h ${D}/${includedir}/db51/.
--
1.7.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] Bring in and use patchdir
2011-04-01 14:37 [PATCH 0/2] Bring in and use patchdir Tom Rini
2011-04-01 14:37 ` [PATCH 1/2] patch.bbclass: allow importing patches into other dirs Tom Rini
2011-04-01 14:37 ` [PATCH 2/2] db: Switch to patchdir rather than applying in do_configure Tom Rini
@ 2011-04-04 12:57 ` Richard Purdie
2 siblings, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2011-04-04 12:57 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Fri, 2011-04-01 at 07:37 -0700, Tom Rini wrote:
> The following series brings in the 'patchdir' parameter from openembedded
> so that we can say that a patch needs to be applied in a subdir. This
> allows us to re-write the db change for how we apply the arm patch to
> be just ';subdir=..' and in meta-oe and other layers will help a number
> of other patches be cleanly applied.
>
> Pull URL: git://git.openembedded.org/openembedded-core-contrib
> Branch: trini/use-patchdir-for-nonstd-paths
> Browse: http://git.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=trini/use-patchdir-for-nonstd-paths
>
> Thanks,
> Tom Rini <tom_rini@mentor.com>
> ---
>
>
> Tom Rini (2):
> patch.bbclass: allow importing patches into other dirs
> db: Switch to patchdir rather than applying in do_configure
Merged to master, thanks!
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-04-04 12:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-01 14:37 [PATCH 0/2] Bring in and use patchdir Tom Rini
2011-04-01 14:37 ` [PATCH 1/2] patch.bbclass: allow importing patches into other dirs Tom Rini
2011-04-01 14:37 ` [PATCH 2/2] db: Switch to patchdir rather than applying in do_configure Tom Rini
2011-04-04 12:57 ` [PATCH 0/2] Bring in and use patchdir Richard Purdie
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.