Browse Source

Don't strip variable modifiers when dereferencing.

PR:	262941
Joe Clarke 2 years ago
parent
commit
79f811c623
1 changed files with 9 additions and 1 deletions
  1. 9 1
      portlint.pl

+ 9 - 1
portlint.pl

@@ -2860,7 +2860,14 @@ DIST_SUBDIR EXTRACT_ONLY
 						my $ip = $i;
 						$ip =~ s/^$ms\///;
 						my (@ip_parts) = split(/:/, $ip);
-						my $exp_sd = get_makevar($ip_parts[0]);
+						my $check_var = $ip_parts[0];
+						shift(@ip_parts);
+						foreach my $check_part (@ip_parts) {
+							if ($check_part =~ /^[A-Z]}/) {
+								$check_var .= ":$check_part";
+							}
+						}
+						my $exp_sd = get_makevar($check_var);
 						if ($exp_sd eq $sd) {
 							&perror("WARN", $file, -1, "typically when you specify magic site $ms ".
 								"you do not need anything else as $sd is assumed");
@@ -3823,6 +3830,7 @@ sub get_makevar {
 	my($cmd, $result);
 
 	$cmd = join(' -V ', "make $makeenv MASTER_SITE_BACKUP=''", map { "'$_'" } @_);
+	print STDERR "XXX: cmd = $cmd\n";
 	$result = `$cmd`;
 	chomp $result;