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

Don't use "Requires(foo,bar): ..." notation



I'd like to call on everybody, who's maintaining packages, to no longer
use "Requires(foo,bar): ..." notation in spec files, because it can lead
to unexpected results due to two bugs. [1] [2] Details in the bugzilla
reports.

Instead, it should be split like this to work around those bugs:

  Requires(pre): foo
  Requires(post): foo


For instance, we here have a package with "Requires(post,preun): GConf2"
because gconftool-2 is needed and executed in the package's postinstall
and preuninstall scriptlets. However, the installed package does not seem
to depend on GConf2 when it is queried like this

  $ rpm --query straw
  straw-0.22.1-0.fdr.2
  $ rpm --query --whatrequires GConf2 | grep straw
  $

and actually one can erase the GConf2 package (provided that no other
installed package depends on it, of course, which makes this bug more
dangerous when less widely used programs are required in package
scriplets). A subsequent "rpm --erase straw" would fail in the
preuninstall scriptlet, since gconftool-2 is no longer available.


[1] Requires(pre,postun) screws up package ordering
http://bugzilla.redhat.com/118773

[2] Requires(pre,postun) is ignored for installed packages
http://bugzilla.redhat.com/118780

-- 
Fedora Core release 1.91 (FC2) - Linux 2.6.5-1.326



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