searching for a particular file
Panu Matilainen
pmatilai at laiskiainen.org
Sat May 27 11:13:18 PDT 2006
On Sat, 2006-05-27 at 11:13 -0600, Vincent Danen wrote:
> With urpmi, you can use the tool urpmf to find what package contains a
> certain file. For instance:
>
> urpmf "/usr/share/locale/en$"
>
> will tell me what package contains this directory (or owns it), such as:
>
> [root at build installer]# urpmf "/usr/share/locale/en$"
> locales-en:/usr/share/locale/en
>
> Is there an equivalent in apt? I thought apt-cache would do it but:
>
> [root at build installer]# apt-cache search "/usr/share/locale/en$"
> [root at build installer]#
>
> Looks like it only does package names:
>
> [root at build installer]# apt-cache search locales-en
> locales-en - Base files for localization (English)
>
> Now, this is fine, except that when I'm asking a user for their locale
> during installation, I used urpmf to make sure it was valid. If it was
> strictly "en" or "ru", etc. I could use the above and just change it to
> something like "apt-cache search locales-${locale}" but that doesn't
> help for things like "en_US" (apt-cache will return nothing, but it is
> valid), and urpmf will find it:
>
> [root at build installer]# urpmf "/usr/share/locale/en_US$"
> locales-en:/usr/share/locale/en_US
>
> Is there something like that for apt? I looked at the other apt-cache
> options, but none of them seemed to fit.
There's no direct equivalent at the moment I'm afraid.
You can use eg 'apt-get install /usr/share/locale/en_US' to find out
what package something belongs to but it's cumbersome and doesn't really
work with repomd (it only looks at a subset of files with repomd, with
other types it's fully supported)
Fixing these things is in the ever growing todo-list :)
- Panu -
More information about the Apt-Rpm
mailing list