From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4Zyl7R3xP2z33BP for ; Thu, 15 May 2025 09:20:51 +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 (secp384r1) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R10" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4Zyl7N16fxz2yHY for ; Thu, 15 May 2025 09:20:48 +0000 (UTC) Received: from resdmta-a2p-658199.sys.comcast.net (resdmta-a2p-658199.sys.comcast.net [IPv6:2001:558:fd01:2bb4::c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPS id 4Zyl7K1mJZz2X3 for ; Thu, 15 May 2025 09:20:45 +0000 (UTC) Authentication-Results: mail01.ipfire.org; dkim=pass header.d=comcastmailservice.net header.s=20211018a header.b=OTMUlrqS; spf=none (mail01.ipfire.org: domain of stephen@firemypi.org has no SPF policy when checking 2001:558:fd01:2bb4::c) smtp.mailfrom=stephen@firemypi.org; dmarc=none ARC-Seal: i=1; s=202003rsa; d=lists.ipfire.org; t=1747300847; a=rsa-sha256; cv=none; b=LoCyit+zYzJYxFzDsrY+yZ5JjXSlO5Qf72ApGeBi7ACmebX2Ib39pK4vFcZl7zzwBT4gX7 TGgr7ckvUPf1hQk4mFWS5F+DU3uhxi+pO36qZvkefPIS70Ffw15lozDVYGkU1nqhbqHERP o4xoT4AKl/aSmHR0zfC+1avJbGLLt0+oJt3h1ZRjdReEDZXzQpsE5sA68Vqnud8onuffFA OGLgWSSzBkYzDvZcTgqEf5tsL4ca/+0+VCBBtcaAhuieMV42kdoHJs7jmqXlS6MR644Keh DE24tuC16LKsT2ZdOVv6WlZTM9jYoyWHid9XJWgw/6aZ3v1eGplnZWxxZl+VDw== ARC-Authentication-Results: i=1; mail01.ipfire.org; dkim=pass header.d=comcastmailservice.net header.s=20211018a header.b=OTMUlrqS; spf=none (mail01.ipfire.org: domain of stephen@firemypi.org has no SPF policy when checking 2001:558:fd01:2bb4::c) smtp.mailfrom=stephen@firemypi.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.ipfire.org; s=202003rsa; t=1747300847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:dkim-signature; bh=x5oGZgwuJlSHTfnuYuHbr0DQ+ND64T1i5wqKNo459Uk=; b=Bw83ejdhiFm7ehGj028+0hjQMy1VmexqysaiUuspZnu9Aae62NHsAAjXaQJVn6j4B7hcMF L994vlx5WwSllMq61lL1HD9/hDfHLc83ijrlNa0F8ErW9/EwTxh75ziAPlpf68SZ00Cw34 PG3vp9S876d/AA/4cLhATNt2U9Rl6HaUC4YTUWdYl99lYDu7sUZstN/k7dG/B/uO3yJr0V 6SWBDwQzS5ZKQiVlsdS7GROIw/4jhAkVgFzT0CU+NMZWFVCN1R9w+0gG547P1dP0oJG4ry k0S3B7weDkOOxGrMcR8JpD95iCm8Ftecn0nwrlph/KMwNXZX8xwJkETWRyKkfg== Received: from resomta-a2p-647654.sys.comcast.net ([96.103.145.231]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 256/256 bits) (Client did not present a certificate) by resdmta-a2p-658199.sys.comcast.net with ESMTPS id FUjduxxpJoNACFUlbuckKN; Thu, 15 May 2025 09:20:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcastmailservice.net; s=20211018a; t=1747300839; bh=x5oGZgwuJlSHTfnuYuHbr0DQ+ND64T1i5wqKNo459Uk=; h=Received:Received:From:To:Subject:Date:Message-ID:MIME-Version: Xfinity-Spam-Result; b=OTMUlrqSwvCY74bFnYdpLp5e2HQDzx0NyEyBL0+dNG3EUp8IoiKGwucw/RBBEJzJf vusTcLog9wxrgy367YK5OMlgW8LVZ9Mcu80qP6X1pVCANJZrA+1U8KWlKfMAs1cYfd XFccZwc+mdwhWTGbDet2o72UYASQUN+96hJRDEwMrczYsAxD0V0TcIIEpwEES9/rpT qG/Iama2fuf5bXT+UhWl2W41uzDAcs0E/VOQbSyFN7JmOk6nGltowxZgYXOZV/eX8m ll+oiYNFIaEftO/E3SqCYFVp/VN6jdmztvhJWrVny2W/qjuQQxNdOeMpvQ2C5funON /gePt3VJyV85A== Received: from lambda.localdomain ([75.70.122.243]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 256/256 bits) (Client did not present a certificate) by resomta-a2p-647654.sys.comcast.net with ESMTPSA id FUlZu7vcXeloxFUlauWZ4l; Thu, 15 May 2025 09:20:39 +0000 From: Stephen Cuka To: development@lists.ipfire.org Cc: Stephen Cuka Subject: [PATCH] pakfire.cgi: Suppress display of dependencies for install and remove boxes Date: Thu, 15 May 2025 03:20:33 -0600 Message-ID: <20250515092033.3571621-1-stephen@firemypi.org> X-Mailer: git-send-email 2.43.0 Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfJRmd4qhAnSxWwmjKH3LQTNXg8uAldw71pg/nFIfdfVPwMGQ9+CJE63DnSI94AxW5azod/oMoru+HlOHYGhJqvJJ4bqQ/IE/kiHHCux6oa7rxE6cL6h+ miHOmfhcXwJjSnDk70CQqE3OCvWdb5jYb7gG9x21LUUeNVc1iSILwgorF2SGHPRFthRQDnH1mHBu+aPPsMdg5MjZaOgGpFcJ1DQf2uVu9RQbQDvr422JJTyP shXYcIIIoh9FMilqiQz4HA== X-Spamd-Result: default: False [-0.03 / 11.00]; HFILTER_HELO_5(3.00)[resdmta-a2p-658199.sys.comcast.net]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM(-1.00)[-0.996]; R_MISSING_CHARSET(0.50)[]; IP_REPUTATION_HAM(-0.22)[asn: 7922(-0.21), country: US(-0.01), ip: 2001:558:fd01:2bb4::(0.00)]; R_DKIM_ALLOW(-0.20)[comcastmailservice.net:s=20211018a]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCPT_COUNT_TWO(0.00)[2]; FUZZY_RATELIMITED(0.00)[rspamd.com]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; ARC_SIGNED(0.00)[lists.ipfire.org:s=202003rsa:i=1]; DMARC_NA(0.00)[firemypi.org]; RECEIVED_SPAMHAUS_PBL(0.00)[75.70.122.243:received]; FROM_EQ_ENVFROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DKIM_REPUTATION(0.00)[0]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_SOME(0.00)[]; ASN(0.00)[asn:7922, ipnet:2001:558::/29, country:US]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[comcastmailservice.net:+]; RCVD_IN_DNSWL_NONE(0.00)[96.103.145.231:received]; R_SPF_NA(0.00)[no SPF record] X-Rspamd-Server: mail01.haj.ipfire.org X-Rspamd-Action: no action X-Rspamd-Queue-Id: 4Zyl7K1mJZz2X3 - For the install box, suppress the display of package dependencies. - As a special case, keep rsync in the display. It is a top level package as well as a dependency of rsnapshot. - lfs/freeradius: Remove samba as a dependency of freeradius. While commonly used with samba, freeradius is a standalone package. - lfs/libvirt: Remove qemu as a dependency of libvirt. While commonly used with qemu, libvirt is a standalone package. - lfs/mpc: Remove mpd as a dependency of mpc. While only used with mpd, mpc is a standalone package. - lfs/mympd: Remove mpd as a dependency of mympd. While only used with mpd, mympd is a standalone package. - lfs/vdradmin: Remove vdr as a dependency of vdradmin. While only used with vdr, vdradmin is a standalone package. Signed-off-by: Stephen Cuka --- html/cgi-bin/pakfire.cgi | 35 ++++++++++++++++++++++++++++++++--- lfs/freeradius | 2 +- lfs/libvirt | 2 +- lfs/mpc | 2 +- lfs/mympd | 2 +- lfs/vdradmin | 2 +- 6 files changed, 37 insertions(+), 8 deletions(-) diff --git a/html/cgi-bin/pakfire.cgi b/html/cgi-bin/pakfire.cgi index 159d63c9d..dcf2ee2c9 100644 --- a/html/cgi-bin/pakfire.cgi +++ b/html/cgi-bin/pakfire.cgi @@ -2,7 +2,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2022 IPFire Team # +# Copyright (C) 2007-2025 IPFire Team # # # # 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 # @@ -786,6 +786,18 @@ END END my %notinstalledlist = &Pakfire::dblist("notinstalled"); + + # remove dependencies which start with lib, perl, python3 + # from list to display + # special case - keep libvirt as a top level package + my %keep; + @keep{libvirt} = @notinstalledlist{libvirt} if exists $notinstalledlist{libvirt}; + for (keys %notinstalledlist) + { + delete $notinstalledlist{$_} if $_ =~ /^lib|^perl|^python3/; + } + @notinstalledlist{libvirt} = @keep{libvirt} if exists $keep{libvirt}; + foreach my $pak (sort keys %notinstalledlist) { print "\n"; } @@ -798,6 +810,24 @@ END END my %installedlist = &Pakfire::dblist("installed"); + + # remove dependencies packages from list to display + # special case - keep rsync as a top level package + my $instdir = "/opt/pakfire/db/installed"; + my @inst_deps = deps_from_metafiles($instdir); + my @inst_deps_noparent; + foreach (@inst_deps) + { + push @inst_deps_noparent, $_ =~ /.+:(.+)/; + } + my %keep; + @keep{rsync} = @installedlist{rsync} if exists $installedlist{rsync}; + foreach (@inst_deps_noparent) + { + delete $installedlist{$_}; + } + @installedlist{rsync} = @keep{rsync} if exists $keep{rsync}; + foreach my $pak (sort keys %installedlist) { print "\n"; } @@ -967,8 +997,7 @@ sub arrow_format return $line; } -# build dependencies tree from array of package -# dependencies +# build dependencies tree from array of package dependencies sub build_tree { my $pref = $_[0]; diff --git a/lfs/freeradius b/lfs/freeradius index e45e41aa4..111776486 100644 --- a/lfs/freeradius +++ b/lfs/freeradius @@ -36,7 +36,7 @@ TARGET = $(DIR_INFO)/$(THISAPP) PROG = freeradius PAK_VER = 23 -DEPS = libtalloc samba +DEPS = libtalloc SERVICES = freeradius diff --git a/lfs/libvirt b/lfs/libvirt index df8d2b224..1b6b233de 100644 --- a/lfs/libvirt +++ b/lfs/libvirt @@ -37,7 +37,7 @@ SUP_ARCH = x86_64 aarch64 PROG = libvirt PAK_VER = 38 -DEPS = ebtables libpciaccess ovmf qemu +DEPS = ebtables libpciaccess ovmf SERVICES = libvirtd virtlogd diff --git a/lfs/mpc b/lfs/mpc index 3bf4914e1..f6109877f 100644 --- a/lfs/mpc +++ b/lfs/mpc @@ -36,7 +36,7 @@ TARGET = $(DIR_INFO)/$(THISAPP) PROG = mpc PAK_VER = 10 -DEPS = mpd libmpdclient +DEPS = libmpdclient SERVICES = diff --git a/lfs/mympd b/lfs/mympd index 81e270fab..550f7e62d 100644 --- a/lfs/mympd +++ b/lfs/mympd @@ -36,7 +36,7 @@ TARGET = $(DIR_INFO)/$(THISAPP) PROG = mympd PAK_VER = 10 -DEPS = mpd libmpdclient +DEPS = libmpdclient SERVICES = mympd diff --git a/lfs/vdradmin b/lfs/vdradmin index 1fe38aa5c..a8abbba98 100644 --- a/lfs/vdradmin +++ b/lfs/vdradmin @@ -37,7 +37,7 @@ TARGET = $(DIR_INFO)/$(THISAPP) PROG = vdradmin PAK_VER = 7 -DEPS = perl-gettext vdr vdr_epgsearch +DEPS = perl-gettext vdr_epgsearch SERVICES = vdradmin -- 2.43.0