View | Details | Raw Unified | Return to bug 87498
Collapse All | Expand All

(-)src/portlint.pl (-5 / +24 lines)
Lines 1188-1200 Link Here
1188
	}
1188
	}
1189
1189
1190
	#
1190
	#
1191
	# whole file: BROKEN
1191
	# whole file: BROKEN et al.
1192
	#
1192
	#
1193
	print "OK: checking BROKEN.\n" if ($verbose);
1193
	my($var);
1194
	if ($whole =~ /\nBROKEN[+?]?=[ \t][^"]+\w+/) {
1194
	foreach $var qw(BROKEN FORBIDDEN MANUAL_PACKAGE_BUILD NO_CDROM NO_PACKAGE RESTRICTED) {
1195
		print "OK: checking ${var}.\n" if ($verbose);
1196
		if ($whole =~ /\n${var}[+?]?=[ \t]?[^"]+\w+/) {
1197
			my $lineno = &linenumber($`);
1198
			&perror("WARN: $file [$lineno]: ${var} messages should be ".
1199
				"quoted.");
1200
		}
1201
	}
1202
1203
	#
1204
	# whole file: DEPRECATED
1205
	#
1206
	print "OK: checking DEPRECATED.\n" if ($verbose);
1207
	if ($whole =~ /\nDEPRECATED[+?]?=[ \t]*"/ &&
1208
	    $whole !~ /\nDEPRECATED[+?]?=[ \t]*"\$\{BROKEN\}"/) {
1209
		my $lineno = &linenumber($`);
1210
		&perror("WARN: $file [$lineno]: DEPRECATED messages should not ".
1211
			"be quoted unless they are exactly \"\${BROKEN}\".");
1212
	}
1213
	if ($whole =~ /\nDEPRECATED[+?]?=[^"]*\$\{BROKEN\}/) {
1195
		my $lineno = &linenumber($`);
1214
		my $lineno = &linenumber($`);
1196
		&perror("WARN: $file [$lineno]: BROKEN messages should be ".
1215
		&perror("WARN: $file [$lineno]: \"\${BROKEN}\" must be quoted ".
1197
			"quoted.");
1216
			"when it is the source of DEPRECATED.");
1198
	}
1217
	}
1199
1218
1200
	#
1219
	#

Return to bug 87498