linaro-hwpack-install: add FORCE_OPTIONS to apt update

Bug #979178 reported by Fathi Boudra
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro Image Tools
Fix Released
Wishlist
Fathi Boudra
linaro-image-tools (Debian)
Fix Released
Unknown

Bug Description

linaro-hwpack-install stops and asks for user interaction when trying to
update APT cache from unsigned repositories. Could you please allow
FORCE_OPTIONS to be present when APT tries to update its cache?

Find attached a proposed patch to fix the issue:

--- linaro-image-tools-2012.03.orig/linaro-hwpack-install
+++ linaro-image-tools-2012.03/linaro-hwpack-install
@@ -181,17 +181,17 @@ fi
 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

Related branches

Changed in linaro-image-tools (Debian):
status: Unknown → New
Fathi Boudra (fboudra)
Changed in linaro-image-tools:
assignee: nobody → Fathi Boudra (fboudra)
milestone: none → 2012.04
status: New → Triaged
importance: Undecided → Wishlist
Fathi Boudra (fboudra)
Changed in linaro-image-tools:
status: Triaged → Fix Committed
Changed in linaro-image-tools (Debian):
status: New → Fix Released
Fathi Boudra (fboudra)
Changed in linaro-image-tools:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.