Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How 2 get 2 installed pkg ebuild ?[Solved][diy & std]
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
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3623

PostPosted: Sun Jan 05, 2020 7:04 am    Post subject: How 2 get 2 installed pkg ebuild ?[Solved][diy & std] Reply with quote

I find it quite unconfortable to type the whole path to a ebuild file when I want to display or view it.

Is there any command from portage stack to ease the process?

Thks 4 ur attention.


Last edited by CaptainBlood on Mon Jan 06, 2020 8:45 am; edited 2 times in total
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2719

PostPosted: Sun Jan 05, 2020 7:22 am    Post subject: Reply with quote

To keep it simple can just use "equery w", I have that small script myself:
Code:
#!/bin/bash
EBUILD=`equery w "$@"`
[ -n "$EBUILD" ] || exit 1
[ -n "$EDITOR" ] || EDITOR=cat
exec $EDITOR "$EBUILD"
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3623

PostPosted: Sun Jan 05, 2020 9:47 am    Post subject: Reply with quote

Nifty indeed! :)
Was lazy enough not to take a couple of hours to find out how, ending likely less clever than you. :lol:

Thks 4 ur attention, interest & support.
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30916
Location: here

PostPosted: Sun Jan 05, 2020 10:45 am    Post subject: Reply with quote

If you want only dispaly you can use also option -e
Code:
$ equery w -e <package> | less

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
proteusx
Guru
Guru


Joined: 21 Jan 2008
Posts: 338

PostPosted: Mon Jan 06, 2020 1:41 am    Post subject: Reply with quote

I use app-portage/esearch for this.
Code:
~ # esearch -e gvim
 [ U] app-editors/gvim (8.2.0055):  GUI version of the Vim text editor
 Portage     [1] gvim-8.1.1486

 Portage     [2] gvim-8.1.1846

 Portage     [3] gvim-8.2.0055

 Portage     [4] gvim-9999


Show Ebuild

And then type the number of the ebuild I wish to inspect/edit and it opens it with my $EDITOR.
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3623

PostPosted: Mon Jan 06, 2020 7:53 am    Post subject: Reply with quote

proteusx wrote:
I use app-portage/esearch for this.
Requires execution of eupdatedb after install, which is likely to be executed resync@portagen though.
Thks 4 ur attention, interest & support.


Last edited by CaptainBlood on Mon Jan 06, 2020 8:14 am; edited 1 time in total
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3623

PostPosted: Mon Jan 06, 2020 8:13 am    Post subject: Reply with quote

Additionally 'eupdatedb' may brake, and fail, when detecting error in an ebuild:
Code:
eupdatedb
 * indexing: 21418 ebuilds to goTraceback (most recent call last):
  File "/usr/lib/python-exec/python3.6/eupdatedb", line 5, in <module>
    main()
  File "/usr/lib64/python3.6/site-packages/esearch/update.py", line 268, in main
    success = updatedb(config)
  File "/usr/lib64/python3.6/site-packages/esearch/update.py", line 183, in updatedb
    pkgv = portage.portdb.xmatch("bestmatch-visible", pkg)
  File "/usr/lib64/python3.6/site-packages/portage/dbapi/porttree.py", line 1093, in xmatch
    self.async_xmatch(level, origdep, loop=loop))
  File "/usr/lib64/python3.6/site-packages/portage/util/_eventloop/EventLoop.py", line 833, in run_until_complete
    return future.result()
  File "/usr/lib64/python3.6/site-packages/portage/util/futures/compat_coroutine.py", line 107, in _next
    future = next(self._generator)
  File "/usr/lib64/python3.6/site-packages/portage/dbapi/porttree.py", line 1178, in async_xmatch
    aux_keys, myrepo=cpv.repo, loop=loop))))
  File "/usr/lib64/python3.6/site-packages/portage/dbapi/porttree.py", line 702, in async_aux_get
    proc.start()
  File "/usr/lib64/python3.6/site-packages/_emerge/AsynchronousTask.py", line 30, in start
    self._start()
  File "/usr/lib64/python3.6/site-packages/_emerge/EbuildMetadataPhase.py", line 117, in _start
    fd_pipes=fd_pipes, returnpid=True)
  File "/usr/lib64/python3.6/site-packages/portage/package/ebuild/doebuild.py", line 821, in doebuild
    use_cache, mydbapi)
  File "/usr/lib64/python3.6/site-packages/portage/package/ebuild/doebuild.py", line 288, in doebuild_environment
    _("Invalid ebuild path: '%s'") % myebuild)
portage.exception.IncorrectParameter: Invalid ebuild path: '/var/lib/layman/melpa/app-emacs/lsp-elixir.el/lsp-elixir.el-20190105.2059.ebuild'
Code:
ls /var/lib/layman/melpa/app-emacs/lsp-elixir.el/lsp-elixir.el-20190105.2059.ebuild
/var/lib/layman/melpa/app-emacs/lsp-elixir.el/lsp-elixir.el-20190105.2059.ebuild
Thks 4 ur attention, interest & support.
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3623

PostPosted: Mon Jan 06, 2020 8:42 am    Post subject: Reply with quote

esearch bug report
Thks 4 ur attention.
Back to top
View user's profile Send private message
proteusx
Guru
Guru


Joined: 21 Jan 2008
Posts: 338

PostPosted: Mon Jan 06, 2020 9:54 am    Post subject: Reply with quote

Maybe the category "lsp-elixir.el" is udefined and equery chokes as a result.

Have you tried
Code:
echo "lsp-elixir.el" >> /etc/portage/categories

Or perhaps
Code:
echo "lsp-elixir.el" >> /var/lib/layman/melpa/profiles/categories
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3623

PostPosted: Mon Jan 06, 2020 10:08 am    Post subject: Reply with quote

github bug report 4 lsp-elixir
Thks 4 ur attention, interest & support.
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3623

PostPosted: Mon Jan 06, 2020 10:52 am    Post subject: Reply with quote

eupdatedb built index fine after fixing a few overlay errors, e.g. by removal, most of the time.
esearch works fine.

Thks 4 ur attention.
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