Runtime Dependency Checking - again!
Stefan Fiedler <[email protected]> Fri, 22 Dec 2006 21:52:19 +0100
| Newsgroups | gmane.linux.distributions.rock.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi all,
this time I've added to SubMaster the necessary patches to implement runtime
dependency checking in the gasgui installer (the default installer in crystal
builds).
The implementation takes into account information from ELF and pkg-config
(*.pc) files, and is split into two parts:
1) scripts/Build-Pkg creates runtime dependency info at the end of each
package build and stores it in var/adm/{provides,requires,conflicts}/<spkg>
files. This info is also stored in packages.db files.
2) gasgui (part of the mine package) reads that info and uses it to select
packages that other packages depend on.
The patches are available at https://www.rocklinux.net/submaster .
Here's a simple test case for installations using these patches:
1) configure and build a generic distro with the patches applied, e.g.:
scripts/Config -cfg generic-bbs
# select generic target
# enable package selection, select bbs template (in Expert section)
# disable rebuild stage (recommended)
scripts/Build-Target -cfg generic-bbs
2) create the packages.db file; either use my target-finish patches (also in
SubMaster) and enable all packages in the target-finish repository, or do,
after your target build finished:
for x in build/$cfg_id/ROCK/pkgs/*.gem ; do
./build/$cfg_id/bin/mine -P "$x"
done | gzip -9 > build/$cfg_id/ROCK/pkgs/packages.db
$cfg_id equals the config ID of your build. In my case
cfg_id="generic-bbs-TRUNK-x86-generic-expert".
3) launch the gasgui installer; here we'll test-install to an (empty)
directory /media/altboot:
./build/$cfg_id/usr/sbin/gasgui -c $cfg_id/ROCK -t /media/altboot/ -s
`dirs`/build/
4) Check this out:
Choose to "Only install a minimalistic system" (no packages are selected for
installation at first),
choose "Alter the package selection",
select the "All packages" subtree and e.g. select the "subversion" package;
note how this will mark the openssl and zlib packages as dependencies, among
others. (subversion, like almost all other packages, depends on the package
providing libc, so glibc2x will be a dependency, too).
Choose a package, select "Extras" and "List unresolved dependencies" to see
on which packages this package depends on.
5) Test-install:
Move the cursor to the "All packages" tree, select "Extras" and "Install
unresolved dependencies"; all dependencies will be marked for installation.
Then select "Finish" to install all selected packages and their dependencies.
At this point you should have been able to do you first installation using
runtime dependency checking :)
You might have noticed that the implementation in rocket is missing; this
would be rather easy to add, since I have already written two shell scripts
resolving runtime deps. But I think it'd be better for rocket to use gasgui
for package installation and removal: rocket already requires user input for
those operations, and using gasgui helps to avoid code duplication. I'll make
the necessary changes when I've decided upon this issue ;)
With best regards,
Stefan Fiedler