Ralph Angenendt
2017-Mar-14 09:29 UTC
[CentOS] Strange behaviour of yum within %post in kickstart
Hi, (This is happening on CentOS 6) during a machine's kickstart I install several yum repositories which are contained in an RPM. During the %post phase I install an RPM which has a dependency to nodejs. That package with all of its dependencies can be found in EPEL. On the other hand I have the Softwarecollections repository, which also contains nodejs with the same version. Now nodejs has a dependency on libuv: | root at devcma01 ~ # yum deplist nodejs -q --disableexcludes=all | [?] | dependency: libuv.so.0.10()(64bit) | provider: nodejs010-libuv.x86_64 1:0.10.30-1.el6 | provider: libuv.x86_64 1:0.10.34-1.el6 | provider: libuv.x86_64 1:0.10.34-1.el6 As you can see, there are two packages satisfying the dependency. First strange behaviour: | root at devcma01 ~ # yum --disableexcludes=all -v -d9 install nodejs | [?] | nodejs-0.10.48-3.el6.x86_64 requires: libuv.so.0.10()(64bit) | --> Processing Dependency: libuv.so.0.10()(64bit) for package: nodejs-0.10.48-3.el6.x86_64 | Searching pkgSack for dep: libuv.so.0.10()(64bit) | Building updates object | up:simple updates time: 0.010 | up:obs time: 0.014 | up:condense time: 0.000 | updates time: 1.059 | TSINFO: Marking 1:nodejs010-libuv-0.10.30-1.el6.x86_64 as install for nodejs-0.10.48-3.el6.x86_64 | [?] Why is nodejs010-libuv winning over libuv? It has the longer name *and* an inferior version number. Does the amount of "requires" play a role here? | root at devcma01 ~ # repoquery --requires libuv | wc -l | 32 | root at devcma01 ~ # repoquery --requires nodejs010-libuv | wc -l | 15 The solution seems easy: Exclude nodejs010 from softwarecollections: | root at devcma01 /etc/yum.repos.d # grep exclude= * | python27.repo:exclude=nodejs010* Now comes the other strange behaviour. As said: I install that repository during kickstart and then a package gets installed (within %post) that needs nodejs. The installed repo file has the "exclude" line in it. But: | --> Processing Dependency: nodejs for package: is24-statsd-genuine-v0.7.2-677.noarch | ---> Package nodejs.x86_64 0:0.10.48-3.el6 will be installed | --> Processing Dependency: libuv.so.0.10()(64bit) for package: nodejs-0.10.48-3.el6.x86_64 | ---> Package nodejs010-libuv.x86_64 1:0.10.30-1.el6 will be installed It is as if the exclude line isn't even honoured within the %post section of kickstart. Any idea on why that is? Cheers, Ralph
Maybe Matching Threads
- NODEJS010-NPM is not getting installed due to dependency errors on Custom Centos ISO installation
- Anaconda installer fails to install nodejs010 and npm due to dependency error
- CentOS Digest, Vol 140, Issue 1
- Nodejs010 Packages giving unresolved dependency error when building the nodejs packages
- Announcing release for NodeJS 0.10 on CentOS Linux 7 x86_64 SCL