[SOLVED] Package content lists?

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] Package content lists?

Postby scsijon » Mar 4th, '12, 02:47

Hi, I'm trying to backtrace a package name.

The contents can be found in /usr/share/Zoneinfo and is there.

However I can't seem to find anywhere in the system a .packages directory that lists packages and their installed contents.

In this case it's required for a coming 'summertime' change for a small area to match that across the river and will be a 'trial only'.

thanks

scsijon
Last edited by scsijon on Aug 10th, '12, 03:50, edited 3 times in total.
scsijon
 
Posts: 18
Joined: Jan 25th, '12, 00:50
Location: Victoria's Mallee, Australia

Re: Package content lists?

Postby djennings » Mar 4th, '12, 03:26

To list installed packages
Code: Select all
rpm -qa


To list contents of a package
Code: Select all
urpmq -l packagename



To display the package a file or just part of a file name belongs to
Code: Select all
urpmf  string


So for example
Code: Select all
urpmf share/zoneinfo


returns the package name 'timezone'
See 'man urpmi' and associated commands
User avatar
djennings
 
Posts: 613
Joined: Jun 2nd, '11, 23:51
Location: Wokingham, UK

Re: Package content lists?

Postby scsijon » Mar 4th, '12, 04:54

thanks for all that, although use to rpm from SuSE days, urpm seems to be a big step up. I shall investigate further.

thanks again
scsijon
scsijon
 
Posts: 18
Joined: Jan 25th, '12, 00:50
Location: Victoria's Mallee, Australia

Re: [SOLVED] Package content lists?

Postby doktor5000 » Mar 4th, '12, 19:04

You can also tho which package a file belongs via f.ex.
Code: Select all
rpm -qf /usr/share/Zoneinfo

(but depending on the package quality, it may not work on directories, but only on files)
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18058
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [UNSOLVED] Package content lists?

Postby scsijon » Aug 8th, '12, 13:24

Sorry, i've had to unsolve this as I've picked up a confusion.

I've tried:

rpm -qa /usr/lib/libaudio.so.2.4
urpmf /usr/lib/libaudio.so.2.4

and a couple of others by using sugestions from the --help's

in all cases i've got just another prompt or the help file.

and all i want is the package name

any further ideas or an I doing it wrong

thanks
scsijon
scsijon
 
Posts: 18
Joined: Jan 25th, '12, 00:50
Location: Victoria's Mallee, Australia

Re: [UNSOLVED] Package content lists?

Postby tom_ » Aug 8th, '12, 13:58

scsijon wrote:I've tried:

rpm -qa /usr/lib/libaudio.so.2.4


the suggested command was a bit different, try

rpm -qf /usr/lib/libaudio.so.2.4


for example I have:

Code: Select all
$ rpm -qf /usr/lib/libpthread.so
glibc-devel-2.14.1-8.mga2
tom_
 
Posts: 423
Joined: Sep 3rd, '11, 12:26
Location: Porto Ercole, Italy

Re: [UNSOLVED] Package content lists?

Postby doktor5000 » Aug 8th, '12, 21:21

FWIW, a short explanation:

rpm -qa shows all installed packages, normal use case is rpm -qa | grep -i packagename to see if "packagename" is installed.
rpm -qf /path/to/some/file shows to which installed package /path/to/some/file belongs. This needs the absolute path
urpmf /path/to/some/file queries all enabled repositories, and shows in which package /path/to/some/file can be found. Useful for searching for filenames without a full path, f.ex.

If you want to know more, just ask.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18058
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [SOLVED] Package content lists?

Postby scsijon » Aug 10th, '12, 03:52

thank you doctor, were back to solved :D
scsijon
 
Posts: 18
Joined: Jan 25th, '12, 00:50
Location: Victoria's Mallee, Australia


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest