Merge lp:~dooferlad/linaro-image-tools/fix-hwpack-no-internet into lp:linaro-image-tools/11.11

Proposed by James Tunnicliffe
Status: Merged
Merged at revision: 605
Proposed branch: lp:~dooferlad/linaro-image-tools/fix-hwpack-no-internet
Merge into: lp:linaro-image-tools/11.11
Diff against target: 50 lines (+19/-2)
2 files modified
linaro-hwpack-install (+18/-2)
linaro_image_tools/media_create/boards.py (+1/-0)
To merge this branch: bzr merge lp:~dooferlad/linaro-image-tools/fix-hwpack-no-internet
Reviewer Review Type Date Requested Status
Milo Casagrande (community) Approve
Review via email: mp+149507@code.launchpad.net

Description of the change

Fixing up hardware pack installs when there aren't any packages update lists available to download.

To post a comment you must log in.
Revision history for this message
Milo Casagrande (milo) wrote :

Hello James,

it looks OK to me. I double tested it with latest hwpack/images and also with the oldest I could find. I would need to thoroughly check it also on a 10.04 install. I cannot go back more than 11.07 on releases.l.o.

Just one thing, but not that important:

+ $sudo apt-get $FORCE_OPTIONS -o "$APT_GET_OPTIONS" update -q --no-download

Should we add also the "--no-missing" here to really force no download at all?
In case, add when merging.

review: Approve
606. By James Tunnicliffe

Slightly updated apt-get update call to try harder to complete without a net connection

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 2012-12-03 08:19:48 +0000
+++ linaro-hwpack-install 2013-02-21 14:43:18 +0000
@@ -173,8 +173,16 @@
173 FORCE_OPTIONS=""173 FORCE_OPTIONS=""
174 fi174 fi
175175
176 # Do two updates. The first doesn't try to download package lists:
177 # * First update doesn't access net
178 # - not allowed to fail. Image file + hwpack should contain all packages
179 # needed to create image. If this update fails we have problems.
180 # * Second update may fail
181 # - If can't download package updates (the only difference between the two
182 # commands), we should still be OK.
176 echo "Updating apt package lists ..."183 echo "Updating apt package lists ..."
177 $sudo apt-get $FORCE_OPTIONS -o "$APT_GET_OPTIONS" update -q184 $sudo apt-get $FORCE_OPTIONS -o "$APT_GET_OPTIONS" update -q --no-download --ignore-missing
185 $sudo apt-get $FORCE_OPTIONS -o "$APT_GET_OPTIONS" update -q || true
178}186}
179187
180setup_ubuntu_rootfs() {188setup_ubuntu_rootfs() {
@@ -282,7 +290,15 @@
282 if [ -x /sbin/initctl.REAL ]; then290 if [ -x /sbin/initctl.REAL ]; then
283 mv -f /sbin/initctl.REAL /sbin/initctl291 mv -f /sbin/initctl.REAL /sbin/initctl
284 fi292 fi
285 $sudo apt-get update -qq293 # Do two updates. The first doesn't try to download package lists:
294 # * First update doesn't access net
295 # - not allowed to fail. Image file + hwpack should contain all packages
296 # needed to create image. If this update fails we have problems.
297 # * Second update may fail
298 # - If can't download package updates (the only difference between the two
299 # commands), we should still be OK.
300 $sudo apt-get update -qq --no-download --ignore-missing
301 $sudo apt-get update -qq || true
286 fi302 fi
287 echo "Done"303 echo "Done"
288}304}
289305
=== modified file 'linaro_image_tools/media_create/boards.py'
--- linaro_image_tools/media_create/boards.py 2013-01-14 14:56:31 +0000
+++ linaro_image_tools/media_create/boards.py 2013-02-21 14:43:18 +0000
@@ -257,6 +257,7 @@
257 with self.hardwarepack_handler:257 with self.hardwarepack_handler:
258 self.hwpack_format = self.hardwarepack_handler.get_format()258 self.hwpack_format = self.hardwarepack_handler.get_format()
259 if (self.hwpack_format == self.hardwarepack_handler.FORMAT_1):259 if (self.hwpack_format == self.hardwarepack_handler.FORMAT_1):
260 self.bootloader_copy_files = None
260 return261 return
261262
262 if (self.hwpack_format != self.hardwarepack_handler.FORMAT_1):263 if (self.hwpack_format != self.hardwarepack_handler.FORMAT_1):

Subscribers

People subscribed via source and target branches