Re-do MacPorts after upgrading from Tiger to Leopard on PPC?
Ryan Schmidt
ryandesign at macports.org
Sat Mar 14 12:17:19 PDT 2009
On Mar 14, 2009, at 13:57, Bradley Giesbrecht wrote:
> On Mar 14, 2009, at 10:06 AM, Ryan Schmidt wrote:
>
>> On Mar 14, 2009, at 11:50, Bradley Giesbrecht wrote:
>>
>>> It makes testing things like the perl5 port easier in my opinion.
>>> If I can make changes to a Portfile, uninstall everything that
>>> might touch it and then reinstall everything I'm more likely to
>>> do more thorough testing.
>>
>> Perhaps, but we shouldn't be encouraging people to nuke their
>> entire MacPorts installation just to test new ports. We should
>> have better ways. For example trace mode was intended to help.
>
> That sounds good to me.
>
> Since it's possible that the next perl5.8 port revision will move
> man and modules to new locations I wanted to test it on a clean
> install and also as an upgrade of an existing system. I want to
> verify that on the upgrade of perl5.8 the p5 files that have been -
> f installed are not removed when the perl5.8 port is upgraded.
>
> I also would like to be able to put my system back to it's previous
> state after each test.
>
> How would you suggest I do this? I'd be very happy to learn a
> better way.
You could create a new MacPorts install, side by side with your
existing install. Download the MacPorts source and then:
PREFIX=$HOME/macportsclean
./configure \
--prefix=$PREFIX \
--with-tclpackage=$PREFIX/Library/Tcl \
--with-applications-dir=$PREFIX/Applications \
--with-frameworks-dir=$PREFIX/Library/Frameworks \
--with-install-user=$(id -u -n) \
--with-install-group=$(id -g -n) \
--enable-readline
make
make install
Assuming the ports you're testing are well-behaved and write only
into the destroot and don't need to write to system locations, things
you install with this second MacPorts install shouldn't affect what's
installed in your primary MacPorts install.
By installing this secondary MacPorts with a non-root user, and
running your port commands without sudo, you ensure that it cannot
overwrite things in your primary MacPorts install, which is
presumably installed as root and therefore requires root permission
to overwrite. In this way you can test whether the ports you're
installing are behaving properly.
Erasing this secondary MacPorts is as easy as deleting the directory
$PREFIX.
More information about the macports-users
mailing list