<p dir="ltr"><br>
On 17 Oct 2013 16:31, "Mark Hatle" <<a href="mailto:mark.hatle@windriver.com">mark.hatle@windriver.com</a>> wrote:<br>
><br>
> On 10/17/13 8:59 AM, David Nyström wrote:<br>
><br>
> Should have a commit message explaining the various changes.<br>
><br>
><br>
>> Signed-off-by: David Nyström <<a href="mailto:david.nystrom@enea.com">david.nystrom@enea.com</a>><br>
>> ---<br>
>> meta/recipes-devtools/rpm/<a href="http://rpm_5.4.9.bb">rpm_5.4.9.bb</a> | 24 ++++++++++++++++++------<br>
>> 1 file changed, 18 insertions(+), 6 deletions(-)<br>
>><br>
>> diff --git a/meta/recipes-devtools/rpm/<a href="http://rpm_5.4.9.bb">rpm_5.4.9.bb</a> b/meta/recipes-devtools/rpm/<a href="http://rpm_5.4.9.bb">rpm_5.4.9.bb</a><br>
>> index 3c7e03b..0630f74 100644<br>
>> --- a/meta/recipes-devtools/rpm/<a href="http://rpm_5.4.9.bb">rpm_5.4.9.bb</a><br>
>> +++ b/meta/recipes-devtools/rpm/<a href="http://rpm_5.4.9.bb">rpm_5.4.9.bb</a><br>
>> @@ -105,12 +105,12 @@ acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java"<br>
>> # Specify the default rpm macros in terms of adjustable variables<br>
>> rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:%{_etcrpm}/macros.*:%{_etcrpm}/macros:%{_etcrpm}/%{_target}/macros:~/.oerpmmacros"<br>
>> rpm_macros_class-native = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros"<br>
>> +rpm_macros_class-nativesdk = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros"<br>
>><br>
>> # sqlite lua tcl augeas nss gcrypt neon xz xar keyutils perl selinux<br>
>><br>
>> # Note: perl and sqlite w/o db specified does not currently work.<br>
>> # tcl, augeas, nss, gcrypt, xar and keyutils support is untested.<br>
>> -PACKAGECONFIG_class-native ??= "db bzip2 zlib beecrypt openssl libelf python"<br>
>> PACKAGECONFIG ??= "db bzip2 zlib beecrypt openssl libelf python"<br>
>><br>
>> PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2,"<br>
>> @@ -224,8 +224,11 @@ FILES_${PN} = "${bindir}/rpm \<br>
>> ${libdir}/rpm/bin/rpmrepo \<br>
>> ${libdir}/rpm/bin/rpmspecdump \<br>
>> ${libdir}/rpm/bin/wget \<br>
>> - /var/lib/rpm \<br>
>> - /var/cache/rpm \<br>
>> + ${libdir}/rpm \<br>
>> + ${localstatedir}/cache/rpm \<br>
>> + ${localstatedir}/cache/wdj \<br>
>> + ${localstatedir}/lib/rpm \<br>
>> + ${localstatedir}/lib/wdj \<br>
><br>
><br>
> The above was hard defined because the /var/lib, /var/cache locations were hard coded into RPM itself and did not vary based on libdir/localstatedir. It's possible this has changed since the work was originally done. But you should be sure to verify that.</p>
<p dir="ltr">I was under the impression that localstatedir always resolved to /var,<br>
But your probably correct about libdir above(/usr/lib vs. /lib), will return with V2.</p>
<p dir="ltr">The reason for the change is that nativesdk variable-expansion is different(broken ?) from target/native, and will not find items from hardcoded libdir, bindir et.c.</p>
<p dir="ltr">Postinstall hooks using libdir, bindir <a href="http://et.al">et.al</a>. when built in nativesdk mode is equally "broken".</p>
<p dir="ltr">><br>
><br>
> Otherwise the content looks fine.<br>
><br>
> --Mark<br>
><br>
><br>
>> "<br>
>><br>
>> FILES_${PN}-dbg += "${libdir}/rpm/.debug \<br>
>> @@ -235,7 +238,7 @@ FILES_${PN}-dbg += "${libdir}/rpm/.debug \<br>
>> FILES_${PN}-common = "${bindir}/rpm2cpio \<br>
>> ${bindir}/gendiff \<br>
>> ${sysconfdir}/rpm \<br>
>> - /var/spool/repackage \<br>
>> + ${localstatedir}/spool/repackage \<br>
>> "<br>
>><br>
>> FILES_${PN}-libs = "${libdir}/librpm-*.so \<br>
>> @@ -313,6 +316,7 @@ FILES_${PN}-build = "${prefix}/src/rpm \<br>
>> "<br>
>> RDEPENDS_${PN} = "base-files run-postinsts"<br>
>> RDEPENDS_${PN}_class-native = ""<br>
>> +RDEPENDS_${PN}_class-nativesdk = ""<br>
>> RDEPENDS_${PN}-build = "file"<br>
>><br>
>> RDEPENDS_python-rpm = "${PN}"<br>
>> @@ -452,7 +456,7 @@ do_install_append() {<br>
>><br>
>> }<br>
>><br>
>> -do_install_append_class-native() {<br>
>> +add_native_wrapper() {<br>
>> create_wrapper ${D}/${bindir}/rpm \<br>
>> RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \<br>
>> RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \<br>
>> @@ -481,4 +485,12 @@ do_install_append_class-native() {<br>
>> done<br>
>> }<br>
>><br>
>> -BBCLASSEXTEND = "native"<br>
>> +do_install_append_class-native() {<br>
>> + add_native_wrapper<br>
>> +}<br>
>> +<br>
>> +do_install_append_class-nativesdk() {<br>
>> + add_native_wrapper<br>
>> +}<br>
>> +<br>
>> +BBCLASSEXTEND = "native nativesdk"<br>
>><br>
><br>
> _______________________________________________<br>
> Openembedded-core mailing list<br>
> <a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.openembedded.org</a><br>
> <a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</p>