Update of /cvsroot/fink/fink/perlmod/Fink In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1435
Modified Files: ChangeLog Engine.pm SelfUpdate.pm Log Message: Have SelfUpdate uses Engine's apt-get update instead of rewriting it. If UseBinDist is false, do not update apt. Index: Engine.pm =================================================================== RCS file: /cvsroot/fink/fink/perlmod/Fink/Engine.pm,v retrieving revision 1.364 retrieving revision 1.365 diff -u -d -r1.364 -r1.365 --- Engine.pm 22 Mar 2006 17:05:54 -0000 1.364 +++ Engine.pm 22 Mar 2006 20:43:27 -0000 1.365 @@ -642,25 +642,30 @@ =item aptget_update - aptget_update $quiet; + my $success = aptget_update $quiet; -Update the apt-get package database. +Update the apt-get package database. Returns boolean indicating +whether the update worked within the limits of fink's configs. =cut sub aptget_update { my $quiet = shift || 0; - return unless apt_available; + return 1 unless $config->binary_requested(); # binary-mode disabled + return 0 unless apt_available; + print "Downloading the indexes of available packages in the binary distribution.\n"; my $aptcmd = aptget_lockwait(); - if ($quiet) { + if ($config->verbosity_level == 0) { $aptcmd .= " -qq"; } elsif ($config->verbosity_level < 2) { $aptcmd .= " -q"; } - if (&execute($aptcmd . " update", quiet => 1)) { + if (&execute($aptcmd . " update", quiet => $quiet)) { print("WARNING: Failure while updating indexes.\n"); + return 0; } + return 1; } =item cmd_scanpackages Index: SelfUpdate.pm =================================================================== RCS file: /cvsroot/fink/fink/perlmod/Fink/SelfUpdate.pm,v retrieving revision 1.105 retrieving revision 1.106 diff -u -d -r1.105 -r1.106 --- SelfUpdate.pm 23 Feb 2006 07:10:22 -0000 1.105 +++ SelfUpdate.pm 22 Mar 2006 20:43:28 -0000 1.106 @@ -28,7 +28,7 @@ use Fink::CLI qw(&print_breaking &prompt &prompt_boolean &prompt_selection); use Fink::Config qw($config $basepath $dbpath $distribution); use Fink::NetAccess qw(&fetch_url); -use Fink::Engine; +use Fink::Engine qw(&aptget_update &cmd_install); use Fink::Package; use Fink::FinkVersion qw(&pkginfo_version); use Fink::Mirror; @@ -513,22 +513,9 @@ sub do_finish { my $package; - # update apt-get's database if using -b mode - if ($config->binary_requested()) { - print "Downloading the indexes of available packages in the binary distribution.\n"; - my $aptcmd = aptget_lockwait() . " "; - if ($config->verbosity_level() == 0) { - $aptcmd .= "-qq "; - } - elsif ($config->verbosity_level() < 2) { - $aptcmd .= "-q "; - } - $aptcmd .= "update"; - if (&execute($aptcmd)) { - &print_breaking("WARNING: Failure while downloading indexes. ". - "Running 'fink scanpackages' may fix this."); - } - } + # update apt-get's database + Fink::Engine::aptget_update() + or &print_breaking("Running 'fink scanpackages' may fix indexing problems."); # forget the package info Fink::Package->forget_packages(); Index: ChangeLog =================================================================== RCS file: /cvsroot/fink/fink/perlmod/Fink/ChangeLog,v retrieving revision 1.1293 retrieving revision 1.1294 diff -u -d -r1.1293 -r1.1294 --- ChangeLog 22 Mar 2006 19:50:18 -0000 1.1293 +++ ChangeLog 22 Mar 2006 20:43:27 -0000 1.1294 @@ -1,3 +1,12 @@ +2006-03-22 Daniel Macks <[EMAIL PROTECTED]> + + * Engine.pm: aptget_update now returns boolean success value, is + inhibited if user has disabled binary mode, and has apt's own + "quiet" controlled by fink's "verbose" flag. $quiet parameter now + controls execute() verbosity. + * SelfUpdate.pm: Use Engine's aptget_update instead of rewriting + it. + 2006-03-22 Dave Vasilevsky <[EMAIL PROTECTED]> * Config.pm: Don't whine if etc/apt doesn't exist. ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Fink-commits mailing list Fink-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-commits