diff mbox

[Branch,~linaro-image-tools/linaro-image-tools/trunk] Rev 506: Allow FORCE_OPTIONS to be present when APT tries to update its cache:

Message ID 20120412121310.26576.3762.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Fathi Boudra April 12, 2012, 12:13 p.m. UTC
Merge authors:
  Fathi Boudra (fboudra)
Related merge proposals:
  https://code.launchpad.net/~fboudra/linaro-image-tools/add-FORCE_OPTIONS-to-apt-update-bug979178/+merge/101719
  proposed by: Fathi Boudra (fboudra)
  review: Approve - Loïc Minier (lool)
------------------------------------------------------------
revno: 506 [merge]
committer: Fathi Boudra <fathi.boudra@linaro.org>
branch nick: linaro-image-tools
timestamp: Thu 2012-04-12 15:10:26 +0300
message:
  Allow FORCE_OPTIONS to be present when APT tries to update its cache:
  linaro-hwpack-install stops and asks for user interaction when trying
  to update APT cache from unsigned repositories. (LP: #979178)
  Thanks to Hector Oron <zumbi@debian.org>
modified:
  linaro-hwpack-install


--
lp:linaro-image-tools
https://code.launchpad.net/~linaro-image-tools/linaro-image-tools/trunk

You are subscribed to branch lp:linaro-image-tools.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-image-tools/linaro-image-tools/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'linaro-hwpack-install'
--- linaro-hwpack-install	2012-03-23 06:13:05 +0000
+++ linaro-hwpack-install	2012-04-12 11:26:32 +0000
@@ -181,17 +181,17 @@ 
 echo "deb file:${HWPACK_DIR}/pkgs ./" > "$SOURCES_LIST_FILE"
 cat /etc/apt/sources.list >> "$SOURCES_LIST_FILE"
 
-echo "Updating apt package lists ..."
-$sudo apt-get -o "$APT_GET_OPTIONS" update -q
-
-echo -n "Installing packages ..."
-
 if [ "$FORCE_YES" == "yes" ]; then
   FORCE_OPTIONS="--yes --force-yes"
 else
   FORCE_OPTIONS=""
 fi
 
+echo "Updating apt package lists ..."
+$sudo apt-get $FORCE_OPTIONS -o "$APT_GET_OPTIONS" update -q
+
+echo -n "Installing packages ..."
+
 # "newer" hwpacks contain a dependency package whose Depends is the
 # same as the packages config setting from the file the hwpack was
 # build from.  But if we just installed that, a newer version of a