[PATCH 07/10] srt_upload: Upload incremental update patch to prj_dir/incr, not prj_dir/older

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Tom Zanussi <tom.zanussi@xxxxxxxxxxxxxxx>

The incremental patch should be uploaded to prj_dir/incr - currently
it's being uploaded to prj_dir/older, which also results in a broken
link in the generated cover letter.

This fix assumes the incremental file name is at position 2 in the
file list, which the other code in srt_upload also assumes.

Signed-off-by: Tom Zanussi <tom.zanussi@xxxxxxxxxxxxxxx>
---
 srt_upload.py | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/srt_upload.py b/srt_upload.py
index 54da282..500f412 100644
--- a/srt_upload.py
+++ b/srt_upload.py
@@ -39,13 +39,18 @@ def upload(config, ctx):
 
     path = config['PRJ_DIR']
     older_path = path + '/' + 'older'
+    incr_path = path + '/' + 'incr'
 
     kup = ['kup']
 
-    for f in ctx.get_files():
+    for i, f in enumerate(ctx.get_files()):
         basename = os.path.splitext(f)[0]
-        kup.extend(['put', basename + '.xz', basename + '.sign',
-                    older_path + '/', '--'])
+        if i == 2:
+            kup.extend(['put', basename + '.xz', basename + '.sign',
+                        incr_path + '/', '--'])
+        else:
+            kup.extend(['put', basename + '.xz', basename + '.sign',
+                        older_path + '/', '--'])
 
     # skip incr_file
     for f in ctx.get_files()[:2]:
-- 
2.14.1




[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux