Merge branch 'master' into next

Conflicts:
	lfs/netsnmpd
This commit is contained in:
Arne Fitzenreiter
2015-05-31 20:08:58 +02:00
23 changed files with 156 additions and 136 deletions

View File

@@ -40,9 +40,6 @@ 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
echo "Name: linux-pae" > /opt/pakfire/db/meta/meta-linux-pae
echo "ProgVersion: 0" >> /opt/pakfire/db/meta/meta-linux-pae
echo "Release: 0" >> /opt/pakfire/db/meta/meta-linux-pae
fi
fi

View File

@@ -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;
}

View File

@@ -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") {

View File

@@ -22,6 +22,7 @@
############################################################################
#
. /opt/pakfire/lib/functions.sh
extract_backup_include
stop_service ${NAME}
make_backup ${NAME}
remove_files

View File

@@ -55,29 +55,24 @@ depmod -a $KVER-ipfire-pae
#
/usr/bin/dracut --force --xz /boot/initramfs-$KVER-ipfire-pae.img $KVER-ipfire-pae
ROOT="$(find_partition "/")"
case $ROOT in
xvd* )
#
# We are on XEN so create new grub.conf / menu.lst for pygrub
#
echo "timeout 10" > /boot/grub/grub.conf
echo "default 0" >> /boot/grub/grub.conf
echo "title IPFire (pae-kernel)" >> /boot/grub/grub.conf
echo " kernel /vmlinuz-$KVER-ipfire-pae root=/dev/$ROOT rootdelay=10 panic=10 console=hvc0" \
>> /boot/grub/grub.conf
echo " initrd /initramfs-$KVER-ipfire-pae.img" >> /boot/grub/grub.conf
echo "# savedefault 0" >> /boot/grub/grub.conf
ln -s grub.conf $MNThdd/boot/grub/menu.lst
;;
* )
#
# Update grub2 config
#
grub-mkconfig > /boot/grub/grub.cfg
;;
esac
if [ -e /boot/grub/grub.cfg ]; then
#
# Update grub2 config
#
grub-mkconfig > /boot/grub/grub.cfg
else
#
# xen pv with pygrub need grub.conf / menu.lst
#
echo "timeout 10" > /boot/grub/grub.conf
echo "default 0" >> /boot/grub/grub.conf
echo "title IPFire (pae-kernel)" >> /boot/grub/grub.conf
echo " kernel /vmlinuz-$KVER-ipfire-pae root=/dev/$ROOT rootdelay=10 panic=10 console=hvc0" \
>> /boot/grub/grub.conf
echo " initrd /initramfs-$KVER-ipfire-pae.img" >> /boot/grub/grub.conf
echo "# savedefault 0" >> /boot/grub/grub.conf
ln -s grub.conf $MNThdd/boot/grub/menu.lst
fi
# request a reboot if pae is supported
if [ ! "$(grep "^flags.* pae " /proc/cpuinfo)" == "" ]; then

View File

@@ -22,6 +22,7 @@
############################################################################
#
. /opt/pakfire/lib/functions.sh
extract_backup_includes
stop_service ${NAME}
make_backup ${NAME}
remove_files