summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrillig <rillig>2015-10-11 07:27:12 +0000
committerrillig <rillig>2015-10-11 07:27:12 +0000
commitc4bab7da1ec7bec148c24643950136c8a2255974 (patch)
tree0caa81092d04423532e0e9d04f8ea90ca703be0b
parent1a39e24d23c4499d01457f16dd10a2950339457c (diff)
downloadpkgsrc-c4bab7da1ec7bec148c24643950136c8a2255974.tar.gz
Fixed warning for using github.com in MASTER_SITES.
-rw-r--r--pkgtools/pkglint/TODO4
-rw-r--r--pkgtools/pkglint/files/pkglint.pl9
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;
}
}