X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=src%2Fpakfire%2Flib%2Ffunctions.pl;h=6e416f915c65667bd7b7e79e60c855892389cd0c;hb=cde0e11690bd2a6dbe3686ba0cb07530e21b837d;hp=e3162072cd4d13357d9c595437048f1521eae294;hpb=9c1c1c57eaf167237c9eb92054c2268caaded93b;p=people%2Fteissler%2Fipfire-2.x.git diff --git a/src/pakfire/lib/functions.pl b/src/pakfire/lib/functions.pl index e3162072c..6e416f915 100644 --- a/src/pakfire/lib/functions.pl +++ b/src/pakfire/lib/functions.pl @@ -204,7 +204,7 @@ sub dblist { if ("$forweb" eq "forweb") { print "\n"; } else { - print "Name: $templine[0]\nVersion: $templine[1]\nRelease: $templine[2]\n\n"; + print "Name: $templine[0]\nProgVersion: $templine[1]\nRelease: $templine[2]\n\n"; } } } @@ -335,10 +335,10 @@ sub decryptpak { my $file = getpak("$pak", "noforce"); - my $return = system("gpg -d < $Conf::cachedir/$file | tar xj -C $Conf::tmpdir/"); + my $return = system("cd $Conf::tmpdir/ && gpg -d < $Conf::cachedir/$file | cpio -i >/dev/null 2>&1"); logger("Decryption process returned the following: $return"); - if ($return != 1) { exit 1; } + if ($return != 0) { exit 1; } } sub getpak { @@ -385,6 +385,7 @@ sub setuppak { decryptpak("$pak"); my $return = system("cd $Conf::tmpdir && ./install.sh >> $Conf::logdir/install-$pak.log 2>&1"); + $return %= 255; if ($return == 0) { move("$Conf::tmpdir/ROOTFILES", "$Conf::dbdir/rootfiles/$pak"); cleanup("tmp"); @@ -499,4 +500,15 @@ sub lock { return 0; } +sub checkcryptodb { + my $myid = "64D96617"; # Our own gpg-key + my $trustid = "65D0FD58"; # Id of CaCert + my $ret = system("gpg --list-keys | grep -q $myid"); + unless ( "$ret" eq "0" ) { + message("The GnuPG isn't configured corectly. Trying now to fix this."); + system("gpg --keyserver wwwkeys.de.pgp.net --always-trust --recv-key $myid"); + system("gpg --keyserver wwwkeys.de.pgp.net --always-trust --recv-key $trustid"); + } +} + 1;