about summary refs log tree commit diff
diff options
context:
space:
mode:
authorclassabbyamp <void@placeviolette.net>2023-04-15 01:27:17 -0400
committerToyam Cox <aviator45003@gmail.com>2023-04-27 22:30:44 -0400
commit69187b4017ad720819247d7e067dce22f0cfd472 (patch)
tree3d786dbf78b8484c5ffb3d4986a94df12e5fe7b5
parenteca62f8ed2480a1d678932c85701c0f62801ae58 (diff)
downloadxtools-69187b4017ad720819247d7e067dce22f0cfd472.tar.gz
xtools-69187b4017ad720819247d7e067dce22f0cfd472.tar.xz
xtools-69187b4017ad720819247d7e067dce22f0cfd472.zip
xlint: lint crates.io distfile urls
this is painful:
```
distfiles="https://crates.io/api/v1/crates/pkgname/${version}/download>pkgname-${version}.tar.gz"
```

this is better, and xbps-src already supports extracting them:
```
distfiles="https://static.crates.io/crates/pkgname/pkgname-${version}.crate"
```

this replaces void-linux/void-packages#43417 as it adding new `_SITE` variables
has been discouraged
-rwxr-xr-xxlint1
1 files changed, 1 insertions, 0 deletions
diff --git a/xlint b/xlint
index 7ab4da7..5313f76 100755
--- a/xlint
+++ b/xlint
@@ -470,6 +470,7 @@ for argument; do
 	scan 'distfiles=.*freedesktop\.org/software' 'use $FREEDESKTOP_SITE'
 	scan 'distfiles=.*download.kde.org/stable' 'use $KDE_SITE'
 	scan 'distfiles=.*xorg\.freedesktop\.org/wiki/' 'use $XORG_HOME'
+	scan 'distfiles=.*crates.io/api/' 'use https://static.crates.io/crates/pkgname/pkgname-${version}.crate'
 	scan 'usr/lib/python3.[0-9]/site-packages' 'use $py3_sitelib'
 	scan 'pycompile_module=' 'do not set pycompile_module, it is autodetected'
 	scan '^\t*function\b' 'do not use the function keyword'