Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrap: Print deprecation warnings when using wrapdb v1 #13903

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/markdown/snippets/wrapdbv1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Limited support for WrapDB v1

WrapDB v1 has been discontinued for several years, Meson will now print a
deprecation warning if a v1 URL is still being used. Wraps can be updated to
latest version using `meson wrap update` command.
9 changes: 9 additions & 0 deletions mesonbuild/wrap/wrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,15 @@ def from_wrap_file(filename: str, subproject: SubProject = SubProject('')) -> Pa
wrap.original_filename = filename
wrap.parse_provide_section(config)

patch_url = values.get('patch_url')
if patch_url and patch_url.startswith('https://wrapdb.mesonbuild.com/v1'):
if name == 'sqlite':
mlog.deprecation('sqlite wrap has been renamed to sqlite3, update using `meson wrap install sqlite3`')
elif name == 'libjpeg':
mlog.deprecation('libjpeg wrap has been renamed to libjpeg-turbo, update using `meson wrap install libjpeg-turbo`')
else:
mlog.deprecation(f'WrapDB v1 is deprecated, updated using `meson wrap update {name}`')

with open(filename, 'r', encoding='utf-8') as file:
wrap.wrapfile_hash = hashlib.sha256(file.read().encode('utf-8')).hexdigest()

Expand Down
Loading