View previous topic :: View next topic |
Author |
Message |
krokoziabla n00b
Joined: 09 May 2013 Posts: 40 Location: Russia
|
Posted: Wed Jun 26, 2013 11:54 am Post subject: How to install a package's sources? |
|
|
I would never started such a topic but forum search gives no result on source search pattern.
I need to know how to install sources for a package. I believe a package's sources are supposed to be installed in /usr/src folder, aren't they?
If it is package dependent my main interest is gtkmm and gtk+ packages. _________________ Vitaly |
|
Back to top |
|
|
xaviermiller Bodhisattva
Joined: 23 Jul 2004 Posts: 8706 Location: ~Brussels - Belgique
|
Posted: Wed Jun 26, 2013 11:55 am Post subject: |
|
|
the sources are downloaded by default to /usr/portage/distfiles _________________ Kind regards,
Xavier Miller |
|
Back to top |
|
|
krokoziabla n00b
Joined: 09 May 2013 Posts: 40 Location: Russia
|
Posted: Wed Jun 26, 2013 12:03 pm Post subject: |
|
|
But isn't distfiles folder supposed to be used by portage internally? And moreover the sources are kept there in zipped form. I know I can unzip them somewhere (or even download source repositories separately) and use as I want but I'd like to know if there is a way to do it automatically and keep them centrally (e.g. like /usr/src/linux sources). _________________ Vitaly |
|
Back to top |
|
|
mike155 Advocate
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Wed Jun 26, 2013 12:17 pm Post subject: |
|
|
It's a bit unclear what you really want.
Try "ebuild /usr/portage/dev-cpp/gtkmm/gtkmm-3.8.1.ebuild unpack"
This will fetch all required sources and unpack and patch everything to /var/tmp/portage/dev-cpp/gtkmm-3.8.1/work.
After that, move /var/tmp/portage/dev-cpp/gtkmm-3.8.1/work to a place of your choice. |
|
Back to top |
|
|
krokoziabla n00b
Joined: 09 May 2013 Posts: 40 Location: Russia
|
Posted: Wed Jun 26, 2013 12:27 pm Post subject: |
|
|
Well, my final goal is to have sources for gtkmm/gtk+ packages somewhere in the file system which correspond to the binaries installed and which I can use to debug a GTK+ based application I'm developing. The approach I'm using now is to refer to GTK+/gtkmm GIT repositories which I downloaded earlier. But I'd like to know if there is a way to install those binaries automatically (maybe a special USE flag sources or something like this).
For example Linux's sources are kept in /usr/src/linux and some packages use them, for instance, for compilation of kernel modules. _________________ Vitaly |
|
Back to top |
|
|
John R. Graham Administrator
Joined: 08 Mar 2005 Posts: 10587 Location: Somewhere over Atlanta, Georgia
|
Posted: Wed Jun 26, 2013 12:57 pm Post subject: |
|
|
You're looking for Code: | FEATURES="installsources" | See the make.conf man page for details.
- John _________________ I can confirm that I have received between 0 and 499 National Security Letters. |
|
Back to top |
|
|
krokoziabla n00b
Joined: 09 May 2013 Posts: 40 Location: Russia
|
Posted: Wed Jun 26, 2013 1:24 pm Post subject: |
|
|
Thank you! That's the thing I need. Although I do not completely understand what debugedit is and why it is needed here but it's trifles. _________________ Vitaly |
|
Back to top |
|
|
John R. Graham Administrator
Joined: 08 Mar 2005 Posts: 10587 Location: Somewhere over Atlanta, Georgia
|
Posted: Wed Jun 26, 2013 1:46 pm Post subject: |
|
|
debugedit is a package (alas, not a very well documented one). However, you can just emerge it like anything else.
- John _________________ I can confirm that I have received between 0 and 499 National Security Letters. |
|
Back to top |
|
|
krokoziabla n00b
Joined: 09 May 2013 Posts: 40 Location: Russia
|
Posted: Wed Jun 26, 2013 1:47 pm Post subject: |
|
|
Yes, yes. I've already done everything, although not understanding what I'm doing. _________________ Vitaly |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21498
|
Posted: Wed Jun 26, 2013 10:22 pm Post subject: |
|
|
The object files are compiled to refer to the sources in $PORTAGE_TMPDIR. Portage can use debugedit to rewrite those references to point to the /usr/src directory, so that when you use gdb on the built package, gdb will search for the sources in /usr/src, and find them there. |
|
Back to top |
|
|
|