Signed-off-by: Martin Jansa <martin.ja...@gmail.com> --- .../opkg/opkg/offlineroot_varname.patch | 33 +++++++++++++++----- meta/recipes-devtools/opkg/opkg_svn.bb | 4 +- 2 files changed, 27 insertions(+), 10 deletions(-)
diff --git a/meta/recipes-devtools/opkg/opkg/offlineroot_varname.patch b/meta/recipes-devtools/opkg/opkg/offlineroot_varname.patch index a67f389..73600e3 100644 --- a/meta/recipes-devtools/opkg/opkg/offlineroot_varname.patch +++ b/meta/recipes-devtools/opkg/opkg/offlineroot_varname.patch @@ -1,20 +1,37 @@ OE uses D as the offline install directory in its scripts, not PKG_ROOT. +D is expected to be empty on when offline_root is not used. Upstream-Status: Inappropriate [OE specific usage] RP 2011/12/15 -Index: trunk/libopkg/pkg.c -=================================================================== ---- trunk.orig/libopkg/pkg.c 2011-12-15 15:58:39.000000000 +0000 -+++ trunk/libopkg/pkg.c 2011-12-15 20:04:50.109992736 +0000 -@@ -1280,7 +1280,7 @@ +Signed-off-by: Martin Jansa <martin.ja...@gmail.com> + +diff --git a/libopkg/pkg.c b/libopkg/pkg.c +index 6ccbde2..7d16f84 100644 +--- a/libopkg/pkg.c ++++ b/libopkg/pkg.c +@@ -1250,6 +1250,7 @@ pkg_run_script(pkg_t *pkg, const char *script, const char *args) + int err; + char *path; + char *cmd; ++ char *pkg_root; + + if (conf->noaction) + return 0; +@@ -1280,8 +1281,13 @@ pkg_run_script(pkg_t *pkg, const char *script, const char *args) opkg_msg(INFO, "Running script %s.\n", path); - setenv("PKG_ROOT", -+ setenv("D", - pkg->dest ? pkg->dest->root_dir : conf->default_dest->root_dir, 1); +- pkg->dest ? pkg->dest->root_dir : conf->default_dest->root_dir, 1); ++ pkg_root=pkg->dest ? pkg->dest->root_dir : conf->default_dest->root_dir; ++ setenv("PKG_ROOT", pkg_root, 1); ++ if (conf->offline_root) { ++ setenv("D", pkg_root, 1); ++ } else { ++ setenv("D", "", 1); ++ } if (! file_exists(path)) { - + free(path); diff --git a/meta/recipes-devtools/opkg/opkg_svn.bb b/meta/recipes-devtools/opkg/opkg_svn.bb index dbdfc7e..065a2cb 100644 --- a/meta/recipes-devtools/opkg/opkg_svn.bb +++ b/meta/recipes-devtools/opkg/opkg_svn.bb @@ -13,7 +13,7 @@ SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;proto=http \ file://add_vercmp.patch \ file://add_uname_support.patch \ file://fix_installorder.patch \ - file://offline_postinstall.patch\ + file://offline_postinstall.patch \ file://offlineroot_varname.patch \ file://track_parents.patch \ " @@ -22,7 +22,7 @@ S = "${WORKDIR}/trunk" SRCREV = "633" PV = "0.1.8+svnr${SRCPV}" -PR = "r3" +PR = "r4" PACKAGES =+ "libopkg${PKGSUFFIX}-dev libopkg${PKGSUFFIX} update-alternatives-cworth${PKGSUFFIX}" -- 1.7.8 _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core