You are not logged in.

#1 2011-02-25 00:31:16

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

[SOLVED] Finding to which package belong an uninstalled file

To be able to do what the title suggest would be useful. Sometimes we know for some reason we need a given file and it would be useful to have an easy way to find the package providing it. I think it would be nice to implement this feature in pacman.

I have done a script for myself that do the trick (with the help of <repo>.files.tar.gz available on the repositories). But my script is not worth submitting (no documentation, no proper formating of the result, no options, hardcoded mirror repository within the script, etc. I could post it if someone does really want it).

Last edited by olive (2011-02-25 12:49:48)

Offline

#2 2011-02-25 00:39:32

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,362

Re: [SOLVED] Finding to which package belong an uninstalled file

pkgfile -s <path you're searching>


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#3 2011-02-25 03:53:47

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: [SOLVED] Finding to which package belong an uninstalled file

Will you please share the script? Thank you.

Offline

#4 2011-02-25 04:04:47

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,672
Website

Re: [SOLVED] Finding to which package belong an uninstalled file

pacman -S pkgtools

Offline

#5 2011-02-25 05:12:54

hoffman
Member
Registered: 2011-02-13
Posts: 14

Re: [SOLVED] Finding to which package belong an uninstalled file

e.......I got an error when i try to run pkgfile --update after i install it successfully.
the error message is following:

Traceback (most recent call last):
  File "/usr/bin/pkgfile", line 36, in <module>
    import pkgfile
ImportError: No module named pkgfile

can anyone help?

Offline

#6 2011-02-25 05:39:46

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,362

Re: [SOLVED] Finding to which package belong an uninstalled file

hoffman wrote:

e.......I got an error when i try to run pkgfile --update after i install it successfully.
the error message is following:

Traceback (most recent call last):
  File "/usr/bin/pkgfile", line 36, in <module>
    import pkgfile
ImportError: No module named pkgfile

can anyone help?

Are you fully updated?


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#7 2011-02-25 12:49:21

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: [SOLVED] Finding to which package belong an uninstalled file

ngoonee wrote:

pkgfile -s <path you're searching>

Indeed. To reply to another post, I assume there is no need to share my script.

Offline

#8 2011-02-27 10:34:12

hoffman
Member
Registered: 2011-02-13
Posts: 14

Re: [SOLVED] Finding to which package belong an uninstalled file

ngoonee wrote:
hoffman wrote:

e.......I got an error when i try to run pkgfile --update after i install it successfully.
the error message is following:

Traceback (most recent call last):
  File "/usr/bin/pkgfile", line 36, in <module>
    import pkgfile
ImportError: No module named pkgfile

can anyone help?

Are you fully updated?

o,sorry for that.I find that there were some inter-conflicts in my system between python and python2,so I update python.pkgfile could work now.

Offline

#9 2011-02-27 14:34:11

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,362

Re: [SOLVED] Finding to which package belong an uninstalled file

hoffman wrote:
ngoonee wrote:
hoffman wrote:

e.......I got an error when i try to run pkgfile --update after i install it successfully.
the error message is following:

Traceback (most recent call last):
  File "/usr/bin/pkgfile", line 36, in <module>
    import pkgfile
ImportError: No module named pkgfile

can anyone help?

Are you fully updated?

o,sorry for that.I find that there were some inter-conflicts in my system between python and python2,so I update python.pkgfile could work now.

It sounds like you're selectively updating. Don't do that. Run a full -Syu.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#10 2011-02-28 04:08:45

hoffman
Member
Registered: 2011-02-13
Posts: 14

Re: [SOLVED] Finding to which package belong an uninstalled file

fully updating will cause system crash sometimes and need more time.

Offline

#11 2011-02-28 04:29:20

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,672
Website

Re: [SOLVED] Finding to which package belong an uninstalled file

Partial updating is much, much more likely to cause brakages

Offline

#12 2011-02-28 05:03:24

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,362

Re: [SOLVED] Finding to which package belong an uninstalled file

Allan wrote:

Partial updating is much, much more likely to cause brakages

This. If you partially update, please do not ask for support here, because detecting the breakages you have introduced by your own actions is quite difficult.

Always -Syu.

P.S. - Allan, +1!


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#13 2011-03-01 09:34:10

hoffman
Member
Registered: 2011-02-13
Posts: 14

Re: [SOLVED] Finding to which package belong an uninstalled file

Good Reason!At lease I ensure it's not my fault by updating partially.
I will do -Syu
thx.

Offline

Board footer

Powered by FluxBB