Why dpkg --search does not show certain files?

Asked by lucio messina on 2014-07-01

Hi all.
I'm Italian and I don't speak english very well.

I noticed that the command `dpkg --search` does not find the package of some files.
For example, I've installed misqui from here: https://launchpad.net/~lucio-messina-w/+archive/ppa in Ubuntu 12.04 64bit
The package installed many files souch as:

/usr/games/misqui
/usr/local/share/applications/misqui.desktop
/usr/local/share/misqui/*

But when querying dpkg --search I got this output:

$ dpkg --search /usr/local/share/misqui/texture/dr.bmp
dpkg-query: non รจ stato trovato alcun percorso corrispondente al modello /usr/local/share/misqui/texture/dr.bmp. #that means "not found"
$ dpkg --search /usr/games/misqui
misqui: /usr/games/misqui

In the Makefile, misqui installs everithing in /usr/share/, but files are put in /usr/*local*/share/ (maybe by maintainer script?).
From the manpage of dpkg-query: "This command will not list extra files created by maintainer scripts, nor will it list alternatives"

Why dpkg has that strange behaviour?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu dpkg Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Maciej Suminski (orsonmmz) said : #1

Hi Lucio,

I guess you have posted your question to the wrong project.

Regards,
Orson

Hi Orson.
I know, that's why I posted this question after searching.

moved in "Ubuntu dpkg".

Bye, and sorry.
Lucio

Try:

dpkg -S dr.bmp
dpkg -S misqui

Manfred Hampl (m-hampl) said : #4

Are you sure that you have installed the package with the standard package management tools (apt, dpkg) using the .deb file from that source? As far as I can see, the package will install files in /usr/share/, but not in /usr/local/share/. So if you have the files in that other directory, they must have come from somewhere else.

What is the output of the terminal commands

dpkg-query -S '*misqui*'
sudo updatedb
locate misqui

I removed all files in /usr/local/share and re-installed the package.
New files went in /usr/share as expected:

$ dpkg -S misqui
misqui: /usr/games/misqui
misqui: /usr/share/misqui/texture/yl.bmp
misqui: /usr/share/misqui
misqui: /usr/share/misqui/texture
misqui: /usr/share/doc/misqui/changelog.Debian.gz
misqui: /usr/share/misqui/texture/dr.bmp
misqui: /usr/share/doc/misqui
misqui: /usr/share/misqui/texture/texture_finale.xcf
misqui: /usr/share/misqui/database.txt
misqui: /usr/share/misqui/texture/sotto.bmp
misqui: /usr/share/pixmaps/misqui.svg
misqui: /usr/share/doc/misqui/copyright
misqui: /usr/share/applications/misqui.desktop
misqui: /usr/share/misqui/texture/yw.bmp
misqui: /usr/share/misqui/texture/texture.png

That means files in /usr/local/share come from somewhere else, that I do not remember.

Sorry for wasting your time, and thank you.
Lucio

Thanks actionparsnip, that solved my question.