summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_deb.bbclass
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2013-08-12 19:47:11 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-22 18:30:00 +0100
commit388278818d2af0a2c6a687765d43f22fe6f3c407 (patch)
tree97f629be5a3d01036bdc5d5e2e97e23ef6127299 /meta/classes/package_deb.bbclass
parentdc5f6c3898555b59f16bf809ae4c5418656e6ac9 (diff)
downloadpoky-388278818d2af0a2c6a687765d43f22fe6f3c407.tar.gz
package_deb: Add support for NO_RECOMMENDATIONS and PACKAGE_EXCLUDE
Add support for NO_RECOMMENDATIONS and PACKAGE_EXCLUDE. Also add a warning that ensures users know that BAD_RECOMMENDATIONS support is not implemented in the debian package/rootfs classes. (From OE-Core rev: 42b115b6d65c8205acb77b96db481f3e5172266b) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package_deb.bbclass')
-rw-r--r--meta/classes/package_deb.bbclass17
1 files changed, 13 insertions, 4 deletions
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 4980555764..068c11a535 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -12,6 +12,8 @@ PKGWRITEDIRDEB = "${WORKDIR}/deploy-debs"
12 12
13APTCONF_TARGET = "${WORKDIR}" 13APTCONF_TARGET = "${WORKDIR}"
14 14
15APT_ARGS = "${@['', '--no-install-recommends'][d.getVar("NO_RECOMMENDATIONS", True) == "1"]}"
16
15# 17#
16# Update the Packages index files in ${DEPLOY_DIR_DEB} 18# Update the Packages index files in ${DEPLOY_DIR_DEB}
17# 19#
@@ -83,6 +85,13 @@ package_install_internal_deb () {
83 priority=$(expr $priority + 5) 85 priority=$(expr $priority + 5)
84 done 86 done
85 87
88 for pkg in ${PACKAGE_EXCLUDE}; do
89 (echo "Package: $pkg"
90 echo "Pin: release *"
91 echo "Pin-Priority: -1"
92 echo) >> ${APTCONF_TARGET}/apt/preferences
93 done
94
86 tac ${APTCONF_TARGET}/apt/sources.list.rev > ${APTCONF_TARGET}/apt/sources.list 95 tac ${APTCONF_TARGET}/apt/sources.list.rev > ${APTCONF_TARGET}/apt/sources.list
87 96
88 # The params in deb package control don't allow character `_', so 97 # The params in deb package control don't allow character `_', so
@@ -105,7 +114,7 @@ package_install_internal_deb () {
105 114
106 if [ ! -z "${package_linguas}" ]; then 115 if [ ! -z "${package_linguas}" ]; then
107 for i in ${package_linguas}; do 116 for i in ${package_linguas}; do
108 apt-get install $i --force-yes --allow-unauthenticated 117 apt-get ${APT_ARGS} install $i --force-yes --allow-unauthenticated
109 if [ $? -ne 0 ]; then 118 if [ $? -ne 0 ]; then
110 exit 1 119 exit 1
111 fi 120 fi
@@ -114,13 +123,13 @@ package_install_internal_deb () {
114 123
115 # normal install 124 # normal install
116 if [ ! -z "${package_to_install}" ]; then 125 if [ ! -z "${package_to_install}" ]; then
117 apt-get install ${package_to_install} --force-yes --allow-unauthenticated 126 apt-get ${APT_ARGS} install ${package_to_install} --force-yes --allow-unauthenticated
118 if [ $? -ne 0 ]; then 127 if [ $? -ne 0 ]; then
119 exit 1 128 exit 1
120 fi 129 fi
121 130
122 # Attempt to correct the probable broken dependencies in place. 131 # Attempt to correct the probable broken dependencies in place.
123 apt-get -f install 132 apt-get ${APT_ARGS} -f install
124 if [ $? -ne 0 ]; then 133 if [ $? -ne 0 ]; then
125 exit 1 134 exit 1
126 fi 135 fi
@@ -129,7 +138,7 @@ package_install_internal_deb () {
129 rm -f `dirname ${BB_LOGFILE}`/log.do_${task}-attemptonly.${PID} 138 rm -f `dirname ${BB_LOGFILE}`/log.do_${task}-attemptonly.${PID}
130 if [ ! -z "${package_attemptonly}" ]; then 139 if [ ! -z "${package_attemptonly}" ]; then
131 for i in ${package_attemptonly}; do 140 for i in ${package_attemptonly}; do
132 apt-get install $i --force-yes --allow-unauthenticated >> `dirname ${BB_LOGFILE}`/log.do_${task}-attemptonly.${PID} 2>&1 || true 141 apt-get ${APT_ARGS} install $i --force-yes --allow-unauthenticated >> `dirname ${BB_LOGFILE}`/log.do_${task}-attemptonly.${PID} 2>&1 || true
133 done 142 done
134 fi 143 fi
135 144