[scl.org] Question about generating RPMs that depend on SCLs (like python27)

Bohuslav Kabrda bkabrda at redhat.com
Fri Jul 18 07:29:32 UTC 2014


----- Original Message -----
> Python 2.6 is required by ThingsInTheUniverse:
> 
> bash-4.1# rpm --erase python
> error: Failed dependencies:
>          python(abi) = 2.6 is needed by (installed)
> python-libs-2.6.6-52.el6.x86_64
>          python(abi) = 2.6 is needed by (installed)
> pygpgme-0.1-18.20090824bzr68.el6.x86_64
>          python(abi) = 2.6 is needed by (installed)
> python-pycurl-7.19.0-8.el6.x86_64
>          python(abi) = 2.6 is needed by (installed)
> python-urlgrabber-3.9.1-9.el6.noarch
>          python(abi) = 2.6 is needed by (installed)
> rpm-python-4.8.0-37.el6.x86_64
>          python(abi) = 2.6 is needed by (installed)
> python-iniparse-0.3.1-2.1.el6.noarch
>          python(abi) = 2.6 is needed by (installed)
> yum-metadata-parser-1.1.2-16.el6.x86_64
>          python(abi) = 2.6 is needed by (installed)
> yum-3.2.29-43.el6.centos.noarch
>          python(abi) = 2.6 is needed by (installed)
> mercurial-1.4-3.el6.x86_64
>          python-sqlite is needed by (installed)
> yum-3.2.29-43.el6.centos.noarch
>          python >= 2.4 is needed by (installed)
> yum-3.2.29-43.el6.centos.noarch
>          python is needed by (installed) mercurial-1.4-3.el6.x86_64
>          /usr/bin/python is needed by (installed)
> python-urlgrabber-3.9.1-9.el6.noarch
>          /usr/bin/python is needed by (installed)
> yum-3.2.29-43.el6.centos.noarch
>          /usr/bin/python is needed by (installed) gettext-0.17-16.el6.x86_64
>          /usr/bin/python is needed by (installed)
> nfs-utils-1:1.2.3-39.el6.x86_64
>          /usr/bin/python is needed by (installed)
> redhat-lsb-core-4.0-7.el6.centos.x86_64
>          /usr/bin/python is needed by (installed) mercurial-1.4-3.el6.x86_64
>          /usr/bin/python is needed by (installed)
> glib2-devel-2.26.1-7.el6_5.x86_64
> 
> Like, for example -- yum -- and glib2-devel (which I require), and
> gettext - so removing it is out of the question.
> 
> I've attached my current spec file.  The problem seems to be this:
>      The pre-existing python automatic-dependency generator thinks I
> need python(abi) = 2.7.
>      But the python27 package supplies python27-python(abi) = 2.7.
> 
> So, I need to do one of two things:
>      1) turn off automatic dependency generation for python
>      2) Force a different automatic dependency generation process to be
> used (one that is python27 aware)
>              WITHOUT removing the "standard" RHEL6 python (which can't
> be done).
> 
> Does anyone know how to do either thing?

I don't think you can turn it off, but you could probably filter it out. Anyway, I wrote about the custom generators in collections and how to use them in my previous mail [1]

Hope this helps,
Slavek

[1] https://www.redhat.com/archives/sclorg/2014-July/msg00031.html

> The first alternative seems to be the easier one,
> 
> 
> 
> 
> On 07/16/2014 02:01 AM, Honza Horak wrote:
> > On 07/16/2014 06:29 AM, Alan Robertson wrote:
> >> So, I'm trying to take the page you pointed at seriously - so I added
> >> this line from that page:
> >>
> >> BuildRequires: scl-utils-build
> >>
> >>
> >> There is no such package.  What was intended here?
> >
> > This package is included in optional channel, but you shouldn't need
> > it, because you are preparing non-SCL package and scl-utils-build is
> > intended only for building SCL packages.
> >
> > Anyway, what is obviously wrong in your case is generating the python
> > requirements. These generators are delivered in python-devel and
> > python27-python-devel packages. So, if I'm not mistaken, your package
> > (and building environment) must include python27-python-devel but not
> > python-devel. In spec file you should have:
> >   BuildRequires: python27-python-devel
> >
> > But be careful about packages installed during building (if you build
> > in your working environment), since I'm not sure which package gets
> > preference in case both python-devel and python27-python-devel are
> > installed.
> >
> > Regards,
> > Honza
> >
> >>
> >>
> >> On 07/15/2014 04:09 PM, Orion Poplawski wrote:
> >>> On 07/15/2014 04:06 PM, Orion Poplawski wrote:
> >>>> On 07/15/2014 03:55 PM, Alan Robertson wrote:
> >>>>> OK.  It was pointed out to me off-list that I was comparing the
> >>>>> wrong thing.
> >>>>> I should have been looking at python27-python.  Here's what that
> >>>>> package shows:
> >>>>>
> >>>>> bash-4.1# *rpm -q --provides python27-python*
> >>>>> python27-python-abi = 2.7
> >>>>> python27-python(abi) = 2.7
> >>>>> python27-Distutils
> >>>>> python27-python2 = 2.7.5
> >>>>> python27-python-sqlite = 2.3.2
> >>>>> python27-python-ctypes = 1.0.1
> >>>>> python27-python-hashlib = 20081120
> >>>>> python27-python-uuid = 1.31
> >>>>> python27-python-argparse = 2.7.5-7.el6.centos.alt
> >>>>> python27-python = 2.7.5-7.el6.centos.alt
> >>>>> python27-python(x86-64) = 2.7.5-7.el6.centos.alt
> >>>>> bash-4.1#
> >>>>>
> >>>>> Either I'm failing to do something to appease the automagical
> >>>>> python-version
> >>>>> detection (which I have no idea how it figures that out), or the
> >>>>> property
> >>>>> names in python27-python should not have the "python27-" prefix.
> >>>>>
> >>>>> Anyone know which it is - and how to deal with it?
> >>>>>
> >>>>> It seems to me like the attributes of the provides should not be
> >>>>> prefixed by
> >>>>> python27.  But I'm new to this SCL stuff...
> >>>>
> >>>> FWIW - they "python(abi) = ##" requires is added by
> >>>> /usr/lib/rpm/pythondeps.sh
> >>>> as part of the standard rpm dependency generation.  So yes, for this
> >>>> to work
> >>>> with the scl, either the scl needs to provide "python(abi) = 2.7" or
> >>>> you will
> >>>> need to disable the automatic requires generation or filter out the
> >>>> python(abi) line.
> >>>>
> >>>> We're all new to this SCL stuff.... :)
> >>>>
> >>>>
> >>>
> >>> Here's the magic from
> >>> https://access.redhat.com/documentation/en-US/Red_Hat_Developer_Toolset/2/html/Software_Collections_Guide/sect-Extending_the_python27_and_python33_Software_Collections.html
> >>>
> >>>
> >>>
> >>> # Similarly, override __python_requires for automatic dependency
> >>> generator
> >>> %global __python_requires %{%{scl_python}_python_requires}
> >>>
> >>>
> >>
> >>
> >> --
> >>      Alan Robertson<alanr at unix.sh>  - @OSSAlanR
> >>
> >> "Openness is the foundation and preservative of friendship... Let me
> >> claim from you at all times your undisguised opinions." - William
> >> Wilberforce
> >>
> >
> 
> 
> --
>      Alan Robertson <alanr at unix.sh> - @OSSAlanR
> 
> "Openness is the foundation and preservative of friendship...  Let me claim
> from you at all times your undisguised opinions." - William Wilberforce
> 
> 

-- 
Regards,
Bohuslav "Slavek" Kabrda.




More information about the SCLorg mailing list