How exactly to use the tag "Obsoletes:" in a spec file ?
I need to offer texlive to users on Centos-5.6, so I packaged it (based on a Mandriva src.rpm), and that works.
But I want rpm to *replace* tetex by texlive, instead of just adding texlive, when users do a : $ yum install texlive (we have a local repo here).
So I added this line in texlive.spec : Obsoletes: tetex and of course I rebuilt the package, and (of course) that just don't work, despite tetex is listed among the Obsoleted packages : $ rpm -qp --obsoletes texlive-20110312-0phn.x86_64.rpm dvi2tty <= 5.3.1 jadetex kpathsea <= 20100722 kpathsea-devel <= 20100722 kpathsea-static-devel <= 20100722 pdfjam <= 1.21 ps2eps <= 1.64 tetex tetex-context tetex-devel tetex-dvipdfm tetex-dvips tetex-dvilj tetex-latex tetex-mfwin tetex-texi2html tetex-usrlocal tetex-xdvi etc... (tetex is the CentOS one : tetex-3.0-33.8.el5_5.6)
Can someone explain me why this fails, and eventually an other way to solve this problem ?
Thanks,
From: Philippe Naudin philippe.naudin@supagro.inra.fr
But I want rpm to *replace* tetex by texlive, instead of just adding texlive, when users do a : $ yum install texlive (we have a local repo here). So I added this line in texlive.spec : Obsoletes: tetex
Not an rpm expert but maybe some other package requires tetex? rpm -q --whatrequires tetex Or are these packages tetex requirement automaticaly changed to the replacement package? I think it works just once and won't prevent tetex from being reinstalled...
JD
How exactly to use the tag "Obsoletes:" in a spec file ?
I need to offer texlive to users on Centos-5.6, so I packaged it (based on a Mandriva src.rpm), and that works.
But I want rpm to *replace* tetex by texlive, instead of just adding texlive, when users do a : $ yum install texlive (we have a local repo here).
So I added this line in texlive.spec : Obsoletes: tetex
Does your package provide tetex? If not, use
Provides: tetex
And note, there is also Conflicts: but you don't need it I think.
Simon
and of course I rebuilt the package, and (of course) that just don't work, despite tetex is listed among the Obsoleted packages : $ rpm -qp --obsoletes texlive-20110312-0phn.x86_64.rpm dvi2tty <= 5.3.1 jadetex kpathsea <= 20100722 kpathsea-devel <= 20100722 kpathsea-static-devel <= 20100722 pdfjam <= 1.21 ps2eps <= 1.64 tetex tetex-context tetex-devel tetex-dvipdfm tetex-dvips tetex-dvilj tetex-latex tetex-mfwin tetex-texi2html tetex-usrlocal tetex-xdvi etc... (tetex is the CentOS one : tetex-3.0-33.8.el5_5.6)
Can someone explain me why this fails, and eventually an other way to solve this problem ?
Thanks,
-- Philippe _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Le mar 31 mai 2011 15:31:17 CEST, Simon Matter a écrit:
How exactly to use the tag "Obsoletes:" in a spec file ?
I need to offer texlive to users on Centos-5.6, so I packaged it (based on a Mandriva src.rpm), and that works.
But I want rpm to *replace* tetex by texlive, instead of just adding texlive, when users do a : $ yum install texlive (we have a local repo here).
So I added this line in texlive.spec : Obsoletes: tetex
Does your package provide tetex? If not, use
Provides: tetex
Hello John and Simon,
And thanks for your answers !
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.
tetex is required by : $ rpm -q --whatrequires tetex tetex-latex-3.0-33.8.el5_5.6 jadetex-3.12-15.el5 texinfo-tex-4.8-14.el5
jadetex and tetex-latex are also obsoleted/provided in the same way than tetex, and texinfo-tex is happy working with texlive.
Other suggestions ?
From: Philippe Naudin philippe.naudin@supagro.inra.fr
tetex is required by : $ rpm -q --whatrequires tetex tetex-latex-3.0-33.8.el5_5.6 jadetex-3.12-15.el5 texinfo-tex-4.8-14.el5 and texinfo-tex is happy working with texlive.
Maybe he is happy with your texlive but he still says he requires tetex... Did you try a yum with -v?
JD
Gordon Messmer wrote:
On 05/31/2011 07:27 AM, Philippe Naudin wrote:
But it doesn't help, yum is ready to install texlive but doesn't remove tetex.
Did you flush your yum cache after you rebuilt the package? It may have old metadata. _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
I had same problem a year or two ago. I wanted to obsolete integrated version 2.x for seamless install of OpenOffice 3.2. I created virtual package that Obsoletes old packages, but no dice.
Something is obviously wrong, and does not work like it should. I gave up and just removed old version and installed new one.
Ljubomir
Le mar 31 mai 2011 19:26:35 CEST, Ljubomir Ljubojevic a écrit:
... Something is obviously wrong, and does not work like it should. I gave up and just removed old version and installed new one.
Well, I think you are right : Obsoletes doesn't work, or at least need more documentation about how it works.
I followed suggestions from John and Gordon (thanks !) and tried : yum clean yum -v install texlive-20110312-0phn.x86_64.rpm \ texlive-texmf-20110312-0phn.noarch.rpm \ texlive-fontsextra-20110312-0phn.noarch.rpm \ 2>&1 | tee yum.log
but grep -Ei '(obsolete|tetex)' yum.log shows only some i386 tetex packages that are excluded by my yum.conf (exclude=*.i?86).
The following is no more related to Obsoletes :
I tried to install texlive then uninstall tetex despite they both use the same directories to store their packages, and it worked (no need to --force or whatever) ; rpm -V don't find anything to worry about.
Because there is a lot of %post scripts in texlive (to configure what have been installed), I want to run again these scripts after removing tetex. I can do a yum reinstall, but my texlive is close to 500 Mb : is there a way to run the scripts without downloading anything ?
Le mar 31 mai 2011 19:26:35 CEST, Ljubomir Ljubojevic a écrit:
... Something is obviously wrong, and does not work like it should. I gave up and just removed old version and installed new one.
Well, I think you are right : Obsoletes doesn't work, or at least need more documentation about how it works.
I followed suggestions from John and Gordon (thanks !) and tried : yum clean yum -v install texlive-20110312-0phn.x86_64.rpm \ texlive-texmf-20110312-0phn.noarch.rpm \ texlive-fontsextra-20110312-0phn.noarch.rpm \ 2>&1 | tee yum.log
but grep -Ei '(obsolete|tetex)' yum.log shows only some i386 tetex packages that are excluded by my yum.conf (exclude=*.i?86).
The following is no more related to Obsoletes :
I tried to install texlive then uninstall tetex despite they both use the same directories to store their packages, and it worked (no need to --force or whatever) ; rpm -V don't find anything to worry about.
Because there is a lot of %post scripts in texlive (to configure what have been installed), I want to run again these scripts after removing tetex. I can do a yum reinstall, but my texlive is close to 500 Mb : is there a way to run the scripts without downloading anything ?
You could 'rpm -q --scripts texlive', copy the %post section to a file and run it.
Simon
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
Regards, Leonard.
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
Louis
Le mer 01 jun 2011 11:37:15 CEST, louis@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 ?