]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
install-deps.sh: only install python-srpm-macros for required macros
authorKefu Chai <kchai@redhat.com>
Sat, 28 Sep 2019 13:34:06 +0000 (21:34 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 28 Sep 2019 14:20:35 +0000 (22:20 +0800)
the reason why we need to install these macros is to solve the
egg-chicken problem -- to set `_python_buildid` and `python3_pkgversion`
so that we can prepare the build dependencies and install them. in which,
`_python_buildid` is defined using `python3_pkgversion`. this macro is
offered by python-srpm-macros.

the other macros, like `python3_sitelib` and `__python3` are offered by
`python3-rpm-macros`.

this change also avoid the issue if we install `*rpm-macros` on CentOS8:

Error:
 Problem: package R-rpm-macros-1.1.0-2.el8.noarch requires /usr/bin/Rscript, but none of the providers can be installed
  - package R-rpm-macros-1.1.0-2.el8.noarch requires R-core, but none of the providers can be installed
  - conflicting requests
  - nothing provides libRblas.so()(64bit) needed by R-core-3.6.1-1.el8.x86_64
  - nothing provides openblas-Rblas needed by R-core-3.6.1-1.el8.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

Signed-off-by: Kefu Chai <kchai@redhat.com>
install-deps.sh

index 18bc62c5f5dc55e8006a0a2ab89ad4ac19cf65c6..cb193366b873f1d88edc72f80fdcd93242135640 100755 (executable)
@@ -394,7 +394,8 @@ else
                 ;;
         esac
         munge_ceph_spec_in $with_seastar $for_make_check $DIR/ceph.spec
-        $SUDO $yumdnf install -y \*rpm-macros
+        # for python3_pkgversion
+        $SUDO $yumdnf install -y python-srpm-macros
         $SUDO $builddepcmd $DIR/ceph.spec 2>&1 | tee $DIR/yum-builddep.out
         [ ${PIPESTATUS[0]} -ne 0 ] && exit 1
        if [ -n "$dts_ver" ]; then