diff mbox

[Branch,~linaro-image-tools/linaro-image-tools/trunk] Rev 574: Build-Info support:

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

Commit Message

Fathi Boudra Oct. 12, 2012, 11:56 a.m. UTC
Merge authors:
  Fathi Boudra (fboudra)
Related merge proposals:
  https://code.launchpad.net/~fboudra/linaro-image-tools/open-build-info-support/+merge/129130
  proposed by: Fathi Boudra (fboudra)
------------------------------------------------------------
revno: 574 [merge]
committer: Fathi Boudra <fathi.boudra@linaro.org>
branch nick: linaro-image-tools
timestamp: Fri 2012-10-12 14:55:03 +0300
message:
  Build-Info support:
  * manifest file isn't license protected (open).
  * create an open BUILD-INFO.txt when no protected files are available.
modified:
  linaro_image_tools/hwpack/builder.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_image_tools/hwpack/builder.py'
--- linaro_image_tools/hwpack/builder.py	2012-10-04 16:54:48 +0000
+++ linaro_image_tools/hwpack/builder.py	2012-10-11 09:24:36 +0000
@@ -362,14 +362,22 @@ 
                                         'warnings:\n%s' % stderrdata)
 
                         # Concatenate BUILD-INFO.txt files
+                        dst_file = open('BUILD-INFO.txt', 'wb')
                         if build_info_available > 0:
-                            dst_file = open('BUILD-INFO.txt', 'wb')
                             build_info_path = \
                                 r'%s/usr/share/doc/*/BUILD-INFO.txt' % \
                                 build_info_dir
                             for src_file in iglob(build_info_path):
                                 with open(src_file, 'rb') as f:
-                                    dst_file.write('Files-Pattern: %s\n' % \
+                                    dst_file.write('\nFiles-Pattern: %s\n' % \
                                                    out_name)
                                     shutil.copyfileobj(f, dst_file)
-                            dst_file.close()
+                            dst_file.write('\nFiles-Pattern: %s\n'
+                                           'License-Type: open\n' %\
+                                           manifest_name)
+                        else:
+                            dst_file.write('Format-Version: 0.1\n'
+                                           'Files-Pattern: %s, %s\n'
+                                           'License-Type: open\n' % \
+                                           (out_name, manifest_name))
+                        dst_file.close()