Merge lp:~salgado/linaro-image-tools/bug-637419 into lp:linaro-image-tools/11.11

Proposed by Guilherme Salgado
Status: Merged
Approved by: James Westby
Approved revision: 72
Merged at revision: 76
Proposed branch: lp:~salgado/linaro-image-tools/bug-637419
Merge into: lp:linaro-image-tools/11.11
Diff against target: 57 lines (+12/-9)
1 file modified
linaro-hwpack-install (+12/-9)
To merge this branch: bzr merge lp:~salgado/linaro-image-tools/bug-637419
Reviewer Review Type Date Requested Status
James Westby (community) Approve
Review via email: mp+35453@code.launchpad.net

Description of the change

Make sure the packages contained in the hwpack take precedence over the ones coming from other sources. Also fixes handling of the --install-latest argument.

To post a comment you must log in.
Revision history for this message
James Westby (james-w) wrote :

Looks good.

Thanks,

James

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'linaro-hwpack-install'
--- linaro-hwpack-install 2010-09-13 14:47:36 +0000
+++ linaro-hwpack-install 2010-09-14 18:15:55 +0000
@@ -25,8 +25,9 @@
25LOCKFILE="/var/lock/hwpack"25LOCKFILE="/var/lock/hwpack"
26TEMP_DIR=$(mktemp -d)26TEMP_DIR=$(mktemp -d)
27HWPACK_DIR="${TEMP_DIR}/unpacked"27HWPACK_DIR="${TEMP_DIR}/unpacked"
28HWPACK_PKGS_SOURCE=/etc/apt/sources.list.d/hwpack-pkgs.list28INSTALL_LATEST="no"
29INSTALL_LATEST=029SOURCES_LIST_FILE="${TEMP_DIR}/sources.list"
30APT_GET_OPTIONS="Dir::Etc::SourceList=${SOURCES_LIST_FILE}"
3031
31die() {32die() {
32 echo -e "$@"33 echo -e "$@"
@@ -42,7 +43,7 @@
42 if [ $1 != "--install-latest" ]; then43 if [ $1 != "--install-latest" ]; then
43 die "Unknown argument: $1 \n$usage_msg"44 die "Unknown argument: $1 \n$usage_msg"
44 fi45 fi
45 INSTALL_LATEST=$146 INSTALL_LATEST="yes"
46 HWPACK_TARBALL=$247 HWPACK_TARBALL=$2
47else48else
48 die $usage_msg49 die $usage_msg
@@ -57,7 +58,6 @@
57 # Ensure our temp dir and apt sources are removed.58 # Ensure our temp dir and apt sources are removed.
58 echo -n "Cleaning up ..."59 echo -n "Cleaning up ..."
59 rm -rf $TEMP_DIR60 rm -rf $TEMP_DIR
60 sudo rm -f $HWPACK_PKGS_SOURCE
61 sudo apt-get update -qq61 sudo apt-get update -qq
62 echo "Done"62 echo "Done"
63}63}
@@ -99,16 +99,19 @@
99 sudo apt-key add $file99 sudo apt-key add $file
100done100done
101101
102# Add one extra apt source for the packages included in the hwpack.102# Add one extra apt source for the packages included in the hwpack and make
103sudo sh -c "echo deb file:${HWPACK_DIR}/pkgs ./ > $HWPACK_PKGS_SOURCE"103# sure it's the first on the list of sources so that it gets precedence over
104# the others.
105echo "deb file:${HWPACK_DIR}/pkgs ./" > "$SOURCES_LIST_FILE"
106cat /etc/apt/sources.list >> "$SOURCES_LIST_FILE"
104107
105sudo apt-get update -qq108sudo apt-get -o "$APT_GET_OPTIONS" update -qq
106109
107echo -n "Installing packages ..."110echo -n "Installing packages ..."
108if [ $INSTALL_LATEST -ne 0 ]; then111if [ "$INSTALL_LATEST" == "no" ]; then
109 packages=`sed 's/=.*//' "${HWPACK_DIR}"/manifest`112 packages=`sed 's/=.*//' "${HWPACK_DIR}"/manifest`
110else113else
111 packages=`cat "${HWPACK_DIR}"/manifest`114 packages=`cat "${HWPACK_DIR}"/manifest`
112fi115fi
113sudo apt-get install $packages116sudo apt-get -o "$APT_GET_OPTIONS" install $packages
114echo "Done"117echo "Done"

Subscribers

People subscribed via source and target branches