diff mbox

[Branch,~linaro-image-tools/linaro-image-tools/trunk] Rev 399: The l-m-c was failing to use the hwpack created by linaro-hwpack-replace as

Message ID 20110803115044.25712.87236.launchpad@loganberry.canonical.com
State Accepted
Headers show

Commit Message

Deepti B. Kalakeri Aug. 3, 2011, 11:50 a.m. UTC
Merge authors:
  Deepti B. Kalakeri (deeptik)
Related merge proposals:
  https://code.launchpad.net/~deeptik/linaro-image-tools/fix-targz-repack-file/+merge/70286
  proposed by: Deepti B. Kalakeri (deeptik)
  review: Approve - Mattias Backman (mabac)
------------------------------------------------------------
revno: 399 [merge]
committer: Deepti B. Kalakeri<deepti.kalakeri@linaro.org>
branch nick: linaro-image-tools
timestamp: Wed 2011-08-03 12:46:11 +0100
message:
  The l-m-c was failing to use the hwpack created by linaro-hwpack-replace as 
  there was a problem in the hierarchy of the files it packed and it had a "./"
  appended in every file. This patch fixes the hwpack files path.
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
diff mbox

Patch

=== modified file 'linaro-hwpack-replace'
--- linaro-hwpack-replace	2011-07-28 16:32:53 +0000
+++ linaro-hwpack-replace	2011-08-03 11:29:43 +0000
@@ -23,6 +23,7 @@ 
 import os
 import sys
 import shutil
+import glob
 import logging
 import tarfile
 import tempfile
@@ -201,7 +202,8 @@ 
         #tar the hardware pack with the new debian file included in it
         tar = tarfile.open( hwpack_name , "w:gz")
         os.chdir(tempdir)
-        tar.add('.', recursive=True)
+        for file_name in glob.glob('*'):
+            tar.add(file_name, recursive=True)
         tar.close()
     except Exception, details:
         logger.error("Error Details: %s", details)