From: maniacikarus Date: Sun, 12 Aug 2007 08:32:30 +0000 (+0000) Subject: Pakfire Remove Funktion in der CGI aktiviert X-Git-Tag: v2.3-beta1~500 X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=commitdiff_plain;h=74693811db6303d468fa2ea823453f804b92bb03 Pakfire Remove Funktion in der CGI aktiviert Pakfire autorefresh bei install/uninstall eingebaut git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@760 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8 --- diff --git a/html/cgi-bin/pakfire.cgi b/html/cgi-bin/pakfire.cgi index 42be29b77d..a1a14c7acf 100644 --- a/html/cgi-bin/pakfire.cgi +++ b/html/cgi-bin/pakfire.cgi @@ -45,7 +45,7 @@ if ($pakfiresettings{'ACTION'} eq 'install'){ sleep(2); } else { &Header::openbox("100%", "center", "Abfrage"); - my @output = `/usr/local/bin/pakfire resolvedeps --no-colors $pakfiresettings{'INSPAKS'}`; + my @output = `/usr/local/bin/pakfire resolvedeps --no-colors $pakfiresettings{'INSPAKS'}`; print <$Lang::tr{'pakfire install package'}.$pakfiresettings{'INSPAKS'}.$Lang::tr{'pakfire possible dependency'}
		
@@ -77,6 +77,44 @@ END
 	}
 } elsif ($pakfiresettings{'ACTION'} eq 'remove') {
 
+	$pakfiresettings{'DELPAKS'} =~ s/\|/\ /g;
+	if ("$pakfiresettings{'FORCE'}" eq "on") {
+		my $command = "/usr/local/bin/pakfire remove --non-interactive --no-colors $pakfiresettings{'DELPAKS'} &>/dev/null &";
+		system("$command");
+		sleep(2);
+	} else {
+		&Header::openbox("100%", "center", "Abfrage");
+  	my @output = `/usr/local/bin/pakfire resolvedeps --no-colors $pakfiresettings{'DELPAKS'}`;
+		print <$Lang::tr{'pakfire uninstall package'}.$pakfiresettings{'DELPAKS'}.$Lang::tr{'pakfire possible dependency'}
+		
		
+END
+		foreach (@output) {
+			print "$_\n";
+		}
+		print <
+		$Lang::tr{'pakfire accept all'}
+		 
+		
+ + + + +
+ +
+ + +
+ +END + &Header::closebox(); + &Header::closebigbox(); + &Header::closepage(); + exit; + } + } elsif ($pakfiresettings{'ACTION'} eq 'update') { system("/usr/local/bin/pakfire update --force --no-colors"); @@ -113,7 +151,7 @@ if ($errormessage) { my $return = `pidof pakfire`; chomp($return); if ($return) { - &Header::openbox("100%", "center", "Aktiv"); + &Header::openbox( 'Waiting', 1, "" ); print < diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl index ba638327e2..15e562c175 100644 --- a/langs/de/cgi-bin/de.pl +++ b/langs/de/cgi-bin/de.pl @@ -1213,6 +1213,7 @@ 'pakfire installed addons' => 'Installierte Addons:', 'pakfire possible dependency' => ' Möglicherweise haben diese Pakete Abhängigkeiten, d.h. andere Pakete müssen zusätzlich installiert werden. Dazu sehen sie unten eine Liste.', 'pakfire register' => 'Registrierung am Master-Server:', +'pakfire uninstall package' => 'Sie möchten folgende Pakete deinstallieren: ', 'pakfire update daily' => 'Automatische Updates täglich ausführen:', 'pakfire updates' => 'Zur Verfügung stehende Updates:', 'pakfire working' => 'Pakfire führt gerade eine Aufgabe aus... Bitte warten sie, bis diese erfolgreich beendet wurde.', @@ -1561,6 +1562,7 @@ 'unable to alter profiles while red is active' => 'Profile können nicht geändert werden, solange ROT aktiv ist.', 'unable to contact' => 'Kann nicht erreicht werden', 'unencrypted' => 'Nichtverschlüsselt', +'uninstall' => 'Deinstallieren', 'unix group' => ' UNIX Benutzergruppe', 'unix password sync' => 'Unix Password Sync', 'unix shell' => 'UNIX Shell', diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl index c48537bcda..04e42bbfc5 100644 --- a/langs/en/cgi-bin/en.pl +++ b/langs/en/cgi-bin/en.pl @@ -1237,10 +1237,11 @@ 'pagerefresh' => 'Page is beeing refreshed, please wait.', 'pakfire accept all' => 'Do you want to install all packages?', 'pakfire configuration' => 'Pakfire Configuration', -'pakfire install package' => 'You want ti install the following packages: ', +'pakfire install package' => 'You want to install the following packages: ', 'pakfire installed addons' => 'Installed Addons:', 'pakfire possible dependency' => ' There may be depending packages, here is a list of packages that need to be installed.', 'pakfire register' => 'Register at master server:', +'pakfire uninstall package' => 'You want to uninstall the following packages: ', 'pakfire update daily' => 'Run automatic Update daily:', 'pakfire updates' => 'Available Update:', 'pakfire working' => 'Pakfire ist working ... Please wait until everything is done successfull.', @@ -1593,6 +1594,7 @@ 'unable to alter profiles while red is active' => 'Unable to alter profiles while RED is active.', 'unable to contact' => 'Unable to contact', 'unencrypted' => 'Unencrypted', +'uninstall' => 'Uninstall', 'unix group' => ' UNIX usergroup', 'unix password sync' => 'Unix Password Sync', 'unix shell' => 'UNIX Shell',