Portage is now Git-Friendly
I’m pleased to let everyone know that Portage is now git-friendly. As of version 2.2_rc20, Portage will now operate at full efficiency with git-based Portage repositories. Here are details on the changes:
First - “emerge --sync” will now properly recognize an existing git-based Portage repository. When you run “emerge --sync” with an existing git-based repo, Portage will run “git pull” inside the repository to update it.
Second - due to cache fixes, dependency calculations and searches are now just as fast as they are with rsync-based trees, and eix works properly with no issues. To benefit from cached metadata (this is what makes things fast,) you must use “emerge --sync” to update your git-based Portage tree.
Many thanks to Zac Medico (Gentoo Portage developer) for integrating our fixes into Portage, as well as providing general guidance, support and an excellent and much-appreciated fix for the cache speed issue.
So, if you are using the Funtoo Portage tree, first upgrade to Portage 2.2_rc20 or later, and then start using “emerge --sync” to update your tree. This will allow Portage to work optimally for you.
Note that the one thing that Portage does not yet do for you is to create the initial git-based Portage tree for you. To create your git-based portage tree, you can grab one of the Funtoo snapshot tarballs, or use git clone. The only additional step required beyond this is to create and checkout the branch you want to use. From that point forward, “emerge --sync” will take care of everything.
And a word for developers and distro creators:
One of the goals of Funtoo is not just to give you goodies, but to give you all the tools that we use ourselves, so you can do exactly what we do. So, one thing I am hoping to package up soon is the Portage code that I use to generate all that cached metadata that we add to our git tree that makes Portage fast for you. This will allow you to create your own git-based Portage trees that are fast for your users. The code itself is written by Zac, and we are both looking at the best way to package these tools up and make the cache-creation process as simple as possible for everyone.
11 comments:
Very nice, portage indeed reconizes the git repo. But can't pull yet because of the firewall here at school.
http protocol doesn't work either, but that's prob the fault of github :)
there is a way to have git use http/https and proxies to go behind firewalls.
this is what i use:
#! /bin/bash
(echo "CONNECT $1:$2 HTTP/1.0"; echo; cat ) | socket someproxy.com 3128 |
(read a; read a; cat )
where someproxy.com is your proxy server and 3128 is your proxy port.
then you'll have to export the GIT_PROXY_COMMAND variable to use the script in question.
but i'd like to say one thing about the git tree: it doesn't seem to be so updated. it seems that it's about 1-2 days older than official portage tree.
Hi Daniel,
had to setup a new fileserver and used of course your stage3 file... and always life on the bleeding edge i thought give your git enabled portage tree a try.
I use the latest version as of today (10. jan) (followed your mini-howto), but i have the problem that many packages cant be installed, "Calculating Dependencies" never stops. (actualy, there is no spinning sign at all)
wenn using --debug on the emerge command all i get is:
--------
emerge --debug -v mirrorselect
myaction None
myopts {'--debug': True, '--verbose': True}
These are the packages that would be merged, in order:
Calculating dependencies
--------
Dont know where the error is :( i might be have to do something with http://bugs.gentoo.org/show_bug.cgi?id=252572
my portage version is 2.2_rc20-r1
TIA
Rufinus
( rufinus _at_ cwd.at )
daniel, sorry for the comment, it seems to run now. software raid1 sync seems to slow things down extremly.
sorry.
Rufinus
I don't know how hard it is. But it would be great if portage could read a bare git repository, without checking out any files.
Thanks for all the great work.
I researched git a bit in the last month and was wondering if it would make any sense to use it for the portage tree and to gain the added security of a signed tree for free only to see it is already done.
OK, the git-tag signing stuff is maybe not yet done but I have to admit I didn't looked at the code.
Does this metadata change obsoletes the "PORTDIR_CACHE_METHOD=parse|ebuild*" line for eix?
Yeah, as far as I know (I'm not an eix user,) eix now works with no tweaks necessary.
One of the things I will be looking at in the coming months is leveraging git for end-to-end security for Portage updates. This will allow Manifests to only need to reference distfiles, not things that are already inside the tree (since a signed SHA1 - like a tag - will authenticate all the files in the git tree, as well as its complete history.)
i don't suppose there's any docs anywhere on setting up one's own git portage server please ?
A quick question.
I decided to put the funtoo portage tree on my Gentoo system (ok, it's officially a Funtoo system now :) ). And I began by looking at Funtoo Quick Install. It's directions are to download the tarball, extract it, cd into portage, and then:
git checkout funtoo.org
But this didn't work:
fatal: Not a git repository
Do the new stage3's enable (I got a funtoo stage3 about a month ago) a different way of using git than what described in the Github Wiki?
Works like a charm!
Thanks for the good work,
erick
When updating the funtoo tree does anyone else get this problem please ??
firewall ~ # emerge --sync
>>> Starting git pull in /usr/portage...
Updating 9d94028..66f133b
error: Entry 'media-libs/libsamplerate/Manifest' not uptodate. Cannot merge.
!!! git pull error in /usr/portage.
every single sync i have this and have no problems with normal portage?
Post a Comment