Update of /cvsroot/fink/fink/perlmod/Fink In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13060/fink-branch_0_24/perlmod/Fink
Modified Files: Tag: branch_0_24 ChangeLog Package.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.152.2.9 retrieving revision 1.152.2.10 diff -u -d -r1.152.2.9 -r1.152.2.10 --- Services.pm 12 Jan 2006 22:22:40 -0000 1.152.2.9 +++ Services.pm 1 Feb 2006 04:56:46 -0000 1.152.2.10 @@ -1079,6 +1079,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: Package.pm =================================================================== RCS file: /cvsroot/fink/fink/perlmod/Fink/Package.pm,v retrieving revision 1.92.2.5 retrieving revision 1.92.2.6 diff -u -d -r1.92.2.5 -r1.92.2.6 --- Package.pm 13 Jan 2006 03:25:00 -0000 1.92.2.5 +++ Package.pm 1 Feb 2006 04:56:45 -0000 1.92.2.6 @@ -696,7 +696,8 @@ if (my $pkg_arch = $properties->{architecture}) { $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.170.2.11 retrieving revision 1.170.2.12 diff -u -d -r1.170.2.11 -r1.170.2.12 --- Validation.pm 23 Jan 2006 23:14:11 -0000 1.170.2.11 +++ Validation.pm 1 Feb 2006 04:56:46 -0000 1.170.2.12 @@ -488,7 +488,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.873.2.81 retrieving revision 1.873.2.82 diff -u -d -r1.873.2.81 -r1.873.2.82 --- ChangeLog 24 Jan 2006 16:44:46 -0000 1.873.2.81 +++ ChangeLog 1 Feb 2006 04:56:43 -0000 1.873.2.82 @@ -1,3 +1,8 @@ +2006-01-31 Daniel Macks <[EMAIL PROTECTED]> + + * Package.pm, Validation.pm: Consider .info Architecture field + case-insensitively. + 2006-01-24 Daniel Macks <[EMAIL PROTECTED]> * SelfUpdate.pm: Backport SelfUpdateCVSTrees (fink.conf) ------------------------------------------------------- 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