[CentOS] the tag Obsoletes: in spec files

Philippe Naudin philippe.naudin at supagro.inra.fr
Wed Jun 1 13:56:15 UTC 2011


Le mer 01 jun 2011 11:37:15 CEST, louis at lagendijk.xs4all.nl a écrit:

> > Hello Philippe,
> >
> > On Tue, 2011-05-31 at 16:27 +0200, Philippe Naudin wrote:
> >> Here is what I have tried :
> >> Provides:	tetex = %{version}
> >> Obsoletes:	tetex < %{version}
> >>
> >> But it doesn't help, yum is ready to install texlive but doesn't
> >> remove tetex.
> >
> > Not sure if the Obsoletes tag actually works as intended or expected,
> > but these version tests are odd. Unless tetex and texlive use the same
> > version numbers you are testing the wrong version number, and also why
> > the '<'? Try this without the version test, just
> >
> > Provides:	tetex
> > Obsoletes:	tetex
> >
> >From what I recall from the Fedora packaging guidelines, your need to
> provide a tetex-a.b-c where c is one higher than the currently latest
> existing version. This however works only as long as no new Tetex versions
> appear. For a situation where you want to override a living package in the
> distrubution I don't see how an obsoletes could reliably work. A conflict
> sounds less tricky to me.

[ a few tests later ... ]

It is not possible to use Provides: tetex without a version number,
because :
coreutils conflicts tetex < 1.0.7-66

Using :
Provides:	tetex = %{version}
Obsoletes:	tetex
doesn't make any change, rpm install texlive without removing tetex.

I have also tried Conflicts: but it doesn't work :
Provides:	tetex = %{version}
Conflicts:	tetex < %{version}
--> Running transaction check
---> Package texlive.x86_64 0:20110312-0phn set to be updated
---> Package texlive-fontsextra.noarch 0:20110312-0phn set to be updated
---> Package texlive-texmf.noarch 0:20110312-0phn set to be updated
--> Processing Conflict: texlive conflicts tetex < 20110312

The version of tetex is :
$ rpm -q --qf '%{epoch}-%{version}-%{release}\n' tetex
(none)-3.0-33.8.el5_5.6
and texlive :
(none)-20110312-0phn
so, if I understand correctly, the tetex provided by texlive
should be "newer" than the real tetex ?

-- 
Philippe



More information about the CentOS mailing list