Skip to content

Commit 2c9d1d5

Browse files
committed
wrap: Print deprecation warnings when using wrapdb v1
1 parent f0851c9 commit 2c9d1d5

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

docs/markdown/snippets/wrapdbv1.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## Limited support for WrapDB v1
2+
3+
WrapDB v1 has been discontinued for several years, Meson will now print a
4+
deprecation warning if a v1 URL is still being used. Wraps can be updated to
5+
latest version using `meson wrap update` command.

mesonbuild/wrap/wrap.py

+9
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,15 @@ def from_wrap_file(filename: str, subproject: SubProject = SubProject('')) -> Pa
213213
wrap.original_filename = filename
214214
wrap.parse_provide_section(config)
215215

216+
patch_url = values.get('patch_url')
217+
if patch_url and patch_url.startswith('https://wrapdb.mesonbuild.com/v1'):
218+
if name == 'sqlite':
219+
mlog.deprecation('sqlite wrap has been renamed to sqlite3, update using `meson wrap install sqlite3`')
220+
elif name == 'libjpeg':
221+
mlog.deprecation('libjpeg wrap has been renamed to libjpeg-turbo, update using `meson wrap install libjpeg-turbo`')
222+
else:
223+
mlog.deprecation(f'WrapDB v1 is deprecated, updated using `meson wrap update {name}`')
224+
216225
with open(filename, 'r', encoding='utf-8') as file:
217226
wrap.wrapfile_hash = hashlib.sha256(file.read().encode('utf-8')).hexdigest()
218227

0 commit comments

Comments
 (0)