View previous topic :: View next topic |
Author |
Message |
nybbles n00b
Joined: 10 May 2003 Posts: 55 Location: Vancouver
|
Posted: Mon May 12, 2003 1:57 am Post subject: Does anyone know how Portage works? |
|
|
Okay so, its supposed to be like BSD ports... Not sure what that is...
What I would like to know is... when you type in
Code: | emerge <packagename> |
what goes on behind the scenes? how is the program configured, compiled and where can you decide where to install the software? _________________ oo oo aah aah |
|
Back to top |
|
|
puddpunk l33t
Joined: 20 Jul 2002 Posts: 681 Location: New Zealand
|
Posted: Mon May 12, 2003 2:37 am Post subject: Re: Does anyone know how Portage works? |
|
|
snarkyshark wrote: | Okay so, its supposed to be like BSD ports... Not sure what that is...
What I would like to know is... when you type in
Code: | emerge <packagename> |
what goes on behind the scenes? how is the program configured, compiled and where can you decide where to install the software? |
Well, all this could all be explained to you in the Portage User Guide, or slightly more advanced info in the Portage Manual, but since i'm such a nice guy, I'll give you the skinny.
When you type in Code: | emerge <packagename> | portage looks at <packagename>'s ebuild, and sees which package it is to download. It then proceeds to download that package, then compares the package to a "MD5 Sum" that is kept behind scenes to check that the package is complete and has not been tampered with.
Then, it looks at your use variables, and runs configure. The ebuild "maps" USE varaibles to configure options, so the package is built to your specifications.
Make is then run, and the program builds. Once that is done, portage installs it to a "sandbox" directory (to make sure it doesn't alter any live system files), then that "sandbox" directory is copied to the live filesystem, and portage keeps track of the files it installed, so it can be easily uninstalled.
And, you can't choose where to install the package to. Portage figures it out itself, but really, why would you need to? That's what a package management system is for!
Cheers,
Chris. |
|
Back to top |
|
|
uzik Apprentice
Joined: 17 Apr 2003 Posts: 257
|
Posted: Mon May 12, 2003 3:49 am Post subject: |
|
|
Hey, got time for another stupid question?
I read both the docs but didn't see the answer to this.
I've written my first package. I've got an ebuild and a tar file done.
How do I put it into the portage tree on my system so I can see if
it's going to work? |
|
Back to top |
|
|
TheEternalVortex Apprentice
Joined: 15 Oct 2002 Posts: 207 Location: San Jose, CA
|
Posted: Mon May 12, 2003 5:06 am Post subject: |
|
|
Set PORTDIR_OVERLAY in /etc/make.conf (the default is /usr/local/portage)
Then make directories under that. Example:
Code: |
# mkdir -p /usr/local/portage/net-www/mozilla/
# cp mozilla-1.4_beta.ebuild /usr/local/portage/net-www/mozilla/
# emerge -p mozilla
These are the packages that I would merge, in order:
Calculating dependencies ...done!
[ebuild N ] net-www/mozilla-1.4_beta
|
_________________ -- Andy |
|
Back to top |
|
|
uzik Apprentice
Joined: 17 Apr 2003 Posts: 257
|
Posted: Mon May 12, 2003 5:33 pm Post subject: |
|
|
Thanks Andy,
I'll give it a try tonight. |
|
Back to top |
|
|
uzik Apprentice
Joined: 17 Apr 2003 Posts: 257
|
Posted: Wed May 14, 2003 2:30 am Post subject: |
|
|
Well, I'm close. I can't install the files the way I need to.
It gives permissions errors when I try to make directories.
I need the executables and data files in the same directory.
If I use 'dobin' it adds the /bin/ directory to the destination.
If I use 'insinto' it removes the executable bit from the program.
The docs are not terribly well organized. I'd rewrite them if
I could understand how it worked well enough. |
|
Back to top |
|
|
|