diff options
Diffstat (limited to 'meta/classes/package_deb.bbclass')
| -rw-r--r-- | meta/classes/package_deb.bbclass | 17 |
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 | ||
| 13 | APTCONF_TARGET = "${WORKDIR}" | 13 | APTCONF_TARGET = "${WORKDIR}" |
| 14 | 14 | ||
| 15 | APT_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 | ||
