* [PATCH 0/2] createrepo 0.4.11: create wrapper for python script
@ 2012-08-01 9:14 Robert Yang
2012-08-01 9:14 ` [PATCH 1/2] createrepo 0.4.11: add rpm-createsolvedb.py Robert Yang
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Robert Yang @ 2012-08-01 9:14 UTC (permalink / raw)
To: openembedded-core; +Cc: Zhenfeng.Zhao
This is used for fixing the rpm-createsolvedb.py error:
'import site' failed; use -v for traceback
Traceback (most recent call last):
File "/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/scripts/rpm-createsolvedb.py", line 14, in
import sys, os
ImportError: No module named os
// Robert
The following changes since commit 4f31d21bcb1c8c744e9abb33248715afe4a40af0:
lib/oe/lsb.py: Map unknown distributions to 'Unknown' (2012-07-31 08:02:11 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib robert/createrepo
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/createrepo
Robert Yang (2):
createrepo 0.4.11: add rpm-createsolvedb.py
createrepo 0.4.11: create wrapper for python script
meta/classes/rootfs_rpm.bbclass | 2 +-
.../createrepo/createrepo}/rpm-createsolvedb.py | 0
.../createrepo/createrepo_0.4.11.bb | 17 ++++++++++++++++-
3 files changed, 17 insertions(+), 2 deletions(-)
rename {scripts => meta/recipes-support/createrepo/createrepo}/rpm-createsolvedb.py (100%)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] createrepo 0.4.11: add rpm-createsolvedb.py
2012-08-01 9:14 [PATCH 0/2] createrepo 0.4.11: create wrapper for python script Robert Yang
@ 2012-08-01 9:14 ` Robert Yang
2012-08-01 9:14 ` [PATCH 2/2] createrepo 0.4.11: create wrapper for python script Robert Yang
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Robert Yang @ 2012-08-01 9:14 UTC (permalink / raw)
To: openembedded-core; +Cc: Zhenfeng.Zhao
Move scripts/rpm-createsolvedb.py to
meta/recipes-support/createrepo/createrepo/ since we should wrap it to
use the native python.
[YOCTO #2822]
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
meta/classes/rootfs_rpm.bbclass | 2 +-
.../createrepo/createrepo}/rpm-createsolvedb.py | 0
.../createrepo/createrepo_0.4.11.bb | 4 +++-
3 files changed, 4 insertions(+), 2 deletions(-)
rename {scripts => meta/recipes-support/createrepo/createrepo}/rpm-createsolvedb.py (100%)
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index c9258df..a03e9f3 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -17,7 +17,7 @@ do_rootfs[depends] += "rpmresolve-native:do_populate_sysroot"
do_rootfs[depends] += "opkg-native:do_populate_sysroot"
# Creating the repo info in do_rootfs
-#do_rootfs[depends] += "createrepo-native:do_populate_sysroot"
+do_rootfs[depends] += "createrepo-native:do_populate_sysroot"
do_rootfs[recrdeptask] += "do_package_write_rpm"
diff --git a/scripts/rpm-createsolvedb.py b/meta/recipes-support/createrepo/createrepo/rpm-createsolvedb.py
similarity index 100%
rename from scripts/rpm-createsolvedb.py
rename to meta/recipes-support/createrepo/createrepo/rpm-createsolvedb.py
diff --git a/meta/recipes-support/createrepo/createrepo_0.4.11.bb b/meta/recipes-support/createrepo/createrepo_0.4.11.bb
index 7a4d059..dcddcf8 100644
--- a/meta/recipes-support/createrepo/createrepo_0.4.11.bb
+++ b/meta/recipes-support/createrepo/createrepo_0.4.11.bb
@@ -6,12 +6,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760"
RDEPENDS_${PN}_virtclass-native += "libxml2-native rpm-native"
-PR = "r4"
+PR = "r5"
SRC_URI= "http://createrepo.baseurl.org/download/${BP}.tar.gz \
file://fix-native-install.patch \
file://python-scripts-should-use-interpreter-from-env.patch \
file://createrepo-rpm549.patch \
+ file://rpm-createsolvedb.py \
"
SRC_URI[md5sum] = "3e9ccf4abcffe3f49af078c83611eda2"
@@ -21,4 +22,5 @@ BBCLASSEXTEND = "native"
do_install () {
oe_runmake -e 'DESTDIR=${D}' install
+ install -m 0755 ${WORKDIR}/rpm-createsolvedb.py ${D}${bindir}/
}
--
1.7.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] createrepo 0.4.11: create wrapper for python script
2012-08-01 9:14 [PATCH 0/2] createrepo 0.4.11: create wrapper for python script Robert Yang
2012-08-01 9:14 ` [PATCH 1/2] createrepo 0.4.11: add rpm-createsolvedb.py Robert Yang
@ 2012-08-01 9:14 ` Robert Yang
2012-08-01 22:03 ` [PATCH 0/2] " Richard Purdie
2012-08-03 11:10 ` Khem Raj
3 siblings, 0 replies; 7+ messages in thread
From: Robert Yang @ 2012-08-01 9:14 UTC (permalink / raw)
To: openembedded-core; +Cc: Zhenfeng.Zhao
The native python is installed to
${STAGING_BINDIR_NATIVE}/python-native/python, so we should use wrapper
for the python script.
[YOCTO #2822]
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
.../createrepo/createrepo_0.4.11.bb | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/meta/recipes-support/createrepo/createrepo_0.4.11.bb b/meta/recipes-support/createrepo/createrepo_0.4.11.bb
index dcddcf8..42c7214 100644
--- a/meta/recipes-support/createrepo/createrepo_0.4.11.bb
+++ b/meta/recipes-support/createrepo/createrepo_0.4.11.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760"
RDEPENDS_${PN}_virtclass-native += "libxml2-native rpm-native"
-PR = "r5"
+PR = "r6"
SRC_URI= "http://createrepo.baseurl.org/download/${BP}.tar.gz \
file://fix-native-install.patch \
@@ -24,3 +24,16 @@ do_install () {
oe_runmake -e 'DESTDIR=${D}' install
install -m 0755 ${WORKDIR}/rpm-createsolvedb.py ${D}${bindir}/
}
+
+# Wrap the python script since the native python is
+# ${bindir}/python-native/python, and the "#! /usr/bin/env python" can't
+# find it since it is not in PATH.
+do_install_append_virtclass-native () {
+ # Not all the python scripts should be wrapped since some of
+ # them are modules (be imported).
+ for i in ${D}${datadir}/createrepo/genpkgmetadata.py \
+ ${D}${datadir}/createrepo/modifyrepo.py \
+ ${D}${bindir}/rpm-createsolvedb.py ; do
+ create_wrapper $i ${STAGING_BINDIR_NATIVE}/python-native/python
+ done
+}
--
1.7.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] createrepo 0.4.11: create wrapper for python script
2012-08-01 9:14 [PATCH 0/2] createrepo 0.4.11: create wrapper for python script Robert Yang
2012-08-01 9:14 ` [PATCH 1/2] createrepo 0.4.11: add rpm-createsolvedb.py Robert Yang
2012-08-01 9:14 ` [PATCH 2/2] createrepo 0.4.11: create wrapper for python script Robert Yang
@ 2012-08-01 22:03 ` Richard Purdie
2012-08-03 11:10 ` Khem Raj
3 siblings, 0 replies; 7+ messages in thread
From: Richard Purdie @ 2012-08-01 22:03 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer; +Cc: Zhenfeng.Zhao
On Wed, 2012-08-01 at 17:14 +0800, Robert Yang wrote:
> This is used for fixing the rpm-createsolvedb.py error:
>
> 'import site' failed; use -v for traceback
> Traceback (most recent call last):
> File "/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/scripts/rpm-createsolvedb.py", line 14, in
> import sys, os
> ImportError: No module named os
>
> // Robert
>
> The following changes since commit 4f31d21bcb1c8c744e9abb33248715afe4a40af0:
>
> lib/oe/lsb.py: Map unknown distributions to 'Unknown' (2012-07-31 08:02:11 +0100)
>
> are available in the git repository at:
> git://git.pokylinux.org/poky-contrib robert/createrepo
> http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/createrepo
>
> Robert Yang (2):
> createrepo 0.4.11: add rpm-createsolvedb.py
> createrepo 0.4.11: create wrapper for python script
Merged to master, thanks.
Richard
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] createrepo 0.4.11: create wrapper for python script
2012-08-01 9:14 [PATCH 0/2] createrepo 0.4.11: create wrapper for python script Robert Yang
` (2 preceding siblings ...)
2012-08-01 22:03 ` [PATCH 0/2] " Richard Purdie
@ 2012-08-03 11:10 ` Khem Raj
2012-08-04 7:04 ` Robert Yang
3 siblings, 1 reply; 7+ messages in thread
From: Khem Raj @ 2012-08-03 11:10 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer; +Cc: Zhenfeng.Zhao
On Wed, Aug 1, 2012 at 2:14 AM, Robert Yang <liezhi.yang@windriver.com> wrote:
> This is used for fixing the rpm-createsolvedb.py error:
>
> 'import site' failed; use -v for traceback
> Traceback (most recent call last):
> File "/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/scripts/rpm-createsolvedb.py", line 14, in
> import sys, os
> ImportError: No module named os
>
this series has problem I think now bitbake meta-toolchain fails for me
run.populate_sdk_image.6792: line 610: rpm-createsolvedb.py: command not found
did you try bitbake meta-toolchain target from scratch with this change ?
> // Robert
>
> The following changes since commit 4f31d21bcb1c8c744e9abb33248715afe4a40af0:
>
> lib/oe/lsb.py: Map unknown distributions to 'Unknown' (2012-07-31 08:02:11 +0100)
>
> are available in the git repository at:
> git://git.pokylinux.org/poky-contrib robert/createrepo
> http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/createrepo
>
> Robert Yang (2):
> createrepo 0.4.11: add rpm-createsolvedb.py
> createrepo 0.4.11: create wrapper for python script
>
> meta/classes/rootfs_rpm.bbclass | 2 +-
> .../createrepo/createrepo}/rpm-createsolvedb.py | 0
> .../createrepo/createrepo_0.4.11.bb | 17 ++++++++++++++++-
> 3 files changed, 17 insertions(+), 2 deletions(-)
> rename {scripts => meta/recipes-support/createrepo/createrepo}/rpm-createsolvedb.py (100%)
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] createrepo 0.4.11: create wrapper for python script
2012-08-03 11:10 ` Khem Raj
@ 2012-08-04 7:04 ` Robert Yang
2012-08-04 7:08 ` Robert Yang
0 siblings, 1 reply; 7+ messages in thread
From: Robert Yang @ 2012-08-04 7:04 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer; +Cc: Zhenfeng.Zhao
On 08/03/2012 07:10 PM, Khem Raj wrote:
> On Wed, Aug 1, 2012 at 2:14 AM, Robert Yang <liezhi.yang@windriver.com> wrote:
>> This is used for fixing the rpm-createsolvedb.py error:
>>
>> 'import site' failed; use -v for traceback
>> Traceback (most recent call last):
>> File "/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/scripts/rpm-createsolvedb.py", line 14, in
>> import sys, os
>> ImportError: No module named os
>>
>
> this series has problem I think now bitbake meta-toolchain fails for me
>
> run.populate_sdk_image.6792: line 610: rpm-createsolvedb.py: command not found
>
> did you try bitbake meta-toolchain target from scratch with this change ?
>
Hi Khem,
I'm sorry for this, this is because I hadn't fixed the depends of
populate_sdk_image, "bitbake createrepo-native" firstly can be a workaround,
I will send a official fix sooner.
// Robert
>
>
>> // Robert
>>
>> The following changes since commit 4f31d21bcb1c8c744e9abb33248715afe4a40af0:
>>
>> lib/oe/lsb.py: Map unknown distributions to 'Unknown' (2012-07-31 08:02:11 +0100)
>>
>> are available in the git repository at:
>> git://git.pokylinux.org/poky-contrib robert/createrepo
>> http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/createrepo
>>
>> Robert Yang (2):
>> createrepo 0.4.11: add rpm-createsolvedb.py
>> createrepo 0.4.11: create wrapper for python script
>>
>> meta/classes/rootfs_rpm.bbclass | 2 +-
>> .../createrepo/createrepo}/rpm-createsolvedb.py | 0
>> .../createrepo/createrepo_0.4.11.bb | 17 ++++++++++++++++-
>> 3 files changed, 17 insertions(+), 2 deletions(-)
>> rename {scripts => meta/recipes-support/createrepo/createrepo}/rpm-createsolvedb.py (100%)
>>
>>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] createrepo 0.4.11: create wrapper for python script
2012-08-04 7:04 ` Robert Yang
@ 2012-08-04 7:08 ` Robert Yang
0 siblings, 0 replies; 7+ messages in thread
From: Robert Yang @ 2012-08-04 7:08 UTC (permalink / raw)
To: Khem Raj; +Cc: Zhenfeng.Zhao, Patches, oe-core layer
Hi Khem,
I just noticed that you had sent a pull request for it, thank you very much:-)
// Robert
On 08/04/2012 03:04 PM, Robert Yang wrote:
>
>
> On 08/03/2012 07:10 PM, Khem Raj wrote:
>> On Wed, Aug 1, 2012 at 2:14 AM, Robert Yang <liezhi.yang@windriver.com> wrote:
>>> This is used for fixing the rpm-createsolvedb.py error:
>>>
>>> 'import site' failed; use -v for traceback
>>> Traceback (most recent call last):
>>> File
>>> "/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly/build/scripts/rpm-createsolvedb.py",
>>> line 14, in
>>> import sys, os
>>> ImportError: No module named os
>>>
>>
>> this series has problem I think now bitbake meta-toolchain fails for me
>>
>> run.populate_sdk_image.6792: line 610: rpm-createsolvedb.py: command not found
>>
>> did you try bitbake meta-toolchain target from scratch with this change ?
>>
>
> Hi Khem,
>
> I'm sorry for this, this is because I hadn't fixed the depends of
> populate_sdk_image, "bitbake createrepo-native" firstly can be a workaround,
> I will send a official fix sooner.
>
> // Robert
>
>>
>>
>>> // Robert
>>>
>>> The following changes since commit 4f31d21bcb1c8c744e9abb33248715afe4a40af0:
>>>
>>> lib/oe/lsb.py: Map unknown distributions to 'Unknown' (2012-07-31 08:02:11
>>> +0100)
>>>
>>> are available in the git repository at:
>>> git://git.pokylinux.org/poky-contrib robert/createrepo
>>> http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/createrepo
>>>
>>> Robert Yang (2):
>>> createrepo 0.4.11: add rpm-createsolvedb.py
>>> createrepo 0.4.11: create wrapper for python script
>>>
>>> meta/classes/rootfs_rpm.bbclass | 2 +-
>>> .../createrepo/createrepo}/rpm-createsolvedb.py | 0
>>> .../createrepo/createrepo_0.4.11.bb | 17 ++++++++++++++++-
>>> 3 files changed, 17 insertions(+), 2 deletions(-)
>>> rename {scripts =>
>>> meta/recipes-support/createrepo/createrepo}/rpm-createsolvedb.py (100%)
>>>
>>>
>>> _______________________________________________
>>> Openembedded-core mailing list
>>> Openembedded-core@lists.openembedded.org
>>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>>
>>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-08-04 7:20 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-01 9:14 [PATCH 0/2] createrepo 0.4.11: create wrapper for python script Robert Yang
2012-08-01 9:14 ` [PATCH 1/2] createrepo 0.4.11: add rpm-createsolvedb.py Robert Yang
2012-08-01 9:14 ` [PATCH 2/2] createrepo 0.4.11: create wrapper for python script Robert Yang
2012-08-01 22:03 ` [PATCH 0/2] " Richard Purdie
2012-08-03 11:10 ` Khem Raj
2012-08-04 7:04 ` Robert Yang
2012-08-04 7:08 ` Robert Yang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox