Changes between Version 20 and Version 21 of howto/InstallingOlderPort


Ignore:
Timestamp:
Feb 25, 2017, 2:53:47 AM (7 years ago)
Author:
jmroot (Joshua Root)
Comment:

update for github

Legend:

Unmodified
Added
Removed
Modified
  • howto/InstallingOlderPort

    v20 v21  
    11[wiki:howto <- Back to the HOWTO section]
    2 
    3 {{{
    4 #!div style="background-color: lightyellow; padding: 0.25em;"
    5 TODO: This page is outdated after the move to Git and GitHub. Please help to update it!
    6 }}}
    72
    83= How to install an older version of a port =
     
    6358== (Re)installing an older version that's no longer installed == #install
    6459
    65 If you want to go back to an older version after you've already uninstalled it, or to install an older version of a port that predates when you first installed it, you can do so by manually downloading the older version of the portfile and any associated files from the MacPorts Subversion repository.
     60If you want to go back to an older version after you've already uninstalled it, or to install an older version of a port that predates when you first installed it, you can do so by manually downloading the older version of the portfile and any associated files from the MacPorts Git repository.
    6661
    67 === Step 1: '''Find the right revision''' ===
     62=== Step 1: '''Find the right commit''' ===
    6863To install an older version of the port, you'll have to get the necessary files from the repository.
    69 [browser:trunk/dports Browse the repository] to find the directory of the port you want, then use the Revision Log link in the upper right to find the older version that you want to install.
    70 For example, if you wanted to install the older 8.4.16 version of tcl, browse to the [browser:trunk/dports/lang/tcl lang/tcl] directory and look at its [log:trunk/dports/lang/tcl revision log].
    71 Here you'll note that tcl was updated to 8.5.0 in !r32235, so you want the revision before that, which was !r30810.
    72 (You can also just subtract one from the revision you found, e.g. !r32235 - 1 = !r32234.)
    73 If desired, you can click the [browser:trunk/dports/lang/tcl@30810 @30810] link in the revision log (not the [30810] link) to see the directory as it existed in that revision.
     64[https://github.com/macports/macports-ports Browse the repository] to find the directory of the port you want, then use the History button in the upper right to find the older version that you want to install.
     65For example, if you wanted to install the older 8.4.16 version of tcl, browse to the [https://github.com/macports/macports-ports/tree/master/lang/tcl lang/tcl] directory and look at its [https://github.com/macports/macports-ports/commits/master/lang/tcl history].
     66Here you'll note that tcl was updated to 8.5.0 in !345f962, so you want the commit before that, which was !686ea4f.
     67If desired, you can click the [https://github.com/macports/macports-ports/tree/686ea4fa0fddeb03fdf2fc04dded68e05181bc95/lang/tcl <>] link in the history (not the !686ea4f link) to see the directory as it existed in that commit.
    7468
    7569=== Step 2: '''Get the port directory''' ===
    76 In the Terminal, using the revision number, port category and port name, check out the port's directory at the desired revision using the `svn` command:
     70In the Terminal, using the commit hash, port category and port name, check out the port's directory at the desired commit using the `git` command:
    7771{{{
    78 $ svn checkout -r 30810 https://svn.macports.org/repository/macports/trunk/dports/lang/tcl
     72$ git clone --single-branch https://github.com/macports/macports-ports.git
     73$ cd macports-ports
     74$ git checkout 686ea4fa0fddeb03fdf2fc04dded68e05181bc95
    7975}}}
    80 This creates a "tcl" directory in your current location, and populates that with everything the port needs to build.
    81 Replace "30810" and "lang/tcl" with the correct revision and category/portname for the port you're interested in.
     76This creates a "macports-ports" directory in your current location, and populates that with a complete copy of the ports tree as it existed at the specified point in history.
     77Replace "!686ea4fa0fddeb03fdf2fc04dded68e05181bc95" with the commit you're interested in.
    8278
    8379Note:
    84 Subversion is included with Mac OS X 10.5 and later but you may want to get a newer version by installing the subversion port;
    85 Mac OS X 10.4 does not include subversion, so users of that system must install the port:
     80Git is included with Xcode 4.1 and later but you may want to get a newer version by installing the git port;
     81Xcode 4.0 and earlier do not include git, so users of those versions must install the port:
    8682
    8783{{{
    88 $ sudo port install subversion
     84$ sudo port install git
    8985}}}
    9086
     
    9995
    10096=== Step 3: '''Build the downloaded port''' ===
    101 Finally, change to the directory you checked out with Subversion (which contains the Portfile) and install the port, omitting the port name:
     97Finally, change to the directory you checked out with Git (which contains the Portfile) and install the port, omitting the port name:
    10298
    10399{{{
    104 $ cd tcl
     100$ cd lang/tcl
    105101$ sudo port install
    106102}}}
     
    159155{{{port info php5}}} shows it to be first in the '''lang''' category, so it would be located in lang/php5.
    160156
    161 After browsing [log:trunk/dports/lang/php5 php5's history], 5.3.0 was introduced in r53563 which means the previous revision, r53555, was the last update for 5.2.10.  With this information, we can run:
     157After browsing [https://github.com/macports/macports-ports/commits/master/lang/php5 php5's history], 5.3.0 was introduced in !bf7adcc which means the previous commit, !9b7c823, was the last update for 5.2.10.  With this information, we can run:
    162158
    163159{{{
    164 $ svn checkout -r 53555 https://svn.macports.org/repository/macports/trunk/dports/lang/php5
    165 $ cd php5
     160$ git clone --single-branch https://github.com/macports/macports-ports.git
     161$ cd macports-ports
     162$ git checkout 9b7c823b360a9ed1d9c6e05a15806b959b93fc05
     163$ cd lang/php5
    166164$ sudo port install -- +apache2 +postgresql83
    167165}}}