[Rpm-maint] discussion on problems of RPM in real life packaging

Stanislav Brabec sbrabec at suse.cz
Mon Jun 16 14:51:31 UTC 2008


Pixel wrote:

> well. more precisely, the patch allows to get rid of %post/%postun,
> but not %preun. "registration" can be handled:
> 
> for gconf schema, we've removed the %post and kept the %preun
> "gconftool-2 --makefile-uninstall-rule" on uninstall. The advantage is
> doing all --makefile-install-rule at once instead of doing them in
> each %post. the other advantage is to ensure the
> --makefile-install-rule is always properly done.

Well, there is still a problem, that there is not any scriptlet, which
is called from the instance, which is going to be deleted, but in the
moment, when all old-instance files are still present and unmodified.

Using %preun is acceptable only for uninstallation, not for upgrade.
But this is yet another problem mentioned in the document, not related
to one-time-scriptlets.

> but for filetriggers using the list of files passed in stdin (ie the
> filetriggers doing "subscription"), we would have to pass the files on
> filesystem matching regexp (not that easy to do using a regexp for the
> filter, eg: how do we get files matching ^.(/lib|/usr/lib)/[^/]*\.so\.
> ?)

Using file lists on stdin of the one time script may be very useful for
scripts of subscription type, if the scripted tool can handle more than
one file at once.

However I can imagine an one-time unsubscription counterpart (something,
which will evaluate list of all files going to be removed or overwritten
in the forthcoming transaction and then issue a command with a such
list. I think it could be possible to write it as well, but only deep
inside the rpm (when rpm evaluates possible conflicts in forthcoming
transaction).

-- 
Best Regards / S pozdravem,

Stanislav Brabec
software developer
---------------------------------------------------------------------
SUSE LINUX, s. r. o.                          e-mail: sbrabec at suse.cz
Lihovarská 1060/12           tel: +420 284 028 966, +49 911 740538747
190 00 Praha 9                                  fax: +420 284 028 951
Czech Republic                                    http://www.suse.cz/




More information about the Rpm-maint mailing list