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

Re: apt-get install --reinstall --reset <pkg>



2010/7/3 Daniel Bock <daniel.bock@web.de>:
> I would like to add the action "reset" to apt. It will actually call dpkg
> with "--force-confask --force-confnew" (use newest version from git to try
> it). It would be nice to also reset debconf-choices, but debconf is
> currently no dependency of apt.

APT has no debconf questionstuff so it doesn't need to…
and adding it just for such a feature is not really a good idea.
If you want you can check for debconf existence at runtime instead.


(reordered quote)
> Is there anything else to do to get it work?

You mean beside documentation in the manpages? ;)

Reset is a quite generic name. What will it do, reset the automatic
install flag, reset some other state information, some queried action
like in dselect or aptitude… Possibilities are endless, but
it discards local configuration changes, doesn't it?


> and in apt-get/deb/dpkgpm.cc:
>     case Item::ReSet:
>     Args[n++] = "--force-confask";
>     Size += strlen(Args[n-1]);
>     Args[n++] = "--force-confnew";
>     Size += strlen(Args[n-1]);
>     break;

First, you should make clear what you want:
>From this fragment it looks like an action "dpkg --reset" would
exist which is comparable to the other actions like "dpkg --unpack"
or "dpkg --configure" which APT needs to be told about in a few
places as it needs to order them.
I think you don't want that.

Next point is, you should be able to have this functionality on
the fly with every APT version with the DPkg::Options list.

If you want to implement it clean - in a way that a user can e.g.
schedule it just like he can do it for reinstall or purge in one batch
you need to go a similar route as the reinstall flag works, but with
the difference that you need to tell the actionorderer about it:
It can make a big difference if
dpkg --configure A B  is called or
dpkg --configure A and
dpkg --configure B
so if you want to apply the options only to A you need to split
the first call and action orderer needs to know about it.
(same for --unpack and the other dpkg calls)

I am not sure if this feature will be worth the hassle as purge and
install will do the same just in two calls - or the hinted option
list can be used in one call - and i was never at a point to need
such a functionality at all… (but reinstall too).


Best regards,

David Kalnischkies


Reply to: