diff mbox

[Branch,~linaro-image-tools/linaro-image-tools/trunk] Rev 605: Merge in fix for old images that Ubuntu doesn't publish apt sources for.

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

Commit Message

James Tunnicliffe Feb. 21, 2013, 2:45 p.m. UTC
Merge authors:
  James Tunnicliffe (dooferlad)
Related merge proposals:
  https://code.launchpad.net/~dooferlad/linaro-image-tools/fix-hwpack-no-internet/+merge/149507
  proposed by: James Tunnicliffe (dooferlad)
  review: Approve - Milo Casagrande (milo)
------------------------------------------------------------
revno: 605 [merge]
committer: James Tunnicliffe <james.tunnicliffe@linaro.org>
branch nick: linaro-image-tools
timestamp: Thu 2013-02-21 14:44:15 +0000
message:
  Merge in fix for old images that Ubuntu doesn't publish apt sources for.
modified:
  linaro-hwpack-install
  linaro_image_tools/media_create/boards.py


--
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-12-03 08:19:48 +0000
+++ linaro-hwpack-install	2013-02-21 14:40:45 +0000
@@ -173,8 +173,16 @@ 
     FORCE_OPTIONS=""
   fi
 
+  # Do two updates. The first doesn't try to download package lists:
+  # * First update doesn't access net
+  #   - not allowed to fail. Image file + hwpack should contain all packages
+  #     needed to create image. If this update fails we have problems.
+  # * Second update may fail
+  #   - If can't download package updates (the only difference between the two
+  #     commands), we should still be OK.
   echo "Updating apt package lists ..."
-  $sudo apt-get $FORCE_OPTIONS -o "$APT_GET_OPTIONS" update -q
+  $sudo apt-get $FORCE_OPTIONS -o "$APT_GET_OPTIONS" update -q --no-download --ignore-missing
+  $sudo apt-get $FORCE_OPTIONS -o "$APT_GET_OPTIONS" update -q || true
 }
 
 setup_ubuntu_rootfs() {
@@ -282,7 +290,15 @@ 
     if [ -x /sbin/initctl.REAL ]; then
       mv -f /sbin/initctl.REAL /sbin/initctl
     fi
-    $sudo apt-get update -qq
+    # Do two updates. The first doesn't try to download package lists:
+    # * First update doesn't access net
+    #   - not allowed to fail. Image file + hwpack should contain all packages
+    #     needed to create image. If this update fails we have problems.
+    # * Second update may fail
+    #   - If can't download package updates (the only difference between the two
+    #     commands), we should still be OK.
+    $sudo apt-get update -qq --no-download --ignore-missing
+    $sudo apt-get update -qq || true
   fi
   echo "Done"
 }

=== 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-20 10:02:44 +0000
@@ -257,6 +257,7 @@ 
         with self.hardwarepack_handler:
             self.hwpack_format = self.hardwarepack_handler.get_format()
             if (self.hwpack_format == self.hardwarepack_handler.FORMAT_1):
+                self.bootloader_copy_files = None
                 return
 
             if (self.hwpack_format != self.hardwarepack_handler.FORMAT_1):