Why is yum picking a lower version to install

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












For reasons that I cannot control, I am being forced to roll my own rpms for PHP under CentOS 7.4. I have built rpms for php 7.2.5 and installed them in a local repository. yum install php picks up the local version and the package is installed under /usr/local. My problem is with php-pear. For some reason, yum wants to pick up the stock version of php-pear instead of my version, even though my version has the higher version number.



# yum --showduplicates list php-pear
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Available Packages
php-pear.noarch 1.10.5-1.el7.centos nci-f
php-pear.noarch 1:1.9.4-21.el7 base
php-pear.noarch 1:1.9.4-21.el7 base
php-pear.noarch 1:1.9.4-21.el7 base
# yum install php-pear
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package php-pear.noarch 1:1.9.4-21.el7 will be installed
--> Processing Dependency: php-bz2 for package: 1:php-pear-1.9.4-21.el7.noarch
--> Processing Dependency: php-tokenizer for package: 1:php-pear-1.9.4-21.el7.noarch
--> Processing Dependency: php-xml for package: 1:php-pear-1.9.4-21.el7.noarch
--> Processing Dependency: php-cli for package: 1:php-pear-1.9.4-21.el7.noarch
--> Processing Dependency: php-zlib for package: 1:php-pear-1.9.4-21.el7.noarch
--> Processing Dependency: php-posix for package: 1:php-pear-1.9.4-21.el7.noarch
--> Processing Dependency: php-ftp for package: 1:php-pear-1.9.4-21.el7.noarch
--> Processing Dependency: php-pcre for package: 1:php-pear-1.9.4-21.el7.noarch
--> Running transaction check
...


I have set the priority of the nci-f repository to 1 with no effect. I know that I can use yum install php-pear-7.2.5-1.el7.centos to install the specific package but both want to use the simpler command (on 400+ servers) and want to make sure updates work in the future.



Also, in my .spec file for the php-pear package I do have the line



Obsoletes: php-pear <= 1:1.9.4


Why is yum picking the lower version package and how can I get it to prefer my package instead?







share|improve this question























    up vote
    0
    down vote

    favorite












    For reasons that I cannot control, I am being forced to roll my own rpms for PHP under CentOS 7.4. I have built rpms for php 7.2.5 and installed them in a local repository. yum install php picks up the local version and the package is installed under /usr/local. My problem is with php-pear. For some reason, yum wants to pick up the stock version of php-pear instead of my version, even though my version has the higher version number.



    # yum --showduplicates list php-pear
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    Available Packages
    php-pear.noarch 1.10.5-1.el7.centos nci-f
    php-pear.noarch 1:1.9.4-21.el7 base
    php-pear.noarch 1:1.9.4-21.el7 base
    php-pear.noarch 1:1.9.4-21.el7 base
    # yum install php-pear
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    Resolving Dependencies
    --> Running transaction check
    ---> Package php-pear.noarch 1:1.9.4-21.el7 will be installed
    --> Processing Dependency: php-bz2 for package: 1:php-pear-1.9.4-21.el7.noarch
    --> Processing Dependency: php-tokenizer for package: 1:php-pear-1.9.4-21.el7.noarch
    --> Processing Dependency: php-xml for package: 1:php-pear-1.9.4-21.el7.noarch
    --> Processing Dependency: php-cli for package: 1:php-pear-1.9.4-21.el7.noarch
    --> Processing Dependency: php-zlib for package: 1:php-pear-1.9.4-21.el7.noarch
    --> Processing Dependency: php-posix for package: 1:php-pear-1.9.4-21.el7.noarch
    --> Processing Dependency: php-ftp for package: 1:php-pear-1.9.4-21.el7.noarch
    --> Processing Dependency: php-pcre for package: 1:php-pear-1.9.4-21.el7.noarch
    --> Running transaction check
    ...


    I have set the priority of the nci-f repository to 1 with no effect. I know that I can use yum install php-pear-7.2.5-1.el7.centos to install the specific package but both want to use the simpler command (on 400+ servers) and want to make sure updates work in the future.



    Also, in my .spec file for the php-pear package I do have the line



    Obsoletes: php-pear <= 1:1.9.4


    Why is yum picking the lower version package and how can I get it to prefer my package instead?







    share|improve this question





















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      For reasons that I cannot control, I am being forced to roll my own rpms for PHP under CentOS 7.4. I have built rpms for php 7.2.5 and installed them in a local repository. yum install php picks up the local version and the package is installed under /usr/local. My problem is with php-pear. For some reason, yum wants to pick up the stock version of php-pear instead of my version, even though my version has the higher version number.



      # yum --showduplicates list php-pear
      Loaded plugins: fastestmirror
      Loading mirror speeds from cached hostfile
      Available Packages
      php-pear.noarch 1.10.5-1.el7.centos nci-f
      php-pear.noarch 1:1.9.4-21.el7 base
      php-pear.noarch 1:1.9.4-21.el7 base
      php-pear.noarch 1:1.9.4-21.el7 base
      # yum install php-pear
      Loaded plugins: fastestmirror
      Loading mirror speeds from cached hostfile
      Resolving Dependencies
      --> Running transaction check
      ---> Package php-pear.noarch 1:1.9.4-21.el7 will be installed
      --> Processing Dependency: php-bz2 for package: 1:php-pear-1.9.4-21.el7.noarch
      --> Processing Dependency: php-tokenizer for package: 1:php-pear-1.9.4-21.el7.noarch
      --> Processing Dependency: php-xml for package: 1:php-pear-1.9.4-21.el7.noarch
      --> Processing Dependency: php-cli for package: 1:php-pear-1.9.4-21.el7.noarch
      --> Processing Dependency: php-zlib for package: 1:php-pear-1.9.4-21.el7.noarch
      --> Processing Dependency: php-posix for package: 1:php-pear-1.9.4-21.el7.noarch
      --> Processing Dependency: php-ftp for package: 1:php-pear-1.9.4-21.el7.noarch
      --> Processing Dependency: php-pcre for package: 1:php-pear-1.9.4-21.el7.noarch
      --> Running transaction check
      ...


      I have set the priority of the nci-f repository to 1 with no effect. I know that I can use yum install php-pear-7.2.5-1.el7.centos to install the specific package but both want to use the simpler command (on 400+ servers) and want to make sure updates work in the future.



      Also, in my .spec file for the php-pear package I do have the line



      Obsoletes: php-pear <= 1:1.9.4


      Why is yum picking the lower version package and how can I get it to prefer my package instead?







      share|improve this question











      For reasons that I cannot control, I am being forced to roll my own rpms for PHP under CentOS 7.4. I have built rpms for php 7.2.5 and installed them in a local repository. yum install php picks up the local version and the package is installed under /usr/local. My problem is with php-pear. For some reason, yum wants to pick up the stock version of php-pear instead of my version, even though my version has the higher version number.



      # yum --showduplicates list php-pear
      Loaded plugins: fastestmirror
      Loading mirror speeds from cached hostfile
      Available Packages
      php-pear.noarch 1.10.5-1.el7.centos nci-f
      php-pear.noarch 1:1.9.4-21.el7 base
      php-pear.noarch 1:1.9.4-21.el7 base
      php-pear.noarch 1:1.9.4-21.el7 base
      # yum install php-pear
      Loaded plugins: fastestmirror
      Loading mirror speeds from cached hostfile
      Resolving Dependencies
      --> Running transaction check
      ---> Package php-pear.noarch 1:1.9.4-21.el7 will be installed
      --> Processing Dependency: php-bz2 for package: 1:php-pear-1.9.4-21.el7.noarch
      --> Processing Dependency: php-tokenizer for package: 1:php-pear-1.9.4-21.el7.noarch
      --> Processing Dependency: php-xml for package: 1:php-pear-1.9.4-21.el7.noarch
      --> Processing Dependency: php-cli for package: 1:php-pear-1.9.4-21.el7.noarch
      --> Processing Dependency: php-zlib for package: 1:php-pear-1.9.4-21.el7.noarch
      --> Processing Dependency: php-posix for package: 1:php-pear-1.9.4-21.el7.noarch
      --> Processing Dependency: php-ftp for package: 1:php-pear-1.9.4-21.el7.noarch
      --> Processing Dependency: php-pcre for package: 1:php-pear-1.9.4-21.el7.noarch
      --> Running transaction check
      ...


      I have set the priority of the nci-f repository to 1 with no effect. I know that I can use yum install php-pear-7.2.5-1.el7.centos to install the specific package but both want to use the simpler command (on 400+ servers) and want to make sure updates work in the future.



      Also, in my .spec file for the php-pear package I do have the line



      Obsoletes: php-pear <= 1:1.9.4


      Why is yum picking the lower version package and how can I get it to prefer my package instead?









      share|improve this question










      share|improve this question




      share|improve this question









      asked May 17 at 13:01









      Doug O'Neal

      2,5671716




      2,5671716




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          See the epoch (the 1 in 1:1.9.4-21), it overrides your (default) epoch 0 packages.



          The epoch was introduced in rpm packages precisely to be able to "fix" version numbers that go backwards. Use with extreme caution.



          Besides, the RHEL/Centos packages probably include lots of local fixes/tweaks. I'd suggest you start with the official source packages and tweak those, replacing the sources with newer versions as needed.






          share|improve this answer





















          • The official source packages are for php 5.4 - that's a lot of tweaking to bring them up to php 7.2.
            – Doug O'Neal
            May 17 at 17:35










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f444365%2fwhy-is-yum-picking-a-lower-version-to-install%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote



          accepted










          See the epoch (the 1 in 1:1.9.4-21), it overrides your (default) epoch 0 packages.



          The epoch was introduced in rpm packages precisely to be able to "fix" version numbers that go backwards. Use with extreme caution.



          Besides, the RHEL/Centos packages probably include lots of local fixes/tweaks. I'd suggest you start with the official source packages and tweak those, replacing the sources with newer versions as needed.






          share|improve this answer





















          • The official source packages are for php 5.4 - that's a lot of tweaking to bring them up to php 7.2.
            – Doug O'Neal
            May 17 at 17:35














          up vote
          1
          down vote



          accepted










          See the epoch (the 1 in 1:1.9.4-21), it overrides your (default) epoch 0 packages.



          The epoch was introduced in rpm packages precisely to be able to "fix" version numbers that go backwards. Use with extreme caution.



          Besides, the RHEL/Centos packages probably include lots of local fixes/tweaks. I'd suggest you start with the official source packages and tweak those, replacing the sources with newer versions as needed.






          share|improve this answer





















          • The official source packages are for php 5.4 - that's a lot of tweaking to bring them up to php 7.2.
            – Doug O'Neal
            May 17 at 17:35












          up vote
          1
          down vote



          accepted







          up vote
          1
          down vote



          accepted






          See the epoch (the 1 in 1:1.9.4-21), it overrides your (default) epoch 0 packages.



          The epoch was introduced in rpm packages precisely to be able to "fix" version numbers that go backwards. Use with extreme caution.



          Besides, the RHEL/Centos packages probably include lots of local fixes/tweaks. I'd suggest you start with the official source packages and tweak those, replacing the sources with newer versions as needed.






          share|improve this answer













          See the epoch (the 1 in 1:1.9.4-21), it overrides your (default) epoch 0 packages.



          The epoch was introduced in rpm packages precisely to be able to "fix" version numbers that go backwards. Use with extreme caution.



          Besides, the RHEL/Centos packages probably include lots of local fixes/tweaks. I'd suggest you start with the official source packages and tweak those, replacing the sources with newer versions as needed.







          share|improve this answer













          share|improve this answer



          share|improve this answer











          answered May 17 at 16:46









          vonbrand

          13.9k22443




          13.9k22443











          • The official source packages are for php 5.4 - that's a lot of tweaking to bring them up to php 7.2.
            – Doug O'Neal
            May 17 at 17:35
















          • The official source packages are for php 5.4 - that's a lot of tweaking to bring them up to php 7.2.
            – Doug O'Neal
            May 17 at 17:35















          The official source packages are for php 5.4 - that's a lot of tweaking to bring them up to php 7.2.
          – Doug O'Neal
          May 17 at 17:35




          The official source packages are for php 5.4 - that's a lot of tweaking to bring them up to php 7.2.
          – Doug O'Neal
          May 17 at 17:35












           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f444365%2fwhy-is-yum-picking-a-lower-version-to-install%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Christian Cage

          How to properly install USB display driver for Fresco Logic FL2000DX on Ubuntu?