Update of /cvsroot/fink/fink/perlmod/Fink In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13060/fink-HEAD/perlmod/Fink
Modified Files: ChangeLog PkgVersion.pm Services.pm Validation.pm Log Message: Treat Architecture field values case-insensitively Index: Services.pm =================================================================== RCS file: /cvsroot/fink/fink/perlmod/Fink/Services.pm,v retrieving revision 1.196 retrieving revision 1.197 diff -u -d -r1.196 -r1.197 --- Services.pm 6 Jan 2006 07:05:52 -0000 1.196 +++ Services.pm 1 Feb 2006 04:56:42 -0000 1.197 @@ -1134,6 +1134,14 @@ Returns the architecture string to be used on this platform. For example, "powerpc" for ppc. +=for private + +Callers assume the value is all-lowercase, but some also assume it is +the canonical form. So we can't use lc() here without breaking the +latter if there are any cases of canonical forms that have upper-case +chars. If we find any, have to check our callers for incorrect +assumptions. + =cut sub get_arch { Index: PkgVersion.pm =================================================================== RCS file: /cvsroot/fink/fink/perlmod/Fink/PkgVersion.pm,v retrieving revision 1.514 retrieving revision 1.515 diff -u -d -r1.514 -r1.515 --- PkgVersion.pm 26 Jan 2006 02:58:51 -0000 1.514 +++ PkgVersion.pm 1 Feb 2006 04:56:42 -0000 1.515 @@ -327,7 +327,8 @@ if (my $pkg_arch = $properties->{architecture} and not $options{no_exclusions}) { $pkg_arch =~ s/\s+//g; my $our_arch = &get_arch; - return () unless grep { $_ eq $our_arch } split /,/, $pkg_arch; + # this assumes canonical arch strings are all-lowercase + return () unless grep { $_ eq $our_arch } split /,/, lc($pkg_arch); } my %pkg_expand; Index: Validation.pm =================================================================== RCS file: /cvsroot/fink/fink/perlmod/Fink/Validation.pm,v retrieving revision 1.215 retrieving revision 1.216 diff -u -d -r1.215 -r1.216 --- Validation.pm 23 Jan 2006 23:14:11 -0000 1.215 +++ Validation.pm 1 Feb 2006 04:56:42 -0000 1.216 @@ -511,7 +511,7 @@ if (defined $value) { $value =~ s/\s+//g; foreach (split /,/, $value) { - if (!exists $allowed_arch_values{$_}) { + if (!exists $allowed_arch_values{lc $_}) { print "Warning: Unknown value \"$_\" in Architecture field. ($filename)\n"; $looks_good = 0; } Index: ChangeLog =================================================================== RCS file: /cvsroot/fink/fink/perlmod/Fink/ChangeLog,v retrieving revision 1.1234 retrieving revision 1.1235 diff -u -d -r1.1234 -r1.1235 --- ChangeLog 26 Jan 2006 02:58:50 -0000 1.1234 +++ ChangeLog 1 Feb 2006 04:56:42 -0000 1.1235 @@ -1,3 +1,8 @@ +2006-01-31 Daniel Macks <[EMAIL PROTECTED]> + + * PkgVersion.pm, Validation.pm: Consider .info Architecture field + case-insensitively. + 2006-01-25 Daniel Macks <[EMAIL PROTECTED]> * PkgVersion.pm: Don't call _set_destdirs during object ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ Fink-commits mailing list Fink-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-commits