add this "functional package management" feature to Gentoo.
I mean basically if you make some system declaration
(I'd love to have it in python) which defines a diff to "/etc"
and then recreate a "/root" somewhere every time you want to update
or when you want a different system to be "checked out",
then wouldn't it be almost enough?
Probably emerge should run inside the new system tree and not with
the system tree as target because it could change the results,
which should preferably be bit identical.
The ebuilds already have their manifests and are hashed and can be used in the system declaration.
It could work like this:
Everytime you compile a package only the dependencies are checked out and the system
state of all the package versions gets recorded for the next time this package is needed.
The next time if some other package needs this package,
the recorded state is checked out from binpkgs and then emerge is called as usual.
The system declaration could live in /etc
and (if needed) only one single file determines which one is active.
The single file hopfully does not change the compilation results.
Emerge can check out binpkgs.
Only some "meta" program would need to read something like /etc/portage/system-declaration.d/default
and then use emerge to calculate a dependency tree,
then checkout some stage-x archive as base.
After updating the toolchain the whole toolchain can be checked out as binpkg.
Did I miss something ?
Is it possible ?
I dream of defining the system like this:
Code: Select all
gentoo = [ { "name" : "default",
"repo-tree-version" : get_start_time_of_last_successful_update()
"profile" : "default/linux/amd64/17.1"
"apply-etc-patches" : { "etc-patches-dir" : "/etc/portage/system-declaration/patches"
"mode" : "all of them"
}
"packages" : [ "x11-terms/xterm","x11-wm/qtile" ]
}
{ "name" : None , # gets filled in automatically, don't need this entry
"packages-0" : ['=media-libs/libsixel-1.10.3', 'www-client/w3m']
"packages-1" : ['i-need-libsixel-and-w3m-but-DEPEND-is-missing-them'] # better fix DEPEND
}
]
is the package entry and everything that comes prior to the package in the list.
If you refer to "gentoo[1]" it will checkout gentoo[0] as a base.
And using something like "packages-1" could
make sure that "packages-0" is checked out befor packages-1 is compiled.
It probably needs to check the dependency list for every package
whether all the prior packages are really needed.
(Not in the case of "gentoo[1]" over "gentoo[0]", I mean inside of such a block like "gentoo[0]" )
This because it should always use the minimal dependency list ,
so the package can be reused when needed for other packages.
Then it should add an entry to the packages list ( gentoo[0]['packages'].append("x11-terms/xterm"))
and save the binpkg state for each entry.
There would be a patch that creates make.conf
and other ones for use flags , etc.
The file that defines the active declaration would point to either,
"gentoo[0]" for a base system,
or to "gentoo[1]" if you want libsixel,
or is omitted and the "default" entry is used.
Code: Select all
{
"active": declarations.gentoo[0] " # for a base system
"repo_dates": { 'gentoo' : 'some date',
'other_repo' : 'some date',
},
# "repo_hashes" : { 'gentoo' : 0xf5aeb3c }
}
a file that points to the current system declaration.



