searching for a particular file

Vincent Danen vdanen at annvix.org
Sat May 27 11:53:40 PDT 2006


* Panu Matilainen <pmatilai at laiskiainen.org> [2006-05-27 21:13:18 +0300]:

> > 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 :)

=)  Fair enough.  I've managed to work around it, to some degree, on the
assumption that xx_YY will always belong to package locales-xx.  Not
quite what I would want, but good enough for now.

I'm also not using repmod here, but using the apt tools to generate a
pure apt repository.

-- 
Annvix - Secure Linux Server: http://annvix.org/
"lynx -source http://linsec.ca/vdanen.asc | gpg --import"
{FEE30AD4 : 7F6C A60C 06C2 4811 FA1C  A2BC 2EBC 5E32 FEE3 0AD4}
Wasting time like it was free...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
URL: <http://lists.laiskiainen.org/pipermail/apt-rpm-laiskiainen.org/attachments/20060527/fdf4d553/attachment-0003.pgp>


More information about the Apt-Rpm mailing list