Update of /cvsroot/fink/fink/perlmod/Fink In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv5655/perlmod/Fink
Modified Files: Tag: branch_0_29 ChangeLog Configure.pm PkgVersion.pm Log Message: backport two bugfixes: protection against accidental relative builddir path, trailing slash in ConfigureParams in -m mode Index: PkgVersion.pm =================================================================== RCS file: /cvsroot/fink/fink/perlmod/Fink/PkgVersion.pm,v retrieving revision 1.622.2.12 retrieving revision 1.622.2.13 diff -u -d -r1.622.2.12 -r1.622.2.13 --- PkgVersion.pm 12 Sep 2010 08:26:18 -0000 1.622.2.12 +++ PkgVersion.pm 12 Sep 2010 08:32:06 -0000 1.622.2.13 @@ -1013,6 +1013,10 @@ } else { # grab first word # should canibalize parse_line, optimize this specific use + # BUG: trailing backslash (last line of a + # multiline field being fed to a shell command, + # e.g., ConfigureParams) breaks parse_line. See: + # https://rt.cpan.org/Ticket/Display.html?id=61103 $chunk = (&parse_line('\s+', 1, $string))[0]; $string =~ s/^\Q$chunk//; # already dealt with this now } @@ -1171,9 +1175,9 @@ $orig_val .= ", " if $orig_val; $self->set_param($orig_field, "$orig_val$val"); } elsif($key =~ /^TestConfigureParams$/i) { - $self->set_param('ConfigureParams', - $self->param_default('ConfigureParams', "") . - " $val"); + my $main_cp = $self->param_default('ConfigureParams', ""); + chomp $main_cp; + $self->set_param('ConfigureParams', "$main_cp $val"); $self->prepare_percent_c; } elsif($key =~ /^Test(Source|Tar)(\d*)(ExtractDir|FilesRename|Rename|-MD5|-Checksum)?$/i) { my($test_field_type, $test_no, $test_field) = ($1, $2, $3); Index: Configure.pm =================================================================== RCS file: /cvsroot/fink/fink/perlmod/Fink/Configure.pm,v retrieving revision 1.58.2.5 retrieving revision 1.58.2.6 diff -u -d -r1.58.2.5 -r1.58.2.6 --- Configure.pm 16 May 2010 06:43:16 -0000 1.58.2.5 +++ Configure.pm 12 Sep 2010 08:32:06 -0000 1.58.2.6 @@ -133,7 +133,7 @@ =cut sub choose_misc { - my ($otherdir, $builddir, $verbose); + my ($otherdir, $verbose); my ($proxy_prompt, $proxy, $passive_ftp, $same_for_ftp, $binary_dist); # normal configuration @@ -146,12 +146,19 @@ } print "\n"; - $builddir = - &prompt("Which directory should Fink use to build packages? \(If you don't ". - "know what this means, it is safe to leave it at its default.\)", - default => $config->param_default("Buildpath", "")); - if ($builddir =~ /\S/) { - $config->set_param("Buildpath", $builddir); + { + my $builddir_default=$config->param_default("Buildpath", ""); + my $builddir = + &prompt("Which directory should Fink use to build packages? \(If you don't ". + "know what this means, it is safe to leave it at its default.\)", + default => $builddir_default); + while ($builddir =~ /^[^\/]/) { + $builddir = &prompt("That does not look like a complete (absolute) pathname. Please try again", + default => $builddir_default); + } + if ($builddir =~ /\S/) { + $config->set_param("Buildpath", $builddir); + } } &spotlight_warning(); Index: ChangeLog =================================================================== RCS file: /cvsroot/fink/fink/perlmod/Fink/ChangeLog,v retrieving revision 1.1592.2.44 retrieving revision 1.1592.2.45 diff -u -d -r1.1592.2.44 -r1.1592.2.45 --- ChangeLog 12 Sep 2010 08:26:18 -0000 1.1592.2.44 +++ ChangeLog 12 Sep 2010 08:32:06 -0000 1.1592.2.45 @@ -1,5 +1,11 @@ 2010-09-12 Daniel Macks <dma...@netspace.org> + * Configure.pm: Make sure Buildpath is absolute + * PkgConfig.pm: Remove trailing newline ConfigureParams before + appending TestConfigureParams to it (avoid embedded newline) + +2010-09-12 Daniel Macks <dma...@netspace.org> + * Engine.pm,Package.pm,PkgVersion.pm: backport get_all_providers changes from HEAD (fix for many "node exists" engine crashes) ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ Fink-commits mailing list Fink-commits@lists.sourceforge.net http://news.gmane.org/gmane.os.apple.fink.cvs