Skip to contentSkip to conversation

apt-native and rootfs_deb fixes

PATCH Applied Robert Yang 2 participants 4 messages Aug 14, 2012 – Aug 17, 2012

lore
Share & tools
lore
#0 lore raw

cover apt-native and rootfs_deb fixes

* Remove an extra line from apt.conf
* Fix the race issue and populate_sdk_deb

Test info:

$ bitbake core-image-sato meta-toolchain-sdk core-image-sato-sdk

The build is OK, it would fail by strange errors without these 2 patches.

// Robert

The following changes since commit d45bbc5c75a8f277fc1185a5f28847116eec376d:

createrepo: add wrapper script to fix paths (2012-08-13 20:10:34 +0100)

are available in the git repository at:
git://git.pokylinux.org/poky-contrib robert/deblock
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/deblock

Robert Yang (2):
apt-native 0.7.14: remove an extra line from apt.conf
rootfs_deb: move the lock from WORKDIR to DEPLOY_DIR_DEB

 meta/classes/populate_sdk_deb.bbclass          |    3 ++-
 meta/classes/rootfs_deb.bbclass                |    2 +-
 meta/recipes-devtools/apt/apt-native_0.7.14.bb |    2 +-
 meta/recipes-devtools/apt/files/apt.conf       |    1 -
 4 files changed, 4 insertions(+), 4 deletions(-)
#1 lore raw

PATCH 1/2 apt-native 0.7.14: remove an extra line from apt.conf

There is an additional "};" at the end of apt.conf, remove it.

[YOCTO #2495]

---
 meta/recipes-devtools/apt/apt-native_0.7.14.bb |    2 +-
 meta/recipes-devtools/apt/files/apt.conf       |    1 -
 2 files changed, 1 insertions(+), 2 deletions(-)
meta/recipes-devtools/apt/apt-native_0.7.14.bb +1 -1
index 46f39f5..d4513ca 100644
@@ -1,6 +1,6 @@
 require apt-native.inc
 
-PR = "r10"
+PR = "r11"
 
 SRC_URI += "file://nodoc.patch \
             file://noconfigure.patch \
meta/recipes-devtools/apt/files/apt.conf +0 -1
index ab7a5db..5c20ea4 100644
@@ -40,4 +40,3 @@ APT
 };
 
 DPkg::Options {"--root=#ROOTFS#";"--admindir=#ROOTFS#/var/lib/dpkg";"--force-all";"--no-debsig"};
-};
Signature · 1 line
1.7.1
#2 lore raw

PATCH 2/2 rootfs_deb: move the lock from WORKDIR to DEPLOY_DIR_DEB

In reply to Robert Yang

* There would be race issue if we put the lock to the WORKDIR, for example:
bitbake core-image-sato core-image-sato-sdk

If the lock is in their own WORKDIR, the apt-rootfs.conf and Packages.gz maybe be written by two tasks at the same time, which would cause unexpected errors.

* Create ${target_rootfs}/etc since the "tar -C" needs it.

Note:
* The rpm has put the lock to DEPLOY_DIR_RPM
* The ipk doesn't need it since it has locks for each deploy directory and put the opkg.conf in his own WORKDIR, which doesn't like deb put the apt-rootfs.conf in ${STAGING_ETCDIR_NATIVE}/apt/.

[YOCTO #2495]

---
 meta/classes/populate_sdk_deb.bbclass |    3 ++-
 meta/classes/rootfs_deb.bbclass       |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
meta/classes/populate_sdk_deb.bbclass +2 -1
index 6f89dcf..f2d0621 100644
@@ -6,12 +6,13 @@ DEB_SDK_ARCH = "${@[d.getVar('SDK_ARCH', True), "i386"]\
                 [d.getVar('SDK_ARCH', True) in \
                 ["x86", "i486", "i586", "i686", "pentium"]]}"
 
-do_populate_sdk[lockfiles] += "${WORKDIR}/deb.lock"
+do_populate_sdk[lockfiles] += "${DEPLOY_DIR_DEB}/deb.lock"
 
 populate_sdk_post_deb () {
 
 	local target_rootfs=$1
 
+	mkdir -p ${target_rootfs}/etc
 	tar -cf - -C ${STAGING_ETCDIR_NATIVE} -ps apt | tar -xf - -C ${target_rootfs}/etc
 }
 
meta/classes/rootfs_deb.bbclass +1 -1
index 750a8ca..881fdbd 100644
@@ -8,7 +8,7 @@ ROOTFS_PKGMANAGE_BOOTSTRAP  = "run-postinsts"
 do_rootfs[depends] += "dpkg-native:do_populate_sysroot apt-native:do_populate_sysroot"
 do_rootfs[recrdeptask] += "do_package_write_deb"
 
-do_rootfs[lockfiles] += "${WORKDIR}/deb.lock"
+do_rootfs[lockfiles] += "${DEPLOY_DIR_DEB}/deb.lock"
 
 DEB_POSTPROCESS_COMMANDS = ""
 
Signature · 1 line
1.7.1
Applied
#3 lore raw
In reply to Robert Yang
Quoted 23 lines · Robert Yang

* Remove an extra line from apt.conf
* Fix the race issue and populate_sdk_deb

Test info:

$ bitbake core-image-sato meta-toolchain-sdk core-image-sato-sdk

The build is OK, it would fail by strange errors without these 2 patches.

// Robert

The following changes since commit d45bbc5c75a8f277fc1185a5f28847116eec376d:

createrepo: add wrapper script to fix paths (2012-08-13 20:10:34 +0100)

are available in the git repository at:
git://git.pokylinux.org/poky-contrib robert/deblock
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/deblock

Robert Yang (2):
apt-native 0.7.14: remove an extra line from apt.conf
rootfs_deb: move the lock from WORKDIR to DEPLOY_DIR_DEB

Quoted 6 lines
  meta/classes/populate_sdk_deb.bbclass          |    3 ++-
  meta/classes/rootfs_deb.bbclass                |    2 +-
  meta/recipes-devtools/apt/apt-native_0.7.14.bb |    2 +-
  meta/recipes-devtools/apt/files/apt.conf       |    1 -
  4 files changed, 4 insertions(+), 4 deletions(-)

Merged into OE-Core

Thanks
Sau!

Quoted 6 lines

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core