From: Yigang Wen Date: Fri, 6 Sep 2013 02:09:46 +0000 (+0800) Subject: Reverse order when glob spec files X-Git-Tag: 0.19~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0d0bee0ba60f7dd4f6ba46fa20f76d9d6f9c7243;p=tools%2Fgbs.git 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 --- 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,