Fink:Major New Feature Plans:Bindist VERSION file
For a long time now, the package distributions have had a file
%p/fink/$dist/VERSION that contains versioning information about the distro. The file contains information about the origin of the local package collection. This page describes the existing format and some proposed changes needed for future distros and other fink core work.
Existing format and handling
The file contains a single line declaring the bindist point version and some information about selfupdate method. In a bindist, the file contains a single line declaring the version of the bindist, for example:
where the second atom has lately corresponded to the darwin kernel major version (OS X 10.4 is darwin 8.x). In the CVS package distros (
fink selfupdate-cvs), the file has the base bindist (the latest one for the dists/$dist directory), with ".cvs" appended, for example:
selfupdate-rsync server is a mirror of the CVS server, the VERSION file downloaded by rsync also contains ".cvs". However, at the end of that selfupdate method, fink patches the VERSION file to indicate ".rsync", for example:
fink --version, the file is read,
chomped (remove last newline, but all other and internal newlines retained), and the arch is appended:
Distribution version: $VERSION_contents $arch
- Write info directly instead of patching.
- Don't want to have to know the available method names other than the one used presently (SelfUpdate is being rewritten to use method plugin modules, and generally good idea to avoid cross-talk between different methods).
- More well-defined syntax that is machine-readable, easier to parse version vs selfupdate method. Example: $bindist-$method
- Relationship with
- In 10.4 and beyond, unified %p/fink/10.4 directory is used, so the VERSION file in a single location represents more than one bindist.
- Make $distro itself (not just bindist value for it) more visible.
- Once selfupdate has been done, don't care what bindist was the starting point.
- List $method instead of base $bindist (and also list $distro explicitly).
- Include timestamp for the selfupdate.
- Currently we check FS modification time on some file that is updated from the selfupdate server. More reliable to record directly the timestamp of the last selfupdate.
- Bindist point-release VERSION file will remain as a single line containing bindist version.
- Selfupdate-server VERSION file will contain multiple lines indicating base point-release for each $dist that is supported, formatted such that older fink can still display something intelligent:
multiple dist-10.4: 0.8.1.updated dist-10.5: 0.9.0.updated
including a trailing blank line so
fink -Vdisplays $arch on separate line.
fink selfupdatewill over-write VERSION with a single line containing just the "dist-$dist" line for the fink.conf
Distribution: $distvalue and use the selfupdate method name and human- and machine-readable timestamp instead of the bindist version:
- Concern: Since the "10.4" directory is now shared among several $dist, could a user have %p/fink/10.4 be shared (remotely mounted) among several different $dist, so inappropriate to encode info about a specific one in a shared file? Does selfupdate do anything specific to a $dist within the directory (or anything dist-specfic at all), or is knowing the current fink.conf value enough?
- Better to have just "$method@$time"? But we might want to know $dist in effect during selfupdate.
- Could replace just the "dist-$dist" line in VERSION instead of replacing the whole file, and then have
fink -Vonly display the line with the presently-active $dist. But that ignores that selfupdating from one $dist of a unified directory updates others as well. Or does it, if there are $dist-specific things happening?
- Could have selfupdate add a line "Selfupdate: $method@$time" to the VERSION file instead of editing anything in it (except removing ".cvs"). That way we separate the bindist versioning (unresolved how to do for multidist anyway) from the selfupdate (which we are working on and can solve independently).
fink -Vput $arch separately from the bindist versioning line(s), since it's not really related, and add explicit fink.conf:Distribution to that line.