[oe-commits] Hongxu Jia : package_deb.bbclass: fix meta-toolchain-sdk fail on do_populate_sdk

git at git.openembedded.org git at git.openembedded.org
Sat Mar 2 13:02:30 UTC 2013


Module: openembedded-core.git
Branch: master
Commit: a66ed54490305380c549838f9a580528d5b49275
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=a66ed54490305380c549838f9a580528d5b49275

Author: Hongxu Jia <hongxu.jia at windriver.com>
Date:   Sat Mar  2 17:12:59 2013 +0800

package_deb.bbclass:fix meta-toolchain-sdk fail on do_populate_sdk

When build meta-toolchain-sdk in a newly created environment, there is
an error:
...
packagegroup-core-standalone-gmae-sdk-target set to manually installed.
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
avahi-dev: Depends: avahi (= 0.6.31-r6.1) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a
solution).
...
In this case, avahi was installed and then removed by dpkg (the reason is
unknown, only with log `Noting disappearance of avahi, which has been
completely replaced'), the uninstall was done by dpkg rather than apt,
and apt detected the package dependency was broken, so apt-get install failed.

Use `apt-get install -f' to correct the upper broken dependencies in place.
The removed avahi will be reinstalled.

[YOCTO #3720]

Signed-off-by: Hongxu Jia <hongxu.jia at windriver.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/classes/package_deb.bbclass |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 309c48d..2f27800 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -117,12 +117,18 @@ package_install_internal_deb () {
 	fi
 
 	# normal install
-	for i in ${package_to_install}; do
-		apt-get install $i --force-yes --allow-unauthenticated
+	if [ ! -z "${package_to_install}" ]; then
+		apt-get install ${package_to_install} --force-yes --allow-unauthenticated
 		if [ $? -ne 0 ]; then
 			exit 1
 		fi
-	done
+
+		# Attempt to correct the probable broken dependencies in place.
+		apt-get -f install
+		if [ $? -ne 0 ]; then
+			exit 1
+		fi
+	fi
 
 	rm -f `dirname ${BB_LOGFILE}`/log.do_${task}-attemptonly.${PID}
 	if [ ! -z "${package_attemptonly}" ]; then





More information about the Openembedded-commits mailing list