> How about "apt-class"? I wouldn't use anything in the apt or dpkg namespace.
> Looking into the problem slightly further, it looks like the easiest > solution is to write out a selections file that could be installed via > dpkg --set-selections and then use a apt-get dselect-upgrade to > actually initiate the upgrade. FAI's install_packages can already do what you want, although I find dselect-upgrade somewhat irritating. OK it aims at "apt-get dselect-upgrade", but you can use it for other things as well. > It should be pretty easy to parse the current FAI package_config file > format. Yup, using regex in C > * A package can have the following desired install states: install, hold, > deinstall, purge, and unknown. You'd have to think whether it's good to mix package "selection states" (={install, deinstall, purge}) with package "flags" (={hold}). It's a different concept. With "unknown" you probably don't mean a regular state but an internal state that might occur. > * To prevent a package from being automatically upgraded it would have > to be placed in the "held" state, things in the unknown or install > states get upgraded. See above. Besides that use /etc/apt/preferences more extensively, it is much more powerful in some cases because of its use of regexes. > * apt-get dselect-upgrade can deal with constructing the dependency list. > * apt-get dselect-upgrade ignores package names that don't exist in > the available database. (solving the original problem with apt-get) > * there really isn't any error handling of packages not being in the > archive. > > I was thinking of writing it in either C++ or Python, any preferences? * use python/perl for easier maintanance, it probably makes sense to use perl for use with fai * use C for wide usability (you could think of integrating it into debian-installer/boot-floppies once). Portability is no problem. > Also what can be done about packages that are reading/writing to the > console? The best solution I thought of is to provide a timer that > can either kill the install or send email after some delay. However for > the email to be useful the program would need to provide a way for the > sysadmin to log into the machine and connect to the apt-get session. Could you specify this somewhat further? > What do people think of the rough outline of the proposed program? some nice thoughts -- Jens