From 0d0bee0ba60f7dd4f6ba46fa20f76d9d6f9c7243 Mon Sep 17 00:00:00 2001 From: Yigang Wen Date: Fri, 6 Sep 2013 10:09:46 +0800 Subject: [PATCH] Reverse order when glob spec files Reverse the order of glob spec files in accordance with git ls-tree spec files. Fixes: #1270 Change-Id: I9eca3af4c1170e8309ce0c46f42f2593ae09e235 --- gitbuildsys/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitbuildsys/utils.py b/gitbuildsys/utils.py index c0b5cc9..94c84f3 100644 --- a/gitbuildsys/utils.py +++ b/gitbuildsys/utils.py @@ -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, -- 2.7.4