[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cleanly getting rid of manually installed transitional packages due to rename



On Wed 22 Apr 2020 at 12:22:24 (+0200), Vincent Lefevre wrote:
> On 2020-04-22 12:39:35 +0300, Andrei POPESCU wrote:
> > You might want to file a wishlist bug against 'apt' to request such a 
> > feature (if not requested already). A reliable implementation probably 
> > requires a new package field, something like:
> > 
> >     Package: foo
> >     Superseded-By: bar
> 
> Indeed, that would be a solution. Before posting, I initially searched
> on the web for anything related, but I could not find. With a specific
> search in the Debian BTS, I could now find such a wishlist in dpkg:
> 
>   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=33344
>   Add new field to track package rename/split/merge
> 
> filled in 1999! It has 2 merged bugs, also very old.

For trivial renames, which yours looks like, as do those I've done,
it would be pretty easy to script. I've never made the effort,
because it's not something I do frequently enough, usually just once,
soon after I start running a new release on the first computer. Then
I adjust the list of packages used for the rest of them. Manually:

 $ apt-get -s purge pdftk
 The following package was automatically installed and is no longer required:
  pdftk-java
 Use 'apt autoremove' to remove it.
 # apt-mark manual pdftk-java
 pdftk-java set to manually installed.
 $ apt-get -s purge pdftk
 # apt-get purge pdftk
 Removing pdftk (2.02-5) ...

(Routine output edited out.) The first step can list more packages,
so checking the Depends line for the original package should show
which is the replacement.

Obviously there are more involved cases, and the thread that I assume
you've read discusses some of these, and the complications that arise
with trying to automate it. I usually take the opportunity to review
the packages concerned and decide for myself what to install/keep.

https://lists.debian.org/debian-devel/2009/09/msg00687.html

Cheers,
David.


Reply to: