diff options
author | Tristan Partin <tristan@partin.io> | 2021-04-26 10:14:39 -0500 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2021-04-26 12:06:12 -0400 |
commit | bb12587e0ba83ed6cde0f395c0a31cee9a3ace26 (patch) | |
tree | d465e4c9624905505e90d81613232cab7e0de3b3 /mesonbuild/msubprojects.py | |
parent | d4e867809b5b16a4eda0751c7d0148b13b0e35d9 (diff) | |
download | meson-bb12587e0ba83ed6cde0f395c0a31cee9a3ace26.zip meson-bb12587e0ba83ed6cde0f395c0a31cee9a3ace26.tar.gz meson-bb12587e0ba83ed6cde0f395c0a31cee9a3ace26.tar.bz2 |
Add subprojects purge wrap-git coverage
Diffstat (limited to 'mesonbuild/msubprojects.py')
-rwxr-xr-x | mesonbuild/msubprojects.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/mesonbuild/msubprojects.py b/mesonbuild/msubprojects.py index bdd8c1f..b50c986 100755 --- a/mesonbuild/msubprojects.py +++ b/mesonbuild/msubprojects.py @@ -325,11 +325,14 @@ def purge(r: Resolver, wrap: PackageDefinition, repo_dir: str, options: argparse if options.include_cache: packagecache = Path(r.cachedir).resolve() - subproject_cache_file = packagecache / wrap.get("source_filename") - if subproject_cache_file.is_file(): - if options.confirm: - subproject_cache_file.unlink() - mlog.log(f'Deleting {subproject_cache_file}') + try: + subproject_cache_file = packagecache / wrap.get("source_filename") + if subproject_cache_file.is_file(): + if options.confirm: + subproject_cache_file.unlink() + mlog.log(f'Deleting {subproject_cache_file}') + except WrapException: + pass try: subproject_patch_file = packagecache / wrap.get("patch_filename") @@ -353,7 +356,6 @@ def purge(r: Resolver, wrap: PackageDefinition, repo_dir: str, options: argparse subproject_source_dir.unlink() mlog.log(f'Deleting {subproject_source_dir}') return True - if not subproject_source_dir.is_dir(): return True |