Sven Mueller wrote:
Installations with debian packages are far too verbose already for my taste. Please don't bother the admin (me) with questions at uninstall time as well. I hate giving an (un)install command, only to come back a few hours later to see that it waits for my input approx. 10% through the process.
Actually, with (network) installs, this is even worse: When installing the system (sarge, with current debian-installer in expert mode), you often get the situation where you answer a (few) question(s), wait for more questions to come up but only see it downloading more software, so you leave the host alone to for a while (a few hours possibly), only to come back, seeing it waiting for you to answer another few questions, you do that again only see it doing more downloads, .....
The debian installation improved quite a bit over the last two years, but it is still faaaaar away from where I would like to see it: - Boot CD/DVD - Answer a few questions (e.g. partioning, boot loader type, packages selection, language, keyboard type, network setup, mirror selection) - Wait for all packages to be downloaded and unpacked (*) - Answer all the questions those packages might want answers to - Have a running system
* This is the most important point: We can't avoid a wait here, since we need time to partition the disk, download/unpack packages etc., but there shouldn't be multiple prolonged waiting periods during an installation.
I'm actually only reading this list to get useful tips, because I might want to become a DD in the future. However, I have an idea for this, and I would really like it to be included in the installation.
Whenever a package asks a question, the package should be added to a list of "needs answering". While waiting for the answer, the installation should continue with other packages (which don't pre-depend on any package which needs answers). That way, after waiting some time (possibly hours), most of the work has been done, and you can just answer the questions which are queuing up. After that, only a few packages (those that needed answers and the ones pre-depending on them) need to be installed.
If this would be implemented, it would also be possible to skip some questions until later, and answer some others, so you can wait until someone who understands the question in some cases, without holding up the rest of the installation.
I know what you want to achieve. Actually, with the current packaging, this should already be mostly possible (Especially because Pre-Depends are highly discouraged). pre-inst Skripts should not ask questions according to the packaging policy IIRC, so if apt/dpkg/whatever would sort the actions correctly, something like
a) Get list (LI) of installed&configured packages b) get list of packages to install into list LT c) clear list LC d) check control info on packages of list LT e) sort dependency tree to a list (LA) so that each branch is included into the list as completely as possible but without any yet unfullfilled pre-depends. Keep in mind a list (LB) of packages which can't yet be installed because of missing pre-depends. f) Go though LB and in move any package from LB to LC which is installable when LI+LA are installed&configured g) unpack all packages from LA and LC h) configure packages in LF, move successfully configured packages to LI. Leave failed packes in LF. i) configure all packages in LA, adding successfully configured packages to LI, removing them from LT. If it failed, put it into LF but still remove it from LT. j) configure all packages in LC, adding successfully configured packages to LI, removing them from LT. If it failed, put it into LF but still remove it from LT. k) check wether LT is empty. If so, go to (o) l) check wether LT contains only packages pre-depending on packages in LF. If not, go to (c) m) Show list of failed packages (LF) to user. n) Show list of uninstallable packages (LT, they all pre-depend on packages which failed to configure) to user. o) Terminate.
However, this could be handled even better if the maintainer scripts would be further divided:
- The "config" script sets default values to debconf questions, associates templates and questions etc. Basically, it tells the configuration management which questions to ask, how to ask them and which dependencies (*) there are between the questions and their answers. A lot like Kconfig works for the linux kernel. - The postinst script refrains from actually prompting the user but only does what it can do without doing that. I.e. create directories needed, upgrade database files etc. - The (new) postdebconf script is called by the configuration management (**) once all the questions for a package have been answered. It does all the work that depends on answers from the user.
* debconf, to my knowledge, doesn't currently support inter-question dependencies.
** The configuration management frontend is called automatically after package installation and/or manually. It is up to the admin to answer as many questions as he likes, possibly leaving several (or even all) packages installed but unconfigured.
Note: I'm only dreaming here. I'm in no position to implement this, mostly because of a lack of time.
I hope you didn't mind me doing other things than asking questions here. But this is something which annoyed me for quite some time, and if it could be improved I would be quite happy.
debian-mentors is there to help new maintainers and to allow discussions among them AFAICT. But IANADD yet anyway.
cu, sven
-- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

