Update of /cvsroot/fink/fink/perlmod/Fink In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26775
Modified Files: Tag: branch_0_24 ChangeLog Engine.pm PkgVersion.pm Validation.pm Log Message: Backport lots of bug-fixes from HEAD: * Engine.pm: Cleaner SIGINT handler Remove cruft from fink list section and maintainer searches Fixed params_matching parameters in dumpinfo Cleaner -fallversions loop in dumpinfo * PkgVersion.pm: Set group of %b and %d Improved buildlock-removal failure messages Don't pass MAKEFLAGS env var * Validation.pm: Improved scrollkeeper warning msg Index: PkgVersion.pm =================================================================== RCS file: /cvsroot/fink/fink/perlmod/Fink/PkgVersion.pm,v retrieving revision 1.362.2.23 retrieving revision 1.362.2.24 diff -u -d -r1.362.2.23 -r1.362.2.24 --- PkgVersion.pm 14 Jul 2005 06:41:18 -0000 1.362.2.23 +++ PkgVersion.pm 14 Jul 2005 06:53:56 -0000 1.362.2.24 @@ -131,9 +131,9 @@ } else { # for dummy descriptions generated from dpkg status data alone $self->{_patchpath} = ""; - $self->{_section} = "unknown"; - $self->{_debpath} = ""; - $self->{_debpaths} = []; + $self->{_section} = "unknown"; + $self->{_debpath} = ""; + $self->{_debpaths} = []; # assume "binary" tree $self->{_tree} = "binary"; @@ -605,9 +605,9 @@ } # copy version information - $properties->{'version'} = $self->{_version}; + $properties->{'version'} = $self->{_version}; $properties->{'revision'} = $self->{_revision}; - $properties->{'epoch'} = $self->{_epoch}; + $properties->{'epoch'} = $self->{_epoch}; # link the splitoff to its "parent" (=us) $properties->{parent} = $self; @@ -1190,6 +1190,7 @@ } } + # not found return undef; } @@ -1837,8 +1838,11 @@ mkdir_p $destdir or die "can't create directory $destdir\n"; if (Fink::Config::get_option("build_as_nobody")) { - chowname 'nobody', $destdir or - die "can't chown 'nobody' $destdir\n"; + chowname 'nobody:nobody', $destdir or + die "can't chown 'nobody:nobody' $destdir\n"; + } else { + chowname ':admin', $destdir or + die "can't grp 'admin' $destdir\n"; } return; } @@ -1960,8 +1964,11 @@ mkdir_p $destdir or die "can't create directory $destdir\n"; if (Fink::Config::get_option("build_as_nobody")) { - chowname 'nobody', $destdir or - die "can't chown 'nobody' $destdir\n"; + chowname 'nobody:nobody', $destdir or + die "can't chown 'nobody:nobody' $destdir\n"; + } else { + chowname ':admin', $destdir or + die "can't chgrp 'admin' $destdir\n"; } } @@ -2072,7 +2079,7 @@ sub phase_compile { my $self = shift; my ($dir, $compile_script, $cmd); - + # Fix repair permissions bug on Tiger Fink::Services::fix_gcc_repairperms(); @@ -2150,9 +2157,11 @@ $install_script .= "/bin/mkdir -p \%i\n"; unless ($self->{_bootstrap}) { $install_script .= "/bin/mkdir -p \%d/DEBIAN\n"; - } - if (Fink::Config::get_option("build_as_nobody")) { - $install_script .= "/usr/sbin/chown -R nobody \%d\n"; + if (Fink::Config::get_option("build_as_nobody")) { + $install_script .= "/usr/sbin/chown -R nobody:nobody \%d\n"; + } else { + $install_script .= "/usr/sbin/chown -R root:admin \%d\n"; + } } # Run the script part we have so far $self->run_script($install_script, "installing", 0, 0); @@ -2358,7 +2367,7 @@ # switch everything back to root ownership if we were --build-as-nobody if (Fink::Config::get_option("build_as_nobody")) { print "Reverting ownership of install dir to root\n"; - if (&execute("chown -R root '$destdir'") == 1) { + if (&execute("chown -R -h root:admin '$destdir'") == 1) { my $error = "Could not revert ownership of install directory to root."; $notifier->notify(event => 'finkPackageBuildFailed', description => $error); die $error . "\n"; @@ -3154,11 +3163,16 @@ my $old_lock = `dpkg-query -W $lockpkg 2>/dev/null`; chomp $old_lock; - if ($old_lock ne "$lockpkg\t$timestamp") { + if ($old_lock eq "$lockpkg\t") { + &print_breaking("WARNING: The lock was removed by some other process."); + } elsif ($old_lock eq '') { + # this is weird, man...qpkg-query crashed or lock never got installed + &print_breaking("WARNING: Could not read lock timestamp. Not removing it."); + } elsif ($old_lock ne "$lockpkg\t$timestamp") { # don't trample some other timestamp's lock - &print_breaking("WARNING: The lock has a different timestamp. Not ". - " removing it, as it likely belongs to a different ". - "fink process. This should not ever happen."); + &print_breaking("WARNING: The lock has a different timestamp than the ". + "one we set. Not removing it, as it likely belongs to ". + "a different fink process."); } else { if (&execute(dpkg_lockwait() . " -r $lockpkg")) { &print_breaking("WARNING: Can't remove package ". @@ -3281,7 +3295,7 @@ # start with a clean the environment # uncomment this to be able to use distcc -- not officially supported! - $defaults{'MAKEFLAGS'} = $ENV{'MAKEFLAGS'} if (exists $ENV{'MAKEFLAGS'}); + #$defaults{'MAKEFLAGS'} = $ENV{'MAKEFLAGS'} if (exists $ENV{'MAKEFLAGS'}); %script_env = ("HOME" => $ENV{"HOME"}); # add system path @@ -3361,7 +3375,7 @@ $script_env{'CXX'} = 'g++-3.3'; } } - + # Enforce g++-3.3 or g++-4.0 even for uncooperative packages, by making # it the first g++ in the path unless ($self->has_param('NoSetPATH')) { Index: Engine.pm =================================================================== RCS file: /cvsroot/fink/fink/perlmod/Fink/Engine.pm,v retrieving revision 1.242.2.6 retrieving revision 1.242.2.7 diff -u -d -r1.242.2.6 -r1.242.2.7 --- Engine.pm 14 Jul 2005 03:01:32 -0000 1.242.2.6 +++ Engine.pm 14 Jul 2005 06:53:55 -0000 1.242.2.7 @@ -238,9 +238,11 @@ if ($pkgflag) { Fink::Package->require_packages(); } - $::SIG{INT} = sub { die "User interrupt.\n" }; - eval { &$proc(@args); }; - $::SIG{INT} = 'DEFAULT'; + { + local $SIG{'INT'} = sub { die "User interrupt.\n" }; + eval { &$proc(@args); }; + } + my $proc_rc = { '$@' => $@, '$?' => $? }; # save for later Fink::PkgVersion->clear_buildlock(); # always clean up @@ -491,14 +493,12 @@ } if (defined $section) { next unless $vo->get_section($vo) =~ /\Q$section\E/i; - $section =~ s/[\=]?(.*)/$1/; } if (defined $maintainer) { next unless ( $vo->has_param("maintainer") && $vo->param("maintainer") =~ /\Q$maintainer\E/i ); } if (defined $pkgtree) { next unless $vo->get_tree($vo) =~ /\b\Q$pkgtree\E\b/i; -# $pkgtree =~ s/[\=]?(.*)/$1/; # not sure if needed... } if ($cmd eq "apropos") { next unless ( $vo->has_param("Description") && $vo->param("Description") =~ /\Q$pattern\E/i ) || $vo->get_name() =~ /\Q$pattern\E/i; @@ -2123,8 +2123,8 @@ updatelibtool updatelibtoolindirs updatepomakefile patch patchscript /, - $pkg->params_matching(/^set/), - $pkg->params_matching(/^noset/), + $pkg->params_matching("^set"), + $pkg->params_matching("^noset"), qw/ env configureparams gcc compilescript noperltests @@ -2169,11 +2169,12 @@ my $package = Fink::Package->package_by_name($pkgname); my $lversion = &latest_version($package->list_versions()); print "$_:\n"; - foreach (&sort_versions($package->list_versions())) { + foreach my $vers (&sort_versions($package->list_versions())) { + my $pv = $package->get_version($vers); printf " %1s%1s\t%s\n", - ( $package->get_version($_)->is_present() or $config->binary_requested() && $package->get_version($_)->is_aptgetable() ) ? "b" : "", - $package->get_version($_)->is_installed() ? "i" : "", - $_; + ( $pv->is_present() or $config->binary_requested() && $pv->is_aptgetable() ) ? "b" : "", + $pv->is_installed() ? "i" : "", + $vers; } } elsif ($_ eq 'description') { printf "%s: %s\n", $_, $pkg->get_shortdescription; Index: Validation.pm =================================================================== RCS file: /cvsroot/fink/fink/perlmod/Fink/Validation.pm,v retrieving revision 1.170.2.2 retrieving revision 1.170.2.3 diff -u -d -r1.170.2.2 -r1.170.2.3 --- Validation.pm 14 Jul 2005 03:01:34 -0000 1.170.2.2 +++ Validation.pm 14 Jul 2005 06:53:56 -0000 1.170.2.3 @@ -974,7 +974,7 @@ foreach (qw/ postinst postrm /) { next if $_ eq "postrm" && $deb_control->{package} eq "scrollkeeper"; # circular dep if (not grep { /^\s*scrollkeeper-update/ } @{$deb_control->{$_}}) { - print "Warning: scrollkeeper source file found, but scrollkeeper-update not called\nin $_. See scrollkeeper package docs for information. Offending file:\n $filename\n"; + print "Warning: scrollkeeper source file found, but scrollkeeper-update not called\nin $_. See scrollkeeper package docs, starting with 'fink info scrollkeeper', for information. Offending file:\n $filename\n"; $looks_good = 0; } } @@ -1014,7 +1014,7 @@ close(DAEMONIC_FILE) or die "Error on close: ", $?>>8, " $!\n"; } elsif ( $filename =~ /^$basepath\/var\/scrollkeeper/ ) { if (not $scrollkeeper_misuse_warned++) { - print "Warning: Found $basepath/var/scrollkeeper, which usually results from calling\nscrollkeeper-update during CompileScript or InstallScript. See the\nscrollkeeper package docs for information on the correct use of that utility.\n"; + print "Warning: Found $basepath/var/scrollkeeper, which usually results from calling\nscrollkeeper-update during CompileScript or InstallScript. See the\nscrollkeeper package docs, starting with 'fink info scrollkeeper', for information on the correct use of that utility.\n"; $looks_good = 0; } } @@ -1071,7 +1071,7 @@ # scrollkeeper-update should be called from PostInstScript and PostRmScript foreach (qw/ preinst prerm /) { if (grep { /^\s*scrollkeeper-update/ } @{$deb_control->{$_}}) { - print "Warning: scrollkeeper-update in $_ is a no-op\nSee scrollkeeper package docs for information.\n"; + print "Warning: scrollkeeper-update in $_ is a no-op\nSee scrollkeeper package docs, starting with 'fink info scrollkeeper', for information.\n"; $looks_good = 0; } } Index: ChangeLog =================================================================== RCS file: /cvsroot/fink/fink/perlmod/Fink/ChangeLog,v retrieving revision 1.873.2.49 retrieving revision 1.873.2.50 diff -u -d -r1.873.2.49 -r1.873.2.50 --- ChangeLog 13 Jul 2005 19:15:20 -0000 1.873.2.49 +++ ChangeLog 14 Jul 2005 06:53:53 -0000 1.873.2.50 @@ -1,3 +1,12 @@ +2005-07-14 Daniel Macks <[EMAIL PROTECTED]> + + * Engine.pm: Backports: Cleaner SIGINT handler. Remove cruft from + fink list section and maintainer searches. Fixed params_matching + parameters in dumpinfo. Cleaner -fallversions loop in dumpinfo. + * PkgVersion.pm: Backports: Set group of %b and %d. Improved + buildlock-removal failure messages. Don't pass MAKEFLAGS env var. + * Validation.pm: Backports: Improved scrollkeeper warning msg. + 2005-07-13 Dave Vasilevsky <[EMAIL PROTECTED]> * Bootstrap.pm: Support 10.4.2. ------------------------------------------------------- This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar _______________________________________________ Fink-commits mailing list Fink-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-commits