Page 1 of 1
[SOLVED] Package content lists?

Posted:
Mar 4th, '12, 02:47
by scsijon
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
Re: Package content lists?

Posted:
Mar 4th, '12, 03:26
by djennings
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
Re: Package content lists?

Posted:
Mar 4th, '12, 04:54
by scsijon
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
Re: [SOLVED] Package content lists?

Posted:
Mar 4th, '12, 19:04
by doktor5000
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)
Re: [UNSOLVED] Package content lists?

Posted:
Aug 8th, '12, 13:24
by scsijon
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
Re: [UNSOLVED] Package content lists?

Posted:
Aug 8th, '12, 13:58
by tom_
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
Re: [UNSOLVED] Package content lists?

Posted:
Aug 8th, '12, 21:21
by doktor5000
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.
Re: [SOLVED] Package content lists?

Posted:
Aug 10th, '12, 03:52
by scsijon
thank you doctor, were back to solved
