This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree".
The branch, core90 has been updated via e35d81be8c6ddb797e329ad1ad3288267ba23d05 (commit) via be131623add2c819e6433e8d593ddcfc5c5b0441 (commit) via 1af34aa810cc86fb182635cca0bb6ac783ab584d (commit) via 9f1f68f17ade67dbd52a58837f7a47a8458055e4 (commit) from b47472c1865f1777251a43376286ce884b8a4ba8 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit e35d81be8c6ddb797e329ad1ad3288267ba23d05 Author: Arne Fitzenreiter arne_f@ipfire.org Date: Sat May 16 13:03:34 2015 +0200
core90: don't remove meta-linux-pae.
commit be131623add2c819e6433e8d593ddcfc5c5b0441 Author: Arne Fitzenreiter arne_f@ipfire.org Date: Sat May 16 13:02:42 2015 +0200
core90: add updated pakfire file to update.
commit 1af34aa810cc86fb182635cca0bb6ac783ab584d Author: Arne Fitzenreiter arne_f@ipfire.org Date: Sat May 16 13:00:12 2015 +0200
pakfire: skip corrupt "meta-" file.
This was created by a bug in dep resolve at upgrade.
commit 9f1f68f17ade67dbd52a58837f7a47a8458055e4 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat May 16 12:57:28 2015 +0200
pakfire: fix dep resolve at upgrade.
-----------------------------------------------------------------------
Summary of changes: config/rootfiles/core/90/filelists/files | 2 ++ config/rootfiles/core/90/update.sh | 2 +- src/pakfire/lib/functions.pl | 24 +++++++++++++++++++++-- src/pakfire/pakfire | 33 ++++++++++++++++++-------------- 4 files changed, 44 insertions(+), 17 deletions(-)
Difference in files: diff --git a/config/rootfiles/core/90/filelists/files b/config/rootfiles/core/90/filelists/files index 431dcd6..ee596a0 100644 --- a/config/rootfiles/core/90/filelists/files +++ b/config/rootfiles/core/90/filelists/files @@ -5,6 +5,8 @@ etc/rc.d/init.d/network-trigger etc/rc.d/init.d/networking/functions.network etc/rc.d/init.d/networking/red.up/99-geoip-database etc/rc.d/rcsysinit.d/S90network-trigger +opt/pakfire/pakfire +opt/pakfire/lib/functions.pl srv/web/ipfire/cgi-bin/country.cgi srv/web/ipfire/cgi-bin/ddns.cgi srv/web/ipfire/cgi-bin/firewall.cgi diff --git a/config/rootfiles/core/90/update.sh b/config/rootfiles/core/90/update.sh index e57bc17..facefc8 100644 --- a/config/rootfiles/core/90/update.sh +++ b/config/rootfiles/core/90/update.sh @@ -265,7 +265,7 @@ if [ ! "$(grep "^flags.* pae " /proc/cpuinfo)" == "" ]; then echo "Name: linux-pae" > /opt/pakfire/db/installed/meta-linux-pae echo "ProgVersion: 0" >> /opt/pakfire/db/installed/meta-linux-pae echo "Release: 0" >> /opt/pakfire/db/installed/meta-linux-pae - rm -f /opt/pakfire/db/meta/meta-linux-pae 2>&1 > /dev/null +# rm -f /opt/pakfire/db/meta/meta-linux-pae 2>&1 > /dev/null fi fi
diff --git a/src/pakfire/lib/functions.pl b/src/pakfire/lib/functions.pl index d14e031..6bf85af 100644 --- a/src/pakfire/lib/functions.pl +++ b/src/pakfire/lib/functions.pl @@ -2,7 +2,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007 Michael Tremer & Christian Schmidt # +# Copyright (C) 2007-2015 IPFire Team info@ipfire.org # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -393,6 +393,7 @@ sub dbgetlist { foreach $file (@files) { next if ( $file eq "." ); next if ( $file eq ".." ); + next if ( $file eq "meta-" ); next if ( $file =~ /^old/ ); open(FILE, "<$Conf::dbdir/meta/$file"); @meta = <FILE>; @@ -589,6 +590,25 @@ sub resolvedeps { return @all; }
+sub resolvedeps_recursive { + my @packages = shift; + my @result = (); + + foreach my $pkg (@packages) { + my @deps = &Pakfire::resolvedeps($pkg); + + foreach my $dep (@deps) { + push(@result, $dep); + } + } + + # Sort the result array and remove dupes + my %sort = map{ $_, 1 } @result; + @result = keys %sort; + + return @result; +} + sub cleanup { my $dir = shift; my $path; @@ -695,7 +715,7 @@ sub getpak { } unless ($file) { - message("No filename given in meta-file. Please phone the developers."); + message("No filename given in meta-file."); exit 1; } diff --git a/src/pakfire/pakfire b/src/pakfire/pakfire index 3d0270a..8bca061 100644 --- a/src/pakfire/pakfire +++ b/src/pakfire/pakfire @@ -2,7 +2,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007 Michael Tremer & Christian Schmidt # +# Copyright (C) 2007-2015 IPFire Team info@ipfire.org # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -255,14 +255,11 @@ } elsif ("$ARGV[0]" eq "upgrade") { &Pakfire::upgradecore(); my @upgradepaks = &Pakfire::dblist("upgrade", "noweb"); - my @temp, $pak; - - foreach (@upgradepaks) { - @temp = &Pakfire::resolvedeps("$_"); - foreach (@temp) { push(@upgradepaks,$_) if $_; } - } - + if (@upgradepaks) { + # Resolve the dependencies of the to be upgraded packages + my @deps = &Pakfire::resolvedeps_recursive(@upgradepaks); + &Pakfire::message(""); &Pakfire::message("PAKFIRE UPGR: We are going to install all packages listed above."); if ($interactive) { @@ -277,16 +274,24 @@ } } - ### Download first + # Download packages foreach $pak (@upgradepaks) { - #system("mv $Conf::dbdir/meta/meta-$pak $Conf::dbdir/meta/old-meta-$pak"); &Pakfire::getpak("$pak", ""); } - + + # Download dependencies + foreach $pak (@deps) { + &Pakfire::getpak("$pak", ""); + } + + # Install dependencies first + foreach $pak (@deps) { + &Pakfire::setuppak("$pak"); + } + + # Install all upgrades foreach $pak (@upgradepaks) { - if (&Pakfire::upgradepak("$pak")) { - #system("mv $Conf::dbdir/meta/old-meta-$pak $Conf::dbdir/meta/meta-$pak"); - } + &Pakfire::upgradepak("$pak"); } } elsif ("$ARGV[0]" eq "list") {
hooks/post-receive -- IPFire 2.x development tree