Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] How 2 find pkg of a file, when pkg is not installed
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Waterdevil
Apprentice
Apprentice


Joined: 15 Aug 2017
Posts: 172
Location: LaniakeaHypercluster VirgoSupercluster MilkomedaGroup OrionArm Sector001 GouldBelt SolSystem Austria

PostPosted: Sun Aug 20, 2017 10:36 pm    Post subject: [solved] How 2 find pkg of a file, when pkg is not installed Reply with quote

Hello world,

I know "equery b file", but if a package is not installed and I know only the file, how can i find the package.

For instance emerge is complaining: ld cannot find -lusbredirparser.

So which package contains usbredirparser* or libusbredirparser*?

It seems, that I removed this file from /lib*/, what was a fault.

Many thanks
_________________
_____________________
Aut semper aut numquam

Main-Sys: LianLi modded Big Cube 8000,X11DPG-QT,MEM:64G,LSI 9305,HDD:102TB(16x3T,8x6T,4x1T,1x0,5Tm.2,4x0,5TSSD),nVidia GTX1060,NIC:2x10GbSFP+,Fans:20,PSU:1200W+500W,UPS:APC1500VA,FibreChannel,Tandberg LTO-6


Last edited by Waterdevil on Mon Aug 21, 2017 7:40 am; edited 1 time in total
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9679
Location: almost Mile High in the USA

PostPosted: Sun Aug 20, 2017 11:23 pm    Post subject: Reply with quote

www.google.com

too big? try forums.gentoo.org

:)

But seriously, I don't believe there's a database of files to all packages for Gentoo, it would be something that the developers would have to maintain (though I think it does exist for like debian or ubuntu...). Instead we have to find manually... (How did you get rid of the library and the tracking file at the same time, did you emerge --unmerge something instead of using --depclean?)

However, it's usually a bug if something fails to build by complaining about a missing library like that. Which package is it?

In any case I believe the package that contains libusbredirparser.so is sys-apps/usbredir . If qemu or spice-gtk is not building this properly then it's a bug (make sure you have USE=usbredir enabled first however.)
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


Joined: 30 Aug 2008
Posts: 2034
Location: United Kingdom

PostPosted: Sun Aug 20, 2017 11:40 pm    Post subject: Reply with quote

Well, there is app-portage/pfl, a 'Searchable online file/package database for Gentoo':

http://www.portagefilelist.de/site/start

Quote:
What is Portage File List?

Portage File List collects which files are installed by which ebuild on users machines. It shares this data publicly for searching/browsing.

It allows user to search for files that are not installed on their system and figure out which ebuild they need to install in order to obtain it.

Let's make a short example: You want to use the command brctl, but it's not installed on your system. Portage offers no way for you to figure out the name of the ebuild. You have to guess. Or you can search PFL and hope that someone else has installed brctl and thus PFL knows which ebuild does that.

Try it: query Portagefilelist for brctl
Apparently the ebuild is net-misc/bridge-utils.


Trouble is, it does not find a package in this specific case unless you enter the precise file name:

Code:
# e-file libusbredirparser
No matches found.
# e-file usbredirparser
No matches found.
# e-file libusbredirparser.so
 *  sys-apps/usbredir
   Available Versions:   0.7.1 0.7 0.7.1_p20170503
   Matched Files:      /usr/lib64/libusbredirparser.so; /usr/lib/libusbredirparser.so;

_________________
Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21633

PostPosted: Sun Aug 20, 2017 11:58 pm    Post subject: Reply with quote

If you unlinked the file, but did not uninstall the package that provides it, then equery belongs will still work. That relies on the package CONTENTS file, not the installed files.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9679
Location: almost Mile High in the USA

PostPosted: Mon Aug 21, 2017 1:32 am    Post subject: Reply with quote

Oh cool... pfl... I guess this works too, though it would have been nice if there was a database maintained by the devs (so we don't have to send people our world files... just a privacy thing.)

Then again, it might actually be beneficial for the devs to have our world file data so they know who still is using each package.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Waterdevil
Apprentice
Apprentice


Joined: 15 Aug 2017
Posts: 172
Location: LaniakeaHypercluster VirgoSupercluster MilkomedaGroup OrionArm Sector001 GouldBelt SolSystem Austria

PostPosted: Mon Aug 21, 2017 5:06 am    Post subject: Reply with quote

@eccerr0r
I googled two weeks long without finding a solution.
Many thanks - emerge -1 sys-apps/usbredir and USE+="usbredir" could solve the problem, which I had with xen-tools.

@Fitzcarraldo
Very cool - thank you for pfl

@Hu
But not in my case - I had other issues and followed someone from google, who wrote one should rm -Rf /usr/lib*; rm -Rf /usr/portage ... - silly me.
_________________
_____________________
Aut semper aut numquam

Main-Sys: LianLi modded Big Cube 8000,X11DPG-QT,MEM:64G,LSI 9305,HDD:102TB(16x3T,8x6T,4x1T,1x0,5Tm.2,4x0,5TSSD),nVidia GTX1060,NIC:2x10GbSFP+,Fans:20,PSU:1200W+500W,UPS:APC1500VA,FibreChannel,Tandberg LTO-6
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21633

PostPosted: Tue Aug 22, 2017 12:29 am    Post subject: Reply with quote

Your post said you removed the file, in which case equery should still work. I interpreted your initial question as believing that equery could only work when the package was both installed and intact. equery requires the package to be installed and the metadata intact, but the installed files can be damaged or missing and it can still use the metadata to answer your queries.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum