In some of my mind-trip I've been adventured in a land of disk space / bandwidth saving land. The idea at the base is that in portage exists more version of a package and that this version (expecially for large builds) differ on a very low percentage of code.
the wasted mind come out with: keep for every ebuild at least a couple of files of three kinds 0) whole package compressed file, 0comp from now 1) "diff -dNr" patch from 0comp, from now 1diff 2) list of files of that package, 2list
Starting from 2diff, it can be a three record list of files like this (names, sizes wasted like the mind):
0comp|44180478|xorg-x11-6.8.1.902.tbz 1diff|150742|diff--xorg-x11-6.8.1.901--xorg-x11-6.8.1.902.bz2 1diff|300000|diff--xorg-x11-6.8.1.900--xorg-x11-6.8.1.901.bz2 1diff|300000|diff--xorg-x11-6.8.0--xorg-x11-6.8.1.900.bz2 0comp|44180478|xorg-x11-6.8.7.tbz 1diff|300000|diff--xorg-x11-6.8.6--xorg-x11-6.8.7.bz2
the three record are: - kind of the file - size of the file - name (of what is left as excercise)
Now there are few possibilities: the user will be considered a man, so if you are a woman please consider to change sex for the next few rows.
User point of view a) the user want to install the latest version of the package, and he has never installed the package, he will download directly 0comp|44180478|xorg-x11-6.8.1.902.tbz
b) the user want the stable version of the package say xorg-x11-6.8.0 and he has never installed it, portage should become smart enough to find the first 0comp list of 1diff needed 0comp|44180478|xorg-x11-6.8.1.902.tbz 1diff|150742|diff--xorg-x11-6.8.1.901--xorg-x11-6.8.1.902.bz2 1diff|300000|diff--xorg-x11-6.8.1.900--xorg-x11-6.8.1.901.bz2 1diff|300000|diff--xorg-x11-6.8.0--xorg-x11-6.8.1.900.bz2 download them all and rebuild the xorg-x11-6.8.0 source tree similar if he want xorg-x11-6.8.6 portage will download 0comp|44180478|xorg-x11-6.8.7.tbz 1diff|300000|diff--xorg-x11-6.8.6--xorg-x11-6.8.7.bz2
c) the user has xorg-x11-6.8.1.901 that was a 0comp when he has
installed it, he want to upgrade to xorg-x11-6.8.1.902
this time portage must be smarter, he must understand that he has
two alternatives
c1) download 0comp|44180478|xorg-x11-6.8.1.902.tbz and install
c2) download
1diff|150742|diff--xorg-x11-6.8.1.901--xorg-x11-6.8.1.902.bz2
patch and install
and evaluate them both in sizes and number of steps
d) the user has xorg-x11-6.8.1.901 that was a 0comp but it suck for him
so he want to downgrade to xorg-x11-6.8.0, portage will download
diff--xorg-x11-6.8.1.900--xorg-x11-6.8.1.901.bz2
diff--xorg-x11-6.8.0--xorg-x11-6.8.1.900.bz2
and apply them with "patch -R" reversing the patch e) what the user will download will depend also from the sync state of
his mirror.
Mirrors point of view Mirrors should be smart enough to do the stuff in this order: download 1diff download 0comp download 2list delete unneeded files.
Developer point of view ???
-- [email protected] mailing list
