Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Listing all intermediate files used to compile a package
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
smurfbot
n00b
n00b


Joined: 31 Dec 2016
Posts: 9

PostPosted: Mon Jun 18, 2018 8:24 am    Post subject: Listing all intermediate files used to compile a package Reply with quote

I was wondering if there is some way I could get the list of all the intermediate files that a package uses when generating the install file list for that package. I am trying to do some data mining and would like to be able to quickly get a list of C and C++ source code that is in a specific package prior to it being compiled into binary form. Is something like this possible?

Thanks in advance.
Back to top
View user's profile Send private message
smurfbot
n00b
n00b


Joined: 31 Dec 2016
Posts: 9

PostPosted: Mon Jun 18, 2018 8:55 am    Post subject: Reply with quote

I am not sure if I am barking up the wrong tree but I looked at some of the ebuild functions and found src_unpack. Would it make sense to do what I want to implement a custom version of unpack that makes a backup copy of a file that tests as c/c++ code. Or is there an easier way?
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9223
Location: beyond the rim

PostPosted: Mon Jun 18, 2018 1:42 pm    Post subject: Reply with quote

What exactly are you looking for?

"Intermediate" files to me would be files generated during the build process and discarded after the package is installed (e.g. object files), which is quite different from the source files the build is based on. And not all source files unpacked in src_unpack must be used for the actual build process, so that might be the wrong place to look at anyway.
Back to top
View user's profile Send private message
smurfbot
n00b
n00b


Joined: 31 Dec 2016
Posts: 9

PostPosted: Mon Jun 18, 2018 5:36 pm    Post subject: Reply with quote

i am actually just trying to get a realistic sample of source code written in c/c++ in an automated fashion from gentoo. My question now is what is the proper way to modify the source code for unpack and have it recompiled so it can be used in the system. Would I have to unpack unpack in some directory modify it to get the data i need then modify some ebuild file to use the modified file?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 41301
Location: 56N 3W

PostPosted: Mon Jun 18, 2018 7:00 pm    Post subject: Reply with quote

smurfbot,

EAPI 5 provides epatch_user but its not used in every ebuild.
EAPI 6 makes it automatic.

Both can apply patches for you.

If you want to make your own patches, call the ebuild phase function that you need to do the upacking and applying existing patches.
Make you own patch and save it in the right place, then portage can do the rest.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10091
Location: Somewhere over Atlanta, Georgia

PostPosted: Mon Jun 18, 2018 7:07 pm    Post subject: Reply with quote

Couple of references for you:- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
smurfbot
n00b
n00b


Joined: 31 Dec 2016
Posts: 9

PostPosted: Mon Jun 18, 2018 8:30 pm    Post subject: Reply with quote

Thanks.
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