[Rpm-maint] upgrade process

Stanislav Brabec sbrabec at suse.cz
Fri Mar 20 12:29:11 UTC 2009


Michael Schroeder wrote in Fri 03/20 2009 at 12:21 +0100:
> On Thu, Mar 19, 2009 at 05:49:21PM +0100, Stanislav Brabec wrote:
> > Package smartsuite was renamed to smartmontools, but the
> > script /etc/init.d/smartd remains without change. Start on installation,
> > restart (once) on update, stop on removal.
> > 
> > It's easy top do with package-name based scripts.
> 
> That's a straightforward use case for
> %postinstall/%postupdate/%preuninstall

Well, imagine more complicated case:

Suppose we have all-in-one avahi package.

Now we split (for a good reason) to:
avahi: Contains /etc/init.d/avahi-daemon and /etc/init.d/avahi-dnsconfd
avahi-python: Contains /etc/init.d/avahi-bookmarks

But maybe packagers will decide:
avahi-core: Contains /etc/init.d/avahi-daemon and /etc/init.d/avahi-dnsconfd
avahi-python: Contains /etc/init.d/avahi-bookmarks

Is it possible to restart each daemon once in this case?

> > 2)
> > [...]
> > %postnew /usr/bin/gst-register
> > /usr/bin/gst-register
> > 
> > %postup /usr/bin/gst-register
> > /usr/bin/gst-register
> > 
> > %postrm /usr/bin/gst-register
> > rm -r /var/cache/gstreamer-0.8
> 
> No no, you shouldn't do that with scriptlets at all, but with
> a virtual package trigger.

Actually, yes for this example (gst-register will create cache of all
plugins).

What about a tool, which has a cache directory as a private playground
of a particular binary:

Imagine a package split:
caching-proxy => caching-proxy-http + caching-proxy-ftp
/usr/bin/cproxy-http uses /var/cache/cproxy/http
/usr/bin/cproxy-ftp uses /var/cache/cproxy/ftp

If you upgrade from caching-proxy to caching-proxy-http only, you
probably want to purge /var/cache/cproxy/ftp.

-- 
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