Mercurial > sat_docs
comparison flatpak/build_manifest.py @ 154:cd411b0d1e19
flatpak (build_manifest): fixed ignore-cache when "all" is used
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 28 Jun 2019 15:20:34 +0200 (2019-06-28) |
parents | df75b62e653e |
children | 5af7c3d4fab2 |
comparison
equal
deleted
inserted
replaced
153:df75b62e653e | 154:cd411b0d1e19 |
---|---|
197 # name of the cache without prefix, mainly used for python_deps | 197 # name of the cache without prefix, mainly used for python_deps |
198 shortname = name.split('__', 1)[0] | 198 shortname = name.split('__', 1)[0] |
199 | 199 |
200 if shortname in args.ignore_cache or 'all' in args.ignore_cache: | 200 if shortname in args.ignore_cache or 'all' in args.ignore_cache: |
201 print(f"ignoring cache for {shortname}") | 201 print(f"ignoring cache for {shortname}") |
202 args.ignore_cache.remove(shortname) | 202 if shortname in args.ignore_cache: |
203 args.ignore_cache.remove(shortname) | |
203 return None | 204 return None |
204 try: | 205 try: |
205 cache_name = cache[name] | 206 cache_name = cache[name] |
206 cache_updated = cache_name['updated'] | 207 cache_updated = cache_name['updated'] |
207 except KeyError: | 208 except KeyError: |
1007 | 1008 |
1008 print_step("writing manifest") | 1009 print_step("writing manifest") |
1009 with package_file.open('w') as f: | 1010 with package_file.open('w') as f: |
1010 json.dump(manifest, f, indent=4) | 1011 json.dump(manifest, f, indent=4) |
1011 | 1012 |
1012 if args.ignore_cache: | 1013 if args.ignore_cache and args.ignore_cache != ['all']: |
1013 print("/!\\ those --ignore-cache arguments don't correspond to any step: {}". | 1014 print("/!\\ those --ignore-cache arguments don't correspond to any step: {}". |
1014 format(', '.join(args.ignore_cache))) | 1015 format(', '.join(args.ignore_cache))) |
1015 | 1016 |
1016 print(f"manifest generated successfully at {package_file}") | 1017 print(f"manifest generated successfully at {package_file}") |
1017 | 1018 |