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

Bug#549089: apt: Please add support for temporary packages



On Wed, 30 Sep 2009 19:34:58 +0200 Gabriele Tozzi
<gabriele.tozzi@gmail.com> wrote:
> It would be nice to having a function to mark a package (and all it's
> automatically installed dependencies) as "temporary" when installing
> it. So one can safely test a software and then remove it without leaving
> a lot of unnecessary junk in the system.

I came across this request while looking for something similar to fit
my own needs, and I think I've got an idea that could solve both use
cases in a reasonably simple APT-like way.

My own use case is that I want to ensure some package is installed
(without knowing ahead of time whether it is), do something with it,
then remove it, but only remove it if it was not already previously
installed (as part of a script), including dependencies.

I realized that a clean way to handle this would be some way to just
tell "apt-get install" to _not_ mark the packages as manually
installed -- if they're already marked, leave their markings alone,
otherwise mark them as auto (akin to Gentoo's "emerge --oneshot" or
what's possible with Alpine's "apk --virtual").  This way, new
packages could be installed willy nilly, and easily removed with
"apt-get autoremove".

I can mimic this behavior currently by doing some dancing with
"apt-mark" before and after install, but it'd be really awesome if APT
itself had either a flag or a "-o" option for adjusting the package
marking behavior.

If it seems like this is really a separate wishlist item (and not as
overlapping as I thought), I'm also happy to file a new wishlist issue
instead. :)

♥,
- Tianon
  4096R / B42F 6819 007F 00F8 8E36  4FD4 036A 9C25 BF35 7DD4


Reply to: