Update of /cvsroot/fink/fink/perlmod/Fink
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21134
Modified Files:
ChangeLog Validation.pm
Log Message:
Whine if -pmXXX contains a file that will conflict among different XXX pkgs.
Index: Validation.pm
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/Validation.pm,v
retrieving revision 1.175
retrieving revision 1.176
diff -u -d -r1.175 -r1.176
--- Validation.pm 28 Feb 2005 19:05:07 -0000 1.175
+++ Validation.pm 19 Apr 2005 09:22:17 -0000 1.176
@@ -857,6 +857,7 @@
# - only gettext should should have charset.alias
# - If a package *Script uses debconf, it should Depends:debconf
# (TODO: should be in preinst not postinst, should be PreDepends not Depends)
+# - if a pkg is a -pmXXX but installs files that are not in a XXX-specific path
# - any other ideas?
#
sub validate_dpkg_file {
@@ -919,6 +920,19 @@
my @dpkg_contents = <DPKG_CONTENTS>;
close(DPKG_CONTENTS) or die "Error on close: ", $?>>8, " $!\n";
+ # -pmXXX packages must install XXX-localized paths only
+ my $perlver_re;
+ if ($deb_control->{package} =~ /-pm(\d+)$/) {
+ $perlver_re = $1;
+ if ($perlver_re =~ /^(\d)(\d)(\d)$/) {
+ # -pmXYZ is perlX.Y.Z
+ $perlver_re = "(?:$perlver_re|$1.$2.$3)";
+ } elsif ($perlver_re =~ /^(\d)(\d)(\d)(\d)$/) {
+ # -pmWXYZ is perlW.X.YZ or perlW.XY.Z
+ $perlver_re = "(?:$perlver_re|$1.$2.$3$4|$1.$2$3.$4)";
+ }
+ }
+
foreach (@dpkg_contents) {
# process
if
(/([^\s]*)\s*([^\s]*)\s*([^\s]*)\s*([^\s]*)\s*([^\s]*)\s*\.([^\s]*)/) {
@@ -1037,6 +1051,10 @@
print "Warning: The file $filename seems
misplaced.\n";
$looks_good = 0;
}
+ if (defined $perlver_re and $filename !~ /$perlver_re/
and $filename !~ /\/$/) {
+ print "Warning: File in a perl-versioned
package is neither versioned nor in a versioned directory.\n Offending file:
$filename\n";
+ $looks_good = 0;
+ }
}
}
Index: ChangeLog
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/ChangeLog,v
retrieving revision 1.935
retrieving revision 1.936
diff -u -d -r1.935 -r1.936
--- ChangeLog 17 Apr 2005 15:15:01 -0000 1.935
+++ ChangeLog 19 Apr 2005 09:22:16 -0000 1.936
@@ -1,3 +1,8 @@
+2005-04-17 Daniel Macks <[EMAIL PROTECTED]>
+
+ * Validation.pm: Whine if a perl-versioned package installs a file
+ whose path does not encode the version.
+
2005-04-16 Daniel Macks <[EMAIL PROTECTED]>
* Bootstrap.pm, PkgVersion.pm, Services.pm: Overhauled enforce_gcc
-------------------------------------------------------
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
_______________________________________________
Fink-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-commits