Chris Grau wrote:
It does appear to be a Fedora vs. RHEL issue.  No RPM package actually
provides g++.  Instead, it provides /usr/bin/g++.  On RHEL's version of
Yum, the provides command appears to use an implied glob pattern of
*g++*.  However, Fedora's version of Yum only uses the pattern given as
an argument.  Based on what I know of Yum's development, I'd guess that
was a change that happened in Yum 3.1+.  In Fedora, either of the
following will work.

    $ sudo yum provides /usr/bin/g++

    $ sudo yum provides '*/g++'

The second is useful when you don't actually know where the file will be
installed.  Both should be run as root, since the file cache will need
to be downloaded and cached (why Yum can't cache to a temporary
location, I don't know).

Thank you for that detail Chris.

# yum whatprovides '*/g++'
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
livna 100% |=========================| 2.1 kB 00:00 fedora 100% |=========================| 2.1 kB 00:00 adobe-linux 100% |=========================| 951 B 00:00 dribble 100% |=========================| 951 B 00:00 primary.xml.gz 100% |=========================| 24 kB 00:00 dribble : ################################################## 84/84 rpmforge 100% |=========================| 951 B 00:00 updates 100% |=========================| 2.3 kB 00:00 freshrpms 100% |=========================| 2.1 kB 00:00 filelists.sqlite.bz2 100% |=========================| 4.6 MB 00:59 filelists.xml.gz 100% |=========================| 44 kB 00:01 ccache.i386 : C/C++ compiler cache
gcc-c++.i386 : C++ support for GCC
ccache.i386 : Compiler cache
gcc-c++.i386 : C++ support for GCC
gcc-c++.i386 : C++ support for GCC

I also tried:
yum whatprovides */g++
(without quotes) getting identical results, as well as:
yum whatprovides *g++*
yum whatprovides '*g++*'
yum whatprovides '*g++'
yum whatprovides *g++
each of which provide more false positive matches. I don't know the purpose of the quotes, but at least in this case (in my bash shell), the quotes didn't seem to make a difference in any of the combinations I tried.


--
Ralph

--------------------
The spelling of words is subordinate. Morbidness for nice spelling and tenacity 
for or against one letter or so means dandyism and impotence in literature.
--Walt Whitman


--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to