diff options
| author | Xavier Claessens <xavier.claessens@collabora.com> | 2023-11-10 16:32:36 -0500 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2023-11-22 22:10:01 +0200 |
| commit | 5e06eb9b899f902eeb56935c166d58b2c5727faf (patch) | |
| tree | 6c51ec61c5d0c7f292f386bf9e8438971c12edb4 /mesonbuild/wrap/wraptool.py | |
| parent | 2ed94ccb47b597990b63207b272a5b3dea4a4877 (diff) | |
| download | meson-5e06eb9b899f902eeb56935c166d58b2c5727faf.tar.gz | |
wraptool: Remove dead code
Update command is implemented in msubprojects.py, because it can update
all wraps in parallel.
Diffstat (limited to 'mesonbuild/wrap/wraptool.py')
| -rw-r--r-- | mesonbuild/wrap/wraptool.py | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/mesonbuild/wrap/wraptool.py b/mesonbuild/wrap/wraptool.py index c4ff9dbbb..187bfaa79 100644 --- a/mesonbuild/wrap/wraptool.py +++ b/mesonbuild/wrap/wraptool.py @@ -20,7 +20,7 @@ import typing as T from glob import glob from .wrap import (open_wrapdburl, WrapException, get_releases, get_releases_data, - update_wrap_file, parse_patch_url) + parse_patch_url) from pathlib import Path from .. import mesonlib, msubprojects @@ -134,31 +134,6 @@ def get_current_version(wrapfile: str) -> T.Tuple[str, str, str, str, T.Optional patch_filename = wrap_data['patch_filename'] return branch, revision, wrap_data['directory'], wrap_data['source_filename'], patch_filename -def update(options: 'argparse.Namespace') -> None: - name = options.name - if not os.path.isdir('subprojects'): - raise SystemExit('Subprojects dir not found. Run this command in your source root directory.') - wrapfile = os.path.join('subprojects', name + '.wrap') - if not os.path.exists(wrapfile): - raise SystemExit('Project ' + name + ' is not in use.') - (branch, revision, subdir, src_file, patch_file) = get_current_version(wrapfile) - (new_branch, new_revision) = get_latest_version(name, options.allow_insecure) - if new_branch == branch and new_revision == revision: - print('Project ' + name + ' is already up to date.') - raise SystemExit - update_wrap_file(wrapfile, name, new_branch, new_revision, options.allow_insecure) - shutil.rmtree(os.path.join('subprojects', subdir), ignore_errors=True) - try: - os.unlink(os.path.join('subprojects/packagecache', src_file)) - except FileNotFoundError: - pass - if patch_file is not None: - try: - os.unlink(os.path.join('subprojects/packagecache', patch_file)) - except FileNotFoundError: - pass - print(f'Updated {name} version {new_branch} revision {new_revision}') - def info(options: 'argparse.Namespace') -> None: name = options.name releases = get_releases(options.allow_insecure) |
