From patchwork Sun May 8 12:09:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Leo-Andres Hofmann X-Patchwork-Id: 5594 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4Kx3602WlCz3x1v for ; Sun, 8 May 2022 12:10:16 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4Kx35v22tLz5n2; Sun, 8 May 2022 12:10:11 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4Kx35t5Tn8z302h; Sun, 8 May 2022 12:10:10 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4Kx35s6sBSz2xZP for ; Sun, 8 May 2022 12:10:09 +0000 (UTC) Received: from arche.uberspace.de (arche.uberspace.de [185.26.156.147]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPS id 4Kx35m5r4mz2gW for ; Sun, 8 May 2022 12:10:04 +0000 (UTC) Received: (qmail 30312 invoked by uid 990); 8 May 2022 12:10:02 -0000 From: Leo-Andres Hofmann To: development@lists.ipfire.org Subject: [PATCH 2/7] pakfire.cgi: Fix indentation Date: Sun, 8 May 2022 14:09:47 +0200 Message-Id: <20220508120952.52-2-hofmann@leo-andres.de> X-Mailer: git-send-email 2.27.0.windows.1 In-Reply-To: <20220508120952.52-1-hofmann@leo-andres.de> References: <20220508120952.52-1-hofmann@leo-andres.de> MIME-Version: 1.0 X-Rspamd-Bar: - X-Rspamd-Report: R_MISSING_CHARSET(0.5) MID_CONTAINS_FROM(1) MIME_HTML_ONLY(0.2) BAYES_HAM(-3) X-Rspamd-Score: -1.3 Received: from unknown (HELO unkown) (::1) by arche.uberspace.de (Haraka/2.8.28) with ESMTPSA; Sun, 08 May 2022 14:10:02 +0200 ARC-Seal: i=1; s=202003rsa; d=lists.ipfire.org; t=1652011804; a=rsa-sha256; cv=none; b=kptNw2hOq3SVEqJbphZof4SIjWGRpNodbqkibyBYHbRGcFM3Bf+I+YuzMgKbp8uNre9ndB mqZ7XVRo3mQ8OrjHFhLPTm8kTrDvVsIuY3xQXJRcIKfiQZOBI4lsinpGTCvgT97QfOemZ5 qbLuLy4ywlzx+2uUzhoVLwXx3wPFdxJSZCEuIcJPJfmn2gkqJ+1KwINGYbGIwVN/GTF1by nzZBagiMQMI2a9Cf1dAQ0rIF3Rov7hjf7pmDS6ebkrXkW0YeJQZq1EodOoD9XDoftGwHDG aDRkTk3WW/iZ8rbSLS1SFok/UEX4sV/ONSbKhfI0YoabUnojv54kAjlZHb0k4w== ARC-Authentication-Results: i=1; mail01.ipfire.org; dkim=none; spf=pass (mail01.ipfire.org: domain of hofmann@leo-andres.de designates 185.26.156.147 as permitted sender) smtp.mailfrom=hofmann@leo-andres.de; dmarc=pass (policy=quarantine) header.from=leo-andres.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.ipfire.org; s=202003rsa; t=1652011804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2GmuPaCISIDwKJr1GayhCFTtxiT970DfFhwpx6D38PA=; b=tlHWVILEspJZELh/o5OaGzz8A5SjUmkLikVR5S+1qA2tl8EfqqI+X57Tp6k+ZRnNMel1L3 +hua9Q9GF++kXTxZAJ9Ya5BwWTjGRtiyx2Sdfej3YFaJCz7pKcn2t7v6P96xBScZQvP3d0 CfleeHt20+yV6kh089b+Pad5EWjMDLD8BMUi0r2orIxYaxPKyk66Z513PnADknHzxXLtX8 CX6/aqQ2gyZxciI0KR4Pvoz2RJfw0q4asDaq8B6Urs8RnsLBJpS6OOOzbbNbqoDNNFokGs oc0SCjKogRRJenix7WJSPXFRLBAEImygLKNwseNDCCiloGzelp+YHIrTEiaBEg== X-Rspamd-Queue-Id: 4Kx35m5r4mz2gW X-Rspamd-Server: mail01.haj.ipfire.org X-Spamd-Result: default: False [-3.28 / 11.00]; BAYES_HAM(-3.00)[99.98%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM(-1.00)[-1.000]; SPF_REPUTATION_HAM(-0.77)[-0.77342682734463]; DMARC_POLICY_ALLOW(-0.50)[leo-andres.de,quarantine]; R_MISSING_CHARSET(0.50)[]; MX_INVALID(0.50)[]; R_SPF_ALLOW(-0.20)[+mx:c]; MIME_HTML_ONLY(0.20)[]; IP_REPUTATION_HAM(-0.01)[asn: 205766(0.00), country: DE(-0.01), ip: 185.26.156.147(0.00)]; RCVD_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:~]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:205766, ipnet:185.26.156.0/24, country:DE]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[185.26.156.147:from]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_SIGNED(0.00)[lists.ipfire.org:s=202003rsa:i=1]; ARC_NA(0.00)[] Authentication-Results: mail01.ipfire.org; dkim=none; spf=pass (mail01.ipfire.org: domain of hofmann@leo-andres.de designates 185.26.156.147 as permitted sender) smtp.mailfrom=hofmann@leo-andres.de; dmarc=pass (policy=quarantine) header.from=leo-andres.de X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Leo-Andres Hofmann Acked-by: Peter Müller --- html/cgi-bin/pakfire.cgi | 111 ++++++++++++++++++++------------------- 1 file changed, 56 insertions(+), 55 deletions(-) diff --git a/html/cgi-bin/pakfire.cgi b/html/cgi-bin/pakfire.cgi index b908ec6a0..535168547 100644 --- a/html/cgi-bin/pakfire.cgi +++ b/html/cgi-bin/pakfire.cgi @@ -214,79 +214,80 @@ END # Process Pakfire commands if (($cgiparams{'ACTION'} eq 'install') && (! &_is_pakfire_busy())) { + &Header::openbox("100%", "center", $Lang::tr{'request'}); + my @pkgs = split(/\|/, $cgiparams{'INSPAKS'}); - &Header::openbox("100%", "center", $Lang::tr{'request'}); - my @output = &General::system_output("/usr/local/bin/pakfire", "resolvedeps", "--no-colors", @pkgs); - print <$Lang::tr{'pakfire install package'} @pkgs $Lang::tr{'pakfire possible dependency'} + my @output = &General::system_output("/usr/local/bin/pakfire", "resolvedeps", "--no-colors", @pkgs); + print <$Lang::tr{'pakfire install package'} @pkgs $Lang::tr{'pakfire possible dependency'}
 END
-		foreach (@output) {
-		  $_ =~ s/\\[[0-1]\;[0-9]+m//g;
-			print "$_\n";
-		}
-		print <
 		$Lang::tr{'pakfire accept all'}
 		 
 		
- - - - -
- - -
- - -
- - - + + + + + + + +
+ + +
+ + + END - &Header::closebox(); - &Header::closebigbox(); - &Header::closepage(); - exit; + &Header::closebox(); + &Header::closebigbox(); + &Header::closepage(); + exit; } elsif (($cgiparams{'ACTION'} eq 'remove') && (! &_is_pakfire_busy())) { + &Header::openbox("100%", "center", $Lang::tr{'request'}); + my @pkgs = split(/\|/, $cgiparams{'DELPAKS'}); - &Header::openbox("100%", "center", $Lang::tr{'request'}); - my @output = &General::system_output("/usr/local/bin/pakfire", "resolvedeps", "--no-colors", @pkgs); - print <$Lang::tr{'pakfire uninstall package'} @pkgs $Lang::tr{'pakfire possible dependency'} + my @output = &General::system_output("/usr/local/bin/pakfire", "resolvedeps", "--no-colors", @pkgs); + print <$Lang::tr{'pakfire uninstall package'} @pkgs $Lang::tr{'pakfire possible dependency'}
 END
-		foreach (@output) {
-		  $_ =~ s/\\[[0-1]\;[0-9]+m//g;
-			print "$_\n";
-		}
-		print <
 		$Lang::tr{'pakfire uninstall all'}
 		 
 		
- - - - -
- - -
- - -
- - - + + + + + + + +
+ + +
+ + + END - &Header::closebox(); - &Header::closebigbox(); - &Header::closepage(); - exit; - + &Header::closebox(); + &Header::closebigbox(); + &Header::closepage(); + exit; } my %selected=();