Fink:Major New Feature Plans:Modernizing the Upgrade Process

From the Fink Wiki
Jump to navigation Jump to search


Starting with fink-0.27.7, fink has a new method for handling upgrades which change the distribution.

First, each fink.info file is being given a Distribution tag, and its own Revision increment. This way, when the underlying OS is upgrading, fink will recognize that it needs an update.

Second, to handle the problem that older finks don't recognize the Distribution tag, each fink.info for distributions 10.5 and later is being wrapped in Info4. Old finks which do not recognize the Distribution tag also can't handle Info4, and will refuse to process those files. Thus, fink-10.4.info with no Info4 and fink-10.5.info with an Info4 can coexist in the same finkinfo tree, and an older fink will only see the former. Once it has updated that one, it will see the latter too and -- if on 10.5 -- will update again.

Third, fink's postinstall.pl now compares the Distribution value stored in fink.conf with the one obtained by querying the system, so that it knows if we are upgrading. If we are upgrading, it stores the old Distribution value in a new fink.conf entry "UpdateFrom", for later handling by SelfUpdate.pm. It also may, depending on which upgrade is being performed, store a list of packages in "UpdatePackages". (These are packages, such as perl586-core during a 10.4->10.5 upgrade, which need to be installed immediately to prevent missing dependencies.) The info and patch files for any update-packages are being supplied with fink itself, and at the end of postinstall.pl they are copied to %p/fink/dists/local/injected (where they will subsequnetly found when SelfUpdate.pm needs them.)

In a related change, fink's postinstall.pl now processes the SelfUpdateTrees information, modifying it appropriately if we are upgrading, and storing in fink.conf. (If SelfUpdateTrees is not present but the old variable SelfUpdateCVSTrees _is_ present, it uses the latter to obtain information, but stores the information in the new variable and removes the old variable.)

The presence of an "UpdateFrom" variable indicates to fink selfupdate-finish that there is work to be done. However, this has not yet been implemented.

The one part of the work in SelfUpdate.pm which _has_ been implemented is installing the "UpdatePackages" -- these are installed along with "essential" and "important" packages during fink selfupdate-finish.