FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 06-04-2011, 01:37 AM
JD
 
Default looking for rpm/yum database utility

On 06/03/11 18:25, Robert G. (Doc) Savage wrote:
> Is there a utility for either rpm or yum that can read its corresponding
> database and report which repo an installed package came from?
>
> --Doc Savage
> Fairview Heights, IL
>
Well if you do

yum list installed pkgname.rpm

it will tell you where it came from.
For example:

$ yum list installed kernel
Loaded plugins: auto-update-debuginfo, langpacks, presto, priorities,
refresh-
: packagekit
Installed Packages
kernel.i686 2.6.35.13-91.fc14
@updates

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 06-04-2011, 01:39 AM
Sam Varshavchik
 
Default looking for rpm/yum database utility

Robert G. (Doc) Savage writes:


Is there a utility for either rpm or yum that can read its corresponding
database and report which repo an installed package came from?


Look at "From repo" in the output of "yum info packagename".

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 06-04-2011, 02:41 AM
"Robert G. (Doc) Savage"
 
Default looking for rpm/yum database utility

On Fri, 2011-06-03 at 18:37 -0700, JD wrote:
> On 06/03/11 18:25, Robert G. (Doc) Savage wrote:
> > Is there a utility for either rpm or yum that can read its corresponding
> > database and report which repo an installed package came from?
> >
> > --Doc Savage
> > Fairview Heights, IL
> >
> Well if you do
>
> yum list installed pkgname.rpm
>
> it will tell you where it came from.
> For example:
>
> $ yum list installed kernel
> Loaded plugins: auto-update-debuginfo, langpacks, presto, priorities,
> refresh-
> : packagekit
> Installed Packages
> kernel.i686 2.6.35.13-91.fc14
> @updates

Sam & JD,

I must apologize for asking this question to the wrong list. I knew the
Fedora version does this. What I'm actually looking for is that same
repo info for a RHEL5 system with some additional packages sourced from
RHN, EPEL, CentOS, RPMFusion, ElRepo, Adobe, and some other cats & dogs.
The RHEL5 version of yum simply tells me "installed".

--Doc

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 06-04-2011, 02:54 AM
JD
 
Default looking for rpm/yum database utility

On 06/03/11 19:41, Robert G. (Doc) Savage wrote:
> On Fri, 2011-06-03 at 18:37 -0700, JD wrote:
>> On 06/03/11 18:25, Robert G. (Doc) Savage wrote:
>>> Is there a utility for either rpm or yum that can read its corresponding
>>> database and report which repo an installed package came from?
>>>
>>> --Doc Savage
>>> Fairview Heights, IL
>>>
>> Well if you do
>>
>> yum list installed pkgname.rpm
>>
>> it will tell you where it came from.
>> For example:
>>
>> $ yum list installed kernel
>> Loaded plugins: auto-update-debuginfo, langpacks, presto, priorities,
>> refresh-
>> : packagekit
>> Installed Packages
>> kernel.i686 2.6.35.13-91.fc14
>> @updates
> Sam& JD,
>
> I must apologize for asking this question to the wrong list. I knew the
> Fedora version does this. What I'm actually looking for is that same
> repo info for a RHEL5 system with some additional packages sourced from
> RHN, EPEL, CentOS, RPMFusion, ElRepo, Adobe, and some other cats& dogs.
> The RHEL5 version of yum simply tells me "installed".

Well what you describe as "what you are looking for"
is clear as mud to me

Can you give some examples of what sort of output
you are looking for??

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 06-04-2011, 03:23 AM
suvayu ali
 
Default looking for rpm/yum database utility

On Fri, Jun 3, 2011 at 7:41 PM, Robert G. (Doc) Savage
<dsavage@peaknet.net> wrote:
> Sam & JD,
>
> I must apologize for asking this question to the wrong list. I knew the
> Fedora version does this. What I'm actually looking for is that same
> repo info for a RHEL5 system with some additional packages sourced from
> RHN, EPEL, CentOS, RPMFusion, ElRepo, Adobe, and some other cats & dogs.
> The RHEL5 version of yum simply tells me "installed".

Maybe you could parse the output of rpm -qi and get something useful out of it?

--
Suvayu

Open source is the future. It sets us free.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 06-07-2011, 01:15 PM
"Bryn M. Reeves"
 
Default looking for rpm/yum database utility

On 06/04/2011 04:23 AM, suvayu ali wrote:
> On Fri, Jun 3, 2011 at 7:41 PM, Robert G. (Doc) Savage
> <dsavage@peaknet.net> wrote:
>> Sam & JD,
>>
>> I must apologize for asking this question to the wrong list. I knew the
>> Fedora version does this. What I'm actually looking for is that same
>> repo info for a RHEL5 system with some additional packages sourced from
>> RHN, EPEL, CentOS, RPMFusion, ElRepo, Adobe, and some other cats & dogs.
>> The RHEL5 version of yum simply tells me "installed".
>
> Maybe you could parse the output of rpm -qi and get something useful out of it?
>

Why parse things when you can just ask for the information from RPM in the
format you'd like it?

The rpm command allows you to list the available query tags (fields) and then
construct custom query formats on the command line:

$ rpm --querytags | wc -l
183
$ rpm --querytags | head
ARCH
ARCHIVESIZE
BASENAMES
BUGURL
BUILDARCHS
BUILDHOST
BUILDTIME
C
CHANGELOGNAME
CHANGELOGTEXT

Anyway, in this case I don't think it'll help directly as the package
installation repo is not stored in the database (rpm doesn't know anything about
yum or repositories) but is retrieved from the yum metadata.

I think that yum-utils and repoquery are available for RHEL5 (in EPEL iirc) so
maybe you can do something with that.

Failing that if you just want to differentiate the list of vendors above you can
probably do this via the RPM Vendor tag instead. Doing this on my f15 box I see:

$ rpm -qa --queryformat "%{VENDOR}
" | sort | uniq
Fedora Project
(none)
Red Hat, Inc.
RPM Fusion

Then you can break that out by vendor by adding in the name and grepping:

$ rpm -qa --queryformat "%{NAME} %{VENDOR}
" | grep '(none)'
gpg-pubkey (none)
bibble5 (none)
chromium-libs (none)
kmod-nvidia-2.6.38.6-26.rc1.fc15.x86_64 (none)
gpg-pubkey (none)
kmod-nvidia-2.6.38.3-18.fc15.x86_64 (none)
gpg-pubkey (none)
v8 (none)
gpg-pubkey (none)
chromium (none)
kmod-nvidia-2.6.38.5-22.fc15.x86_64 (none)
gpg-pubkey (none)

Not ideal I know but it may still be useful enough - e.g. all those
"gpg-pubkey"s are a bit annoying - the summary field reveals more than the other
headers in that case:

$ rpm -q gpg-pubkey | xargs rpm -q --queryformat '%{SUMMARY}
'
gpg(Fedora (15) <fedora@fedoraproject.org>)
gpg(RPM Fusion nonfree repository for Fedora (14)
<rpmfusion-buildsys@lists.rpmfusion.org>)
gpg(RPM Fusion nonfree repository for Fedora (15)
<rpmfusion-buildsys@lists.rpmfusion.org>)
gpg(RPM Fusion free repository for Fedora (14)
<rpmfusion-buildsys@lists.rpmfusion.org>)
gpg(RPM Fusion free repository for Fedora (15)
<rpmfusion-buildsys@lists.rpmfusion.org>)

Regards,
Bryn.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 06-07-2011, 03:36 PM
suvayu ali
 
Default looking for rpm/yum database utility

On Tue, Jun 7, 2011 at 6:15 AM, Bryn M. Reeves <bmr@redhat.com> wrote:
> Why parse things when you can just ask for the information from RPM in the
> format you'd like it?
>
> The rpm command allows you to list the available query tags (fields) and then
> construct custom query formats on the command line:

For some reason I keep forgetting about query tags! Thanks for
reminder and those very nice examples.

--
Suvayu

Open source is the future. It sets us free.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 

Thread Tools




All times are GMT. The time now is 07:17 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org