[Branch,~linaro-image-tools/linaro-image-tools/trunk] Rev 576: Export the updated manifest when manipulating with linaro-hwpack-replace.

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

Commit Message

Fathi Boudra Oct. 17, 2012, 7:02 a.m.
Merge authors:
  Ricardo Salveti (rsalveti)
Related merge proposals:
  https://code.launchpad.net/~rsalveti/linaro-image-tools/export-updated-manifest/+merge/130018
  proposed by: Ricardo Salveti (rsalveti)
  review: Approve - Fathi Boudra (fboudra)
------------------------------------------------------------
revno: 576 [merge]
committer: Fathi Boudra <fathi.boudra@linaro.org>
branch nick: linaro-image-tools
timestamp: Wed 2012-10-17 10:01:20 +0300
message:
  Export the updated manifest when manipulating with linaro-hwpack-replace.
modified:
  linaro-hwpack-replace


--
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

Patch

=== modified file 'linaro-hwpack-replace'
--- linaro-hwpack-replace	2011-10-13 12:11:28 +0000
+++ linaro-hwpack-replace	2012-10-17 07:01:20 +0000
@@ -222,7 +222,7 @@ 
 
         modify_Packages_info(debpack_dirname, new_debpack_info, prefix_pkg_remove)
 
-        #tar the hardware pack with the new debian file included in it
+        # Compress the hardware pack with the new debian file included in it
         tar = tarfile.open(hwpack_name , "w:gz")
         origdir = os.getcwd()
         os.chdir(tempdir)
@@ -236,6 +236,10 @@ 
             os.rename(hwpack_name, old_hwpack)
             hwpack_name = old_hwpack
 
+        # Export the updated manifest file
+        manifest_name = hwpack_name.replace('.tar.gz', '.manifest.txt')
+        shutil.copy2(os.path.join(tempdir, 'manifest'), manifest_name)
+
     except Exception, details:
         logger.error("Error Details: %s", details)
         status = 1