aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/msubprojects.py
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2021-05-25 10:05:19 -0400
committerXavier Claessens <xavier.claessens@collabora.com>2021-06-04 15:35:29 -0400
commit62c53b834dbee366104dc8a32927f1b7da028922 (patch)
tree8ce07e6f75ed64b01bfc6379cad1665136d249c8 /mesonbuild/msubprojects.py
parentdf4d2bd24729a06c604a52aad4b44c5ddbd608fa (diff)
downloadmeson-62c53b834dbee366104dc8a32927f1b7da028922.zip
meson-62c53b834dbee366104dc8a32927f1b7da028922.tar.gz
meson-62c53b834dbee366104dc8a32927f1b7da028922.tar.bz2
wrap: Port to v2 protocol
Fixes: #8754.
Diffstat (limited to 'mesonbuild/msubprojects.py')
-rwxr-xr-xmesonbuild/msubprojects.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/mesonbuild/msubprojects.py b/mesonbuild/msubprojects.py
index b50c986..7b608c5 100755
--- a/mesonbuild/msubprojects.py
+++ b/mesonbuild/msubprojects.py
@@ -4,23 +4,24 @@ from pathlib import Path
from . import mlog
from .mesonlib import quiet_git, verbose_git, GitException, Popen_safe, MesonException, windows_proof_rmtree
-from .wrap.wrap import API_ROOT, PackageDefinition, Resolver, WrapException, ALL_TYPES
+from .wrap.wrap import PackageDefinition, Resolver, WrapException, ALL_TYPES
from .wrap import wraptool
ALL_TYPES_STRING = ', '.join(ALL_TYPES)
def update_wrapdb_file(wrap):
- patch_url = wrap.get('patch_url')
- branch, revision = wraptool.parse_patch_url(patch_url)
+ try:
+ patch_url = wrap.get('patch_url')
+ branch, revision = wraptool.parse_patch_url(patch_url)
+ except WrapException:
+ return
new_branch, new_revision = wraptool.get_latest_version(wrap.name)
if new_branch != branch or new_revision != revision:
wraptool.update_wrap_file(wrap.filename, wrap.name, new_branch, new_revision)
mlog.log(' -> New wrap file downloaded.')
def update_file(r, wrap, repo_dir, options):
- patch_url = wrap.values.get('patch_url', '')
- if patch_url.startswith(API_ROOT):
- update_wrapdb_file(wrap)
+ update_wrapdb_file(wrap)
if not os.path.isdir(repo_dir):
# The subproject is not needed, or it is a tarball extracted in
# 'libfoo-1.0' directory and the version has been bumped and the new