diff options
| -rw-r--r-- | TODO | 1 | ||||
| -rwxr-xr-x | sbolint | 10 | 
2 files changed, 6 insertions, 5 deletions
| @@ -1,3 +1,4 @@ +TODO: fix format strings in warning messages *properly*.  TODO: locale issues break the 'grep -P' in the info check. two        things: (1) use a more reliable way to detect gz files, and        (2) possibly force LANG and LC_* to "C". Or else en_US.UTF-8. @@ -516,7 +516,7 @@ sub dequote {  sub logmsg {  	my $severity = shift;  	my $format = shift; -	print("$buildname: $severity: $format\n", @_); +	printf("$buildname: $severity: $format\n", @_);  }  sub log_error { @@ -1057,7 +1057,7 @@ sub check_info {  	}  	if(!check_url($info{HOMEPAGE})) { -		log_error("$file: HOMEPAGE=\"$info{HOMEPAGE}\" doesn't look like a valid URL (http, https, or ftp)"); +		log_error("$file: HOMEPAGE=\"%s\" doesn't look like a valid URL (http, https, or ftp)", $info{HOMEPAGE});  	}  	# use a HEAD request for homepage, even if downloading other files @@ -1099,7 +1099,7 @@ sub check_dl_and_md5 {  	for my $u (@dlurls) {  		if(!check_url($u)) { -			log_error("$file: $dlkey URL '$u' doesn't look like a valid URL (http, https, or ftp)"); +			log_error("%s: %s URL \"%s\" doesn't look like a valid URL (http, https, or ftp)", $file, $dlkey, $u);  			next;  		} @@ -1108,7 +1108,7 @@ sub check_dl_and_md5 {  		if($url_head) {  			curl_head_request($file, $u) || do {  				#warn '$u is '. $u; -				log_warning("$file: $dlkey URL '$u' broken?"); +				log_warning("%s: %s URL \"%s\" broken?", $file, $dlkey, $u);  			};  		} elsif($url_download) {  			warn "$SELF: -d option not yet implemented\n"; @@ -1149,7 +1149,7 @@ sub curl_head_request {  		if(/^content-disposition:\s+attachment;\s+filename=["']?(.*?)["']?$/i) {  			#warn $1;  			if(defined($client_filename) && ($client_filename ne $1)) { -				log_warning("$file: download filename varies based on content disposition: '$1' vs. '$client_filename'"); +				log_warning("%s: download filename varies based on content disposition: '%s' vs. '%s'", $file, $1, $client_filename);  			}  		}  	} | 
