diff options
author | Kevin Tian <kevin.tian@intel.com> | 2010-08-26 12:39:07 +0800 |
---|---|---|
committer | Joshua Lock <josh@linux.intel.com> | 2010-08-26 08:54:55 +0100 |
commit | 8ea7fa6d4c7734da6034d44f8b6d78d2993f1949 (patch) | |
tree | d0be459748627b653337548837be820c529a8117 /meta/classes/rootfs_deb.bbclass | |
parent | d46c362a46f26b38d8da30f6a83e7c0fdadda348 (diff) | |
download | poky-8ea7fa6d4c7734da6034d44f8b6d78d2993f1949.tar.gz |
opkg: finalize the change to var directory
commit 1d0757f16beb31551733d9d755d72337ccda9642 changes opkg run state from
/usr/lib/opkg to /var/lib/opkg, which however is incomplete and still many
important information is kept under old directory including postinst methods.
This makes latest boot into a mess.
So finalize this movement to /var here. Fix [BUGID #229]
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
Diffstat (limited to 'meta/classes/rootfs_deb.bbclass')
-rw-r--r-- | meta/classes/rootfs_deb.bbclass | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/meta/classes/rootfs_deb.bbclass b/meta/classes/rootfs_deb.bbclass index 16b8a86a58..b33d153dae 100644 --- a/meta/classes/rootfs_deb.bbclass +++ b/meta/classes/rootfs_deb.bbclass | |||
@@ -8,6 +8,8 @@ ROOTFS_PKGMANAGE_BOOTSTRAP = "run-postinsts" | |||
8 | do_rootfs[depends] += "dpkg-native:do_populate_sysroot apt-native:do_populate_sysroot" | 8 | do_rootfs[depends] += "dpkg-native:do_populate_sysroot apt-native:do_populate_sysroot" |
9 | do_rootfs[recrdeptask] += "do_package_write_deb" | 9 | do_rootfs[recrdeptask] += "do_package_write_deb" |
10 | 10 | ||
11 | opkglibdir = "${localstatedir}/lib/opkg" | ||
12 | |||
11 | fakeroot rootfs_deb_do_rootfs () { | 13 | fakeroot rootfs_deb_do_rootfs () { |
12 | set +e | 14 | set +e |
13 | mkdir -p ${IMAGE_ROOTFS}/var/dpkg/info | 15 | mkdir -p ${IMAGE_ROOTFS}/var/dpkg/info |
@@ -120,13 +122,13 @@ fakeroot rootfs_deb_do_rootfs () { | |||
120 | set -e | 122 | set -e |
121 | 123 | ||
122 | # Hacks to allow opkg's update-alternatives and opkg to coexist for now | 124 | # Hacks to allow opkg's update-alternatives and opkg to coexist for now |
123 | mkdir -p ${IMAGE_ROOTFS}/usr/lib/opkg | 125 | mkdir -p ${IMAGE_ROOTFS}${opkglibdir} |
124 | if [ -e ${IMAGE_ROOTFS}/var/dpkg/alternatives ]; then | 126 | if [ -e ${IMAGE_ROOTFS}/var/dpkg/alternatives ]; then |
125 | rmdir ${IMAGE_ROOTFS}/var/dpkg/alternatives | 127 | rmdir ${IMAGE_ROOTFS}/var/dpkg/alternatives |
126 | fi | 128 | fi |
127 | ln -s /usr/lib/opkg/alternatives ${IMAGE_ROOTFS}/var/dpkg/alternatives | 129 | ln -s ${opkglibdir}/alternatives ${IMAGE_ROOTFS}/var/dpkg/alternatives |
128 | ln -s /var/dpkg/info ${IMAGE_ROOTFS}/usr/lib/opkg/info | 130 | ln -s /var/dpkg/info ${IMAGE_ROOTFS}${opkglibdir}/info |
129 | ln -s /var/dpkg/status ${IMAGE_ROOTFS}/usr/lib/opkg/status | 131 | ln -s /var/dpkg/status ${IMAGE_ROOTFS}${opkglibdir}/status |
130 | 132 | ||
131 | ${ROOTFS_POSTPROCESS_COMMAND} | 133 | ${ROOTFS_POSTPROCESS_COMMAND} |
132 | 134 | ||
@@ -154,6 +156,6 @@ rootfs_deb_log_check() { | |||
154 | } | 156 | } |
155 | 157 | ||
156 | remove_packaging_data_files() { | 158 | remove_packaging_data_files() { |
157 | rm -rf ${IMAGE_ROOTFS}/usr/lib/opkg/ | 159 | rm -rf ${IMAGE_ROOTFS}${opkglibdir} |
158 | rm -rf ${IMAGE_ROOTFS}/usr/dpkg/ | 160 | rm -rf ${IMAGE_ROOTFS}/usr/dpkg/ |
159 | } | 161 | } |