Reverse order when glob spec files
authorYigang Wen <yigangx.wen@intel.com>
Fri, 6 Sep 2013 02:09:46 +0000 (10:09 +0800)
committerYigang Wen <yigangx.wen@intel.com>
Fri, 6 Sep 2013 02:14:25 +0000 (10:14 +0800)
Reverse the order of glob spec files in accordance with
git ls-tree spec files.

Fixes: #1270

Change-Id: I9eca3af4c1170e8309ce0c46f42f2593ae09e235

gitbuildsys/utils.py

index c0b5cc9..94c84f3 100644 (file)
@@ -67,7 +67,7 @@ def guess_spec(git_path, packaging_dir, given_spec, commit_id='WC.UNTRACKED'):
         check = lambda fname, dir_only = False: os.path.exists(os.path.join(
                        git_path, fname))
         glob_ = lambda pattern: [ name.replace(git_path+'/', '')
-            for name in glob.glob(os.path.join(git_path, pattern)) ]
+            for name in reversed(glob.glob(os.path.join(git_path, pattern))) ]
         msg = 'No such spec file %s'
     else:
         check = lambda fname, dir_only = False : file_exists_in_rev(git_path,