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

Re: Two questions about RPM packages


Ali Majdzadeh wrote:
Hello John
I have built an RPM package which does some clean-ups and rewrites some special files. I want this package to get installed as the last RPM package.
RPM package installation order should ideally be enforced by providing the right 'Requires' in the rpm spec file. So, in one of my previous jobs we initially tackled the problem of 'do something after everything is installed' by just creating a ^meta-package^ which had all the packages to be installed before it in the 'Requires' tag and the post-installation tasks in it's %post section. This ensured that it was installed as the last package and the tasks were run only after all packages were installed.

However as the number of packages grew, the situation got out of hand (to add to it we started relying, a tad bit too much, on rpm's ordering of %pre, %post, %preun and %postun). So, we decided to just stop relying on rpm to do everything.

We simply decoupled the 'tasks to be done post install' and the installation itself (besides the complexity of maintaining the correct order, we also required to prompt the user in the some of the post installation scripts). We did this by ensuring that a 'configuration' script has been run at least once before the application could be used (much like the vmware-*config.pl scripts bundled with VMWare products), and this 'configuration' script prompted the user to install packages that it found missing before continuing with the post-install instructions.

Contrary to the belief that users appreciate it better if installers try and do everything (installation and default configuration), so that things ^just-work^, we realized that our users preferred the new way (installation + configuration script) better.

Just my experience, YMMV.

- steve


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