You may find that you need to use an earlier version of a package than you currently have installed, e.g. if the update causes a build issue in another package. Fortunately, this can be accomplished in a fairly straightforward set of operations. We’ll use the example of
- In a terminal window, run
fink scanpackages ; sudo apt-get update
to bring your local package list up to date.
- Verify what binary versions (locally built or otherwise) are known by using
apt-cache policy, for example:
$ apt-cache policy gmp5 gmp5: Installed: 5.1.0-1 Candidate: 5.1.0-1 Version Table: *** 5.1.0-1 0 100 /sw/var/lib/dpkg/status 5.0.5-4 0 500 file: stable/main Packages
In this case, version 5.0.5-4 is present.
- If an older version of the package is available, then you can install that. For example, for
gmp5, we’d want to downgrade the library packages as well as the main (headers):
$ sudo apt-get install gmp5=5.0.5-4 gmp5-shlibs=5.0.5-4 libgmpxx5-shlibs=5.0.5-4 Reading Package Lists... Done Building Dependency Tree... Done The following packages will be DOWNGRADED gmp5 gmp5-shlibs libgmpxx5-shlibs 0 packages upgraded, 0 newly installed, 3 downgraded, 0 to remove and 9 not upgraded. Need to get 0B/1282kB of archives. After unpacking 336kB will be freed. Do you want to continue? [Y/n]
Note that when using
apt-getthe versioned package format is
- If, on the other hand, you only show one version as available, you can download an earlier version of the package description files from the CVS browser. To help you figure out where to browse, you can use
fink dumpinfo -finfofileto show the section where the package you are interested in resides. For example:
$ fink dumpinfo -finfofile gmp5 Information about 6665 packages read in 2 seconds. infofile: /sw/fink/dists/stable/main/finkinfo/libs/gmp5.info
- Navigate to the appropriate location in the CVS browser. If you are on 10.5 or 10.6, first go to the 10.4 directory, and if you are on 10.7 or 10.8, then start in the 10.7 directory. Then follow the path from item 4 above, e.g.
- Pick an appropriate version of the .info file via the browser, i.e. check the Version field, and download it by viewing it with the Download option and saving the text file (make sure to leave the extension as .info). For example, one can see the various iterations of
gmp5.infoin the 10.7 tree here.
- Move the
/sw/fink/dists/local/main/finkinfo. If the package has a
.patchfile, then depending on whether that was updated after the
.infofile you downloaded, you will want either to download an appropriate version of from the CVS browser, or copy it from your
stable/main/finkinfodirectory if it’s new enough. Following the example of
gmp5, to install version 5.0.5-4 from source, you would download the
.infofile and the current
.patchfile, which still applies, then use e.g.
mv ~/Downloads/gmp5.* /sw/fink/dists/local/main/finkinfo
to put the files in your local tree.
- Use “fink dumpinfo -fallversions” to verify that the version you just moved into your local tree is available. Using
gmp5as the example again, we verify that gmp5-5.0.5-4 is among the known versions:
$ fink dumpinfo -fallversions gmp5 Scanning package description files.......... Information about 6665 packages read in 1 seconds. allversions: 5.0.5-4 bi 5.1.0-1
- Downgrade by using “fink install” including the package versions. Again using
gmp5for the example:
fink install gmp5-5.0.5-4 gmp5-shlibs-5.0.5-4 libgmpxx5-5.0.5-4
Note that when using a
finkcommand, the versioned package format is
- Build anything that needs the older version. A word of caution: you stand the risk of having link failures in other packages when you downgrade to a library with an older compatibility version.