diff options
author | rillig <rillig@pkgsrc.org> | 2015-10-11 07:27:12 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2015-10-11 07:27:12 +0000 |
commit | f8f06a2c34f22633a75a915dc1c9e2fcf195ffe3 (patch) | |
tree | 0caa81092d04423532e0e9d04f8ea90ca703be0b /pkgtools | |
parent | 110fc6d4e556a2fec32747319573f97ffd0811b9 (diff) | |
download | pkgsrc-f8f06a2c34f22633a75a915dc1c9e2fcf195ffe3.tar.gz |
Fixed warning for using github.com in MASTER_SITES.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkglint/TODO | 4 | ||||
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 9 |
2 files changed, 9 insertions, 4 deletions
diff --git a/pkgtools/pkglint/TODO b/pkgtools/pkglint/TODO index 242ef175e2d..b127fe340a1 100644 --- a/pkgtools/pkglint/TODO +++ b/pkgtools/pkglint/TODO @@ -1,4 +1,4 @@ -$NetBSD: TODO,v 1.80 2015/03/07 15:33:21 tnn Exp $ +$NetBSD: TODO,v 1.81 2015/10/11 07:27:12 rillig Exp $ Please add your own entries at the bottom of this file. If possible, include the name of an example package where a warning should occur. @@ -37,5 +37,3 @@ include the name of an example package where a warning should occur. example, devel/p5-Net-LDAP and devel/p5-Net-ldap should be considered different paths. * Warn about using REPLACE_PYTHON without including application.mk. -* Warn about MASTER_SITES containing "github.com", point user to - make help topic=github. Also don't complain about GH_* variables. diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index 7850de1ffa2..08bb9a95794 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -1,5 +1,5 @@ #! @PERL@ -# $NetBSD: pkglint.pl,v 1.878 2015/06/14 18:18:34 wiz Exp $ +# $NetBSD: pkglint.pl,v 1.879 2015/10/11 07:27:13 rillig Exp $ # # pkglint - static analyzer and checker for pkgsrc packages @@ -4058,7 +4058,14 @@ sub checkline_mk_vartype_basic($$$$$$$$) { foreach my $site (keys(%{$sites})) { if (index($value, $site) == 0) { my $subdir = substr($value, length($site)); + my $is_github = $value =~ m"^https://github\.com/"; + if ($is_github) { + $subdir =~ s|/.*|/|; + } $line->log_warning(sprintf("Please use \${%s:=%s} instead of \"%s\".", $sites->{$site}, $subdir, $value)); + if ($is_github) { + $line->log_warning("Run \"".conf_make." help topic=github\" for further tips."); + } last; } } |