The only ebuilds that I _need_ to know about updates for are the ones that I have installed. But, I still carry around the entire portage tree. Syncing only the ebuilds of the installed packages has several benefits: 1) Less stress on the rsync servers. 2) Faster syncronization. 3) Scalable - in fact it won't really matter how big the portage tree gets. ...and the best part... 4) The rsync server logs could be used to establish installation statistics. Problems: 1) Actually syncing only installed ebuilds -> Done, see attached diff against '/usr/bin/emerge' as of 3/12/2004. 2) 'emerge -s' would need to search http://packages.gentoo.org instead of searching the local version of the portage tree. 3) New dependencies would have to be added to the list of synced ebuilds. Diff file of my addition of the '--syncinstalled' option is attached. Usage is 'emerge --syncinstalled sync'. The reference emerge is version 1.264 in the CVS header, current as of 3/12/2004. I actually create a file in /tmp which is a horrible kludge, I just couldn't figure out how to pipe the list to stdin of rsync - so there is room for improvement. Has worked well for me over the past couple of weeks. Once a change in the dependencies brought up an error so I just did a full sync and it went away (see #3 in the problems section).
Created attachment 27271 [details, diff] Diff of patched emerge to only sync ebuilds of installed packages Diff against emerge CVS version 1.264, portage-2.0.50-r1, on 3/12/2004.
What about changing dependencies? If you alter your use flags you may pull in a new dependency... which will probably break after a short while with this method. The only "perfect" way to resolve this issue would be a complete dep resolver and get each package. The idea is good, but there are side effect to it. Minimally it needs a warning that it isn't always going to work as expected.
Nicholas, thanks for your comments. My patch is not even close to a complete solution and you are correct that there is a problem if the dependencies change. A finished implementation would catch changed dependencies and add the new ebuild(s) to the sync list and sync the new ebuild.
Foreward duping this on 45221, since the concept there is a bit saner (this approach would require multiple rounds of sync's to get all deps. This would suck.) *** This bug has been marked as a duplicate of 45221 ***
*** Bug 58571 has been marked as a duplicate of this bug. ***
*** Bug 66823 has been marked as a duplicate of this bug. ***