[PATCH] srt_create: Make sure series output is sorted

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

 



Hi Daniel,

I actually used your stable-rt-tools srt tool this time to do the
latest 3.18-rt update release - overall it works well and did the job
nicely!

I did run into one serious problem in that the series file that gets
created for the patches tarball lists the patches in essentially random
order on my system, so using it to apply the series with quilt failed
immediately.  The patch below fixes the problem for me.

There were a few other things I ran into which boiled down to
essentially lack of documentation and/or informative enough error
messages, and one or two things having to do with my workflow on two
separate machines that I'll have to think about.  I'll write some
patches addressing those and sent when I get the chance.

Anyway, thanks for the useful tool!

Tom 

--

From: Tom Zanussi <tom.zanussi@xxxxxxxxxxxxxxx>

os.listdir() doesn't guarantee ordering, so using its output directly
as input for the series file can result in a randomly ordered series
that quilt can't apply.

Signed-off-by: Tom Zanussi <tom.zanussi@xxxxxxxxxxxxxxx>
---
 srt_create.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srt_create.py b/srt_create.py
index 7314988..90d1e1b 100644
--- a/srt_create.py
+++ b/srt_create.py
@@ -47,7 +47,7 @@ def create_series(old_tag, new_tag, dirname):
     cmd(['git', 'format-patch', '-q', '-o', dirname,
          '{0}..{1}'.format(old_tag, new_tag)])
 
-    patches = [f for f in os.listdir(dirname)
+    patches = [f for f in sorted(os.listdir(dirname))
                if os.path.isfile(os.path.join(dirname, f))]
     with open(dirname + '/series', 'w') as file:
         for p in patches:
-- 
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