Ticket #66 (closed enhancement: fixed)
APT cache cleaning should be optional
Reported by: | [email protected]… | Owned by: | desai |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | bcfg2-client | Version: | |
Keywords: | Cc: | [email protected]… |
Description
(Per discussion on the list)
APT cache cleaning on Debian toolkit should be made optional. Currently cache is cleaned every time the toolkit is initialized. This is not always the wanted behavior.
Attachments
Change History
comment:1 Changed 17 years ago by [email protected]…
- Cc [email protected]… added
comment:2 Changed 17 years ago by desai
- Priority changed from minor to major
- Status changed from new to assigned
This is a good point. dry-run mode should definitely disable both of these.
Can you clarify your first point a little bit? Are you saying that the client should never run apt-get update, or that it should be optional?
The dpkg --configure call is used to finish up any pending operations, so that the system is able to recover from being left in a bad state (caused by broken packages or whatver) Do you think that it should never be called?
comment:3 Changed 17 years ago by [email protected]…
I think that the best approach to apt-get update and others is to implement delayed apt-get update and optional apt-get clean.
Delayed apt-get update would kick in only there are packages to install. That way apt-get update wouldn't get called every time bcfg2 is run. Also, apt-get clean should be run after packages have been succesfully installed (if enabled) In other words, this means that we need a few more hooks in the client toolkits. Currently (as far as i understand it without reading any code ;) we appear to have 1 hook. apt-get clean is called on init as well as apt-get update, apt-get install is called when there are packages to install and so on.
In the new system we would have 3 hooks. PreInstall?, which would call apt-get update, Install that would call apt-get install, and PostInstall? (or cleanup) that would call apt-get clean. PreInstall? would be called before Install (with source from the package list as the argument), Install would be invoked for each package needing install (or with multiple packages) and PostInstall? when installation is complete with argument success or failure (or something alike). This would give us a lot of space for different approaches in to setting up the package managers and such.
For example, we could generate a temporary sources.list for debian from the source lines given to us in the Pkgmgr sources. That way debian toolkit would respect the uri given in the server repository like the other toolkits do.
comment:4 Changed 17 years ago by desai
- Status changed from assigned to closed
- Resolution set to fixed
I think this is resolved in [31b12d4b59c8aebd1d7ec410383e8cf202efedb5] (SVN r2088). I have added a -k option to the client. If this option is not specified, then apt-get update and clean commands are not called. the dpkg --configure call is also only called in this mode.
Dryrun mode now does _nothing_.
Not only that, but it shouldn't run dpkg --configure or apt-get update, either.
And it ESPECIALLY shouldn't do these things in dry run mode.
I would really consider this a showstopper bug instead of a minor one.