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
1=== modified file 'linaro-hwpack-install'
2--- linaro-hwpack-install 2012-12-03 08:19:48 +0000
3+++ linaro-hwpack-install 2013-02-21 14:43:18 +0000
4@@ -173,8 +173,16 @@
5 FORCE_OPTIONS=""
6 fi
7
8+ # Do two updates. The first doesn't try to download package lists:
9+ # * First update doesn't access net
10+ # - not allowed to fail. Image file + hwpack should contain all packages
11+ # needed to create image. If this update fails we have problems.
12+ # * Second update may fail
13+ # - If can't download package updates (the only difference between the two
14+ # commands), we should still be OK.
15 echo "Updating apt package lists ..."
16- $sudo apt-get $FORCE_OPTIONS -o "$APT_GET_OPTIONS" update -q
17+ $sudo apt-get $FORCE_OPTIONS -o "$APT_GET_OPTIONS" update -q --no-download --ignore-missing
18+ $sudo apt-get $FORCE_OPTIONS -o "$APT_GET_OPTIONS" update -q || true
19 }
20
21 setup_ubuntu_rootfs() {
22@@ -282,7 +290,15 @@
23 if [ -x /sbin/initctl.REAL ]; then
24 mv -f /sbin/initctl.REAL /sbin/initctl
25 fi
26- $sudo apt-get update -qq
27+ # Do two updates. The first doesn't try to download package lists:
28+ # * First update doesn't access net
29+ # - not allowed to fail. Image file + hwpack should contain all packages
30+ # needed to create image. If this update fails we have problems.
31+ # * Second update may fail
32+ # - If can't download package updates (the only difference between the two
33+ # commands), we should still be OK.
34+ $sudo apt-get update -qq --no-download --ignore-missing
35+ $sudo apt-get update -qq || true
36 fi
37 echo "Done"
38 }
39
40=== modified file 'linaro_image_tools/media_create/boards.py'
41--- linaro_image_tools/media_create/boards.py 2013-01-14 14:56:31 +0000
42+++ linaro_image_tools/media_create/boards.py 2013-02-21 14:43:18 +0000
43@@ -257,6 +257,7 @@
44 with self.hardwarepack_handler:
45 self.hwpack_format = self.hardwarepack_handler.get_format()
46 if (self.hwpack_format == self.hardwarepack_handler.FORMAT_1):
47+ self.bootloader_copy_files = None
48 return
49
50 if (self.hwpack_format != self.hardwarepack_handler.FORMAT_1):

Subscribers

People subscribed via source and target branches