Bug#1108601: debfoster: prune does not remove "all packages that are only installed because this package depends on them"

2025-07-13 Thread Lucas Nussbaum
On 12/07/25 at 13:54 +0200, Marc Haber wrote:
> Control: -1 severity wishlist
> thanks
> 
> On Sat, Jul 12, 2025 at 01:27:19PM +0200, Lucas Nussbaum wrote:
> > Actually that issue triggered me to look at apt-mark/apt autoremove
> > again, and I'm now using that instead. I wonder if Debian should keep
> > debfoster or just direct users to apt autoremove.
> 
> apt-mark/apt autoremove is the recommended way to do it, and it was the
> reason why debfoster was put up for adoption (or for removal). Maybe you can
> explain to me what it can do next week.

Regarding replacing debfoster with apt-mark, I filed
#1109196: apt: provide a way to automatically mark 'auto' all packages
#that don't need to stay manual (with a POC)

Lucas



Bug#1108601: debfoster: prune does not remove "all packages that are only installed because this package depends on them"

2025-07-12 Thread Marc Haber

On Sat, Jul 12, 2025 at 01:53:21PM +0200, Chris Hofstaedtler wrote:

On Sat, Jul 12, 2025 at 01:27:19PM +0200, Lucas Nussbaum wrote:

Actually that issue triggered me to look at apt-mark/apt autoremove
again, and I'm now using that instead. I wonder if Debian should keep
debfoster or just direct users to apt autoremove.


Part of my reason for removing deborphan was to get people to use
apt autoremove more. As long as we're collectively stuck on the old
tools, apt doesn't get better. And apparently apt mark/autoremove
did improve in trixie!


Want me to put that into debfoster's description? I am afraid that 
will be too late for trixie, but I can cooperate here, of course.


Greetings
Marc

--
-
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany|  lose things."Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421



Bug#1108601: debfoster: prune does not remove "all packages that are only installed because this package depends on them"

2025-07-12 Thread Marc Haber

Control: -1 severity wishlist
thanks

On Sat, Jul 12, 2025 at 01:27:19PM +0200, Lucas Nussbaum wrote:

Actually that issue triggered me to look at apt-mark/apt autoremove
again, and I'm now using that instead. I wonder if Debian should keep
debfoster or just direct users to apt autoremove.


apt-mark/apt autoremove is the recommended way to do it, and it was the 
reason why debfoster was put up for adoption (or for removal). Maybe you 
can explain to me what it can do next week.



Greetings from the TGV to Brest :-)


Looking forward to seeing you.

Greetings
Marc

--
-
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany|  lose things."Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421



Bug#1108601: debfoster: prune does not remove "all packages that are only installed because this package depends on them"

2025-07-12 Thread Chris Hofstaedtler
On Sat, Jul 12, 2025 at 01:27:19PM +0200, Lucas Nussbaum wrote:
> Actually that issue triggered me to look at apt-mark/apt autoremove
> again, and I'm now using that instead. I wonder if Debian should keep
> debfoster or just direct users to apt autoremove.

Part of my reason for removing deborphan was to get people to use 
apt autoremove more. As long as we're collectively stuck on the old 
tools, apt doesn't get better. And apparently apt mark/autoremove
did improve in trixie!

I think there are still unsolved problems with it, but I hope this 
will improve in forky.

Chris



Bug#1108601: debfoster: prune does not remove "all packages that are only installed because this package depends on them"

2025-07-12 Thread Lucas Nussbaum
On 12/07/25 at 13:17 +0200, Marc Haber wrote:
> On Sat, Jul 12, 2025 at 12:52:42PM +0200, Lucas Nussbaum wrote:
> > What I was doing (using your example below) is:
> > Answer Y to "Keep build-essential? [Ynpsiuqx?], [H]elp: "
> > Answer P to "Keep mediainfo? [Ynpsiuqx?], [H]elp: "
> > then press X to "Remove unwanted packages and exit."
> 
> Your usecase might actually be valid. This is just one that I never used. I
> took debfoster to keep it from being removed. I am not too familar with the
> program itself.
> 
> > I was under the impression that in that case, it would also remove
> > dependencies of the pruned package. But I checked in Debian 11 and I am
> > wrong (the behaviour is the same in 11, 12, 13).
> 
> So I could theoretically close this issue? I'm probably going to keep it
> open to review later whether your usecase could be supported better.

Yes, feel free to close it, or to turn it into a wishlist bug.

Actually that issue triggered me to look at apt-mark/apt autoremove
again, and I'm now using that instead. I wonder if Debian should keep
debfoster or just direct users to apt autoremove.

> Greetings from Brest

Greetings from the TGV to Brest :-)

Lucas



Bug#1108601: debfoster: prune does not remove "all packages that are only installed because this package depends on them"

2025-07-12 Thread Marc Haber

On Sat, Jul 12, 2025 at 12:52:42PM +0200, Lucas Nussbaum wrote:

What I was doing (using your example below) is:
Answer Y to "Keep build-essential? [Ynpsiuqx?], [H]elp: "
Answer P to "Keep mediainfo? [Ynpsiuqx?], [H]elp: "
then press X to "Remove unwanted packages and exit."


Your usecase might actually be valid. This is just one that I never 
used. I took debfoster to keep it from being removed. I am not too 
familar with the program itself.



I was under the impression that in that case, it would also remove
dependencies of the pruned package. But I checked in Debian 11 and I am
wrong (the behaviour is the same in 11, 12, 13).


So I could theoretically close this issue? I'm probably going to keep it 
open to review later whether your usecase could be supported better.


Greetings from Brest
Marc


--
-
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany|  lose things."Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421



Bug#1108601: debfoster: prune does not remove "all packages that are only installed because this package depends on them"

2025-07-12 Thread Lucas Nussbaum
On 12/07/25 at 10:22 +0200, Marc Haber wrote:
> Control: tags -1 unreproducible
> Control: severity -1 normal
> thanks
> 
> On Tue, Jul 01, 2025 at 10:36:57AM +0200, Lucas Nussbaum wrote:
> > 1. apt install mediainfo # this installs a dozen of dependencies, such as 
> > 'publicsuffix'
> > 2. debfoster
> > 3. answer "prune" for mediainfo
> > 
> > I get the following result:
> > 
> > > root@d12:~# debfoster
> > > 
> > > mediainfo is keeping the following 21 packages installed:
> > >   libcurl3t64-gnutls libgnutls30t64 libldap-common libldap2 
> > > libmediainfo0v5 libmms0 libnghttp2-14 libnghttp3-9 libngtcp2-16 
> > > libngtcp2-crypto-gnutls8 libp11-kit0 libpsl5t64
> > >   librtmp1 libsasl2-2 libsasl2-modules libsasl2-modules-db libssh2-1t64 
> > > libtasn1-6 libtinyxml2-11 libzen0t64 publicsuffix
> > > Keep mediainfo? [Ynpsiuqx?], [H]elp: P
> > > 
> > > [...]
> > > Reading package lists... Done
> > > Building dependency tree... Done
> > > Reading state information... Done
> > > The following packages were automatically installed and are no longer 
> > > required:
> > >   libgnutls30t64 libldap-common libmms0 libnghttp2-14 libnghttp3-9 
> > > libngtcp2-16 libpsl5t64 libsasl2-2 libsasl2-modules libsasl2-modules-db 
> > > libssh2-1t64 libtinyxml2-11 libzen0t64
> > >   publicsuffix
> > > Use 'apt autoremove' to remove them.
> > > The following packages will be REMOVED:
> > >   libcurl3t64-gnutls* libldap2* libmediainfo0v5* 
> > > libngtcp2-crypto-gnutls8* librtmp1* mediainfo*
> > > 0 upgraded, 0 newly installed, 6 to remove and 0 not upgraded.
> > > After this operation, 12.3 MB disk space will be freed.
> > > Do you want to continue? [Y/n]
> > 
> > I would expect debfoster to request the removal of other mediainfo
> > dependencies, like it did in bookworm.
> 
> Works for me. Please help me reproduce this issue. Tagging and 
> downgrading.

Ah, yes, sorry.

What I was doing (using your example below) is:
Answer Y to "Keep build-essential? [Ynpsiuqx?], [H]elp: "
Answer P to "Keep mediainfo? [Ynpsiuqx?], [H]elp: "
then press X to "Remove unwanted packages and exit."

I was under the impression that in that case, it would also remove
dependencies of the pruned package. But I checked in Debian 11 and I am
wrong (the behaviour is the same in 11, 12, 13).

Best,

Lucas



Bug#1108601: debfoster: prune does not remove "all packages that are only installed because this package depends on them"

2025-07-12 Thread Marc Haber
Control: tags -1 unreproducible
Control: severity -1 normal
thanks

On Tue, Jul 01, 2025 at 10:36:57AM +0200, Lucas Nussbaum wrote:
> 1. apt install mediainfo # this installs a dozen of dependencies, such as 
> 'publicsuffix'
> 2. debfoster
> 3. answer "prune" for mediainfo
> 
> I get the following result:
> 
> > root@d12:~# debfoster
> > 
> > mediainfo is keeping the following 21 packages installed:
> >   libcurl3t64-gnutls libgnutls30t64 libldap-common libldap2 libmediainfo0v5 
> > libmms0 libnghttp2-14 libnghttp3-9 libngtcp2-16 libngtcp2-crypto-gnutls8 
> > libp11-kit0 libpsl5t64
> >   librtmp1 libsasl2-2 libsasl2-modules libsasl2-modules-db libssh2-1t64 
> > libtasn1-6 libtinyxml2-11 libzen0t64 publicsuffix
> > Keep mediainfo? [Ynpsiuqx?], [H]elp: P
> > 
> > [...]
> > Reading package lists... Done
> > Building dependency tree... Done
> > Reading state information... Done
> > The following packages were automatically installed and are no longer 
> > required:
> >   libgnutls30t64 libldap-common libmms0 libnghttp2-14 libnghttp3-9 
> > libngtcp2-16 libpsl5t64 libsasl2-2 libsasl2-modules libsasl2-modules-db 
> > libssh2-1t64 libtinyxml2-11 libzen0t64
> >   publicsuffix
> > Use 'apt autoremove' to remove them.
> > The following packages will be REMOVED:
> >   libcurl3t64-gnutls* libldap2* libmediainfo0v5* libngtcp2-crypto-gnutls8* 
> > librtmp1* mediainfo*
> > 0 upgraded, 0 newly installed, 6 to remove and 0 not upgraded.
> > After this operation, 12.3 MB disk space will be freed.
> > Do you want to continue? [Y/n]
> 
> I would expect debfoster to request the removal of other mediainfo
> dependencies, like it did in bookworm.

Works for me. Please help me reproduce this issue. Tagging and 
downgrading.

Greetings
Marc

$ debspawn login trixie
[sudo] password for mh on swivel: 

╔═══╗
║  Login for trixie-buildd-amd64║
╚═══╝
░ Spawning container swivel-trixie-buildd-amd64-z7oy on 
/var/tmp/debspawn/pu11knzp.
░ Press Ctrl-] three times within 1s to kill container.
root@swivel-trixie-buildd-amd64-z7oy:/srv# apt install debfoster mediainfo
Installing:  
  debfoster  mediainfo

Installing dependencies:
  libbrotli1  libkrb5-3 libpsl5t64
  libcom-err2 libkrb5support0   librtmp1
  libcurl3t64-gnutls  libldap2  libsasl2-2
  libffi8 libmediainfo0v5   libsasl2-modules-db
  libgc1  libmms0   libssh2-1t64
  libgnutls30t64  libnghttp2-14 libtasn1-6
  libgssapi-krb5-2libnghttp3-9  libtinyxml2-11
  libidn2-0   libngtcp2-16  libunistring5
  libk5crypto3libngtcp2-crypto-gnutls8  libzen0t64
  libkeyutils1libp11-kit0

Suggested packages:
  gnutls-bin  krb5-doc  krb5-user  mediainfo-gui

Recommended packages:
  ca-certificates  libldap-common  libsasl2-modules
  krb5-locales publicsuffix

Summary:
  Upgrading: 0, Installing: 31, Removing: 0, Not Upgrading: 0
  Download size: 8397 kB
  Space needed: 26.3 MB / 692 GB available

Continue? [Y/n] 
Get:1 http://deb.debian.org/debian trixie/main amd64 libgc1 amd64 1:8.2.8-1 
[247 kB]
Get:2 http://deb.debian.org/debian trixie/main amd64 debfoster amd64 2.8-1 
[38.3 kB]
Get:3 http://deb.debian.org/debian trixie/main amd64 libbrotli1 amd64 
1.1.0-2+b7 [307 kB]
Get:4 http://deb.debian.org/debian trixie/main amd64 libcom-err2 amd64 
1.47.2-3+b1 [25.0 kB]
Get:5 http://deb.debian.org/debian trixie/main amd64 libunistring5 amd64 1.3-2 
[477 kB]
Get:6 http://deb.debian.org/debian trixie/main amd64 libidn2-0 amd64 2.3.8-2 
[109 kB]
Get:7 http://deb.debian.org/debian trixie/main amd64 libffi8 amd64 3.4.8-2 
[24.1 kB]
Get:8 http://deb.debian.org/debian trixie/main amd64 libp11-kit0 amd64 0.25.5-3 
[425 kB]
Get:9 http://deb.debian.org/debian trixie/main amd64 libtasn1-6 amd64 4.20.0-2 
[49.9 kB]
Get:10 http://deb.debian.org/debian trixie/main amd64 libgnutls30t64 amd64 
3.8.9-2 [1464 kB]
Get:11 http://deb.debian.org/debian trixie/main amd64 libkrb5support0 amd64 
1.21.3-5 [33.0 kB]
Get:12 http://deb.debian.org/debian trixie/main amd64 libk5crypto3 amd64 
1.21.3-5 [81.5 kB]
Get:13 http://deb.debian.org/debian trixie/main amd64 libkeyutils1 amd64 
1.6.3-6 [9456 B]
Get:14 http://deb.debian.org/debian trixie/main amd64 libkrb5-3 amd64 1.21.3-5 
[326 kB]
Get:15 http://deb.debian.org/debian trixie/main amd64 libgssapi-krb5-2 amd64 
1.21.3-5 [138 kB]
Get:16 http://deb.debian.org/debian trixie/main amd64 libsasl2-modules-db amd64 
2.1.28+dfsg1-9 [19.8 kB]
Get:17 http://deb.debian.org/debian trixie/main amd64 libsasl2-2 amd64 
2.1.28+dfsg1-9 [57.5 kB]
Get:18 http://deb.debian.org/debian trixie/main amd64 libldap2 amd64 
2.6.10+dfsg-1 [194 kB]
Get:19 http://deb.debian.org/debian trixie/main amd64 libnghttp2-14 amd64 
1.64.0-1.1 [76.0 kB]
Get:20 http://deb.debian.org/debian trixie/main amd64 libnghttp3-9 amd64 
1.8.0-1 [67.7 kB]
Get:21 h

Bug#1108601: debfoster: prune does not remove "all packages that are only installed because this package depends on them"

2025-07-01 Thread Lucas Nussbaum
Package: debfoster
Version: 2.8-1
Severity: serious
Justification: makes package useless

Hi,

In trixie, if I:

1. apt install mediainfo # this installs a dozen of dependencies, such as 
'publicsuffix'
2. debfoster
3. answer "prune" for mediainfo

I get the following result:

> root@d12:~# debfoster
> 
> mediainfo is keeping the following 21 packages installed:
>   libcurl3t64-gnutls libgnutls30t64 libldap-common libldap2 libmediainfo0v5 
> libmms0 libnghttp2-14 libnghttp3-9 libngtcp2-16 libngtcp2-crypto-gnutls8 
> libp11-kit0 libpsl5t64
>   librtmp1 libsasl2-2 libsasl2-modules libsasl2-modules-db libssh2-1t64 
> libtasn1-6 libtinyxml2-11 libzen0t64 publicsuffix
> Keep mediainfo? [Ynpsiuqx?], [H]elp: P
> 
> [...]
> Reading package lists... Done
> Building dependency tree... Done
> Reading state information... Done
> The following packages were automatically installed and are no longer 
> required:
>   libgnutls30t64 libldap-common libmms0 libnghttp2-14 libnghttp3-9 
> libngtcp2-16 libpsl5t64 libsasl2-2 libsasl2-modules libsasl2-modules-db 
> libssh2-1t64 libtinyxml2-11 libzen0t64
>   publicsuffix
> Use 'apt autoremove' to remove them.
> The following packages will be REMOVED:
>   libcurl3t64-gnutls* libldap2* libmediainfo0v5* libngtcp2-crypto-gnutls8* 
> librtmp1* mediainfo*
> 0 upgraded, 0 newly installed, 6 to remove and 0 not upgraded.
> After this operation, 12.3 MB disk space will be freed.
> Do you want to continue? [Y/n]

I would expect debfoster to request the removal of other mediainfo
dependencies, like it did in bookworm. This does not match the behaviour
described in the manpage for 'prune': it should remove "all packages
that are only installed because this package depends on them".

Lucas


-- System Information:
Debian Release: 13.0
  APT prefers testing-security
  APT policy: (500, 'testing-security'), (500, 'stable-updates'), (500, 
'stable-security'), (500, 'testing'), (500, 'stable'), (500, 'oldstable'), 
(100, 'bookworm-fasttrack')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.12.33+deb13-amd64 (SMP w/20 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages debfoster depends on:
ii  libc6   2.41-9
ii  libgc1  1:8.2.8-1

Versions of packages debfoster recommends:
ii  apt  3.0.3

debfoster suggests no packages.

-- no debconf information