Portmaster: Difference between revisions

From TykWiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 3: Line 3:


== Automatically delete old distfiles ==
== Automatically delete old distfiles ==
Portmaster works like a charm with the default configuration. Only thing that annoyed me after a while is the fact that Portmaster doesn't delete old distfiles without asking first - so I would start a large upgrade, answer all the make config screens that Portmaster is clever enough to show me all at once, and then go do something else. Only to come back and see Portmaster waiting for my OK to delete libsomething-1.2.3.tar.bz2 (which has already been replaced by a new installed version). I can see why this may be nice for some people, but I want it to delete old distfiles without asking me:
Portmaster works like a charm with the default configuration. Only thing that annoyed me after a while is the fact that Portmaster doesn't delete old distfiles without asking first - so I would start a large upgrade, answer all the make config screens that Portmaster is clever enough to show me all at once, and then go do something else. Only to come back and see Portmaster waiting for my OK to delete libsomething-1.2.3.tar.bz2 (which has already been replaced by a new installed version). I can see why this may be nice for some people, but I want it to delete old distfiles without asking me, so I put the following line in <code>/usr/local/etc/portmaster.rc</code>:
 
'''/usr/local/etc/portmaster.rc''':
<pre>
<pre>
ALWAYS_SCRUB_DISTFILES=dopt
ALWAYS_SCRUB_DISTFILES=dopt
Line 11: Line 9:


That's it.  
That's it.  
== Automatically delete build depencencies after install ==
When installing stuff I often end up with a bunch of build dependencies that I don't need after the port has been built. Portmaster can remove these automatically, and will do so if given the command line option <code>--delete-build-only</code> or if the following line is present in <code>/usr/local/etc/portmaster.rc</code>:
<pre>
PM_DEL_BUILD_ONLY=pm_dbo
</pre>
This makes Portmaster clean up the build dependencies automatically.


== Reinstall all ports ==
== Reinstall all ports ==

Revision as of 01:21, 26 January 2010

This article is about Portmaster, my ports management tool of choice.

Automatically delete old distfiles

Portmaster works like a charm with the default configuration. Only thing that annoyed me after a while is the fact that Portmaster doesn't delete old distfiles without asking first - so I would start a large upgrade, answer all the make config screens that Portmaster is clever enough to show me all at once, and then go do something else. Only to come back and see Portmaster waiting for my OK to delete libsomething-1.2.3.tar.bz2 (which has already been replaced by a new installed version). I can see why this may be nice for some people, but I want it to delete old distfiles without asking me, so I put the following line in /usr/local/etc/portmaster.rc:

ALWAYS_SCRUB_DISTFILES=dopt

That's it.

Automatically delete build depencencies after install

When installing stuff I often end up with a bunch of build dependencies that I don't need after the port has been built. Portmaster can remove these automatically, and will do so if given the command line option --delete-build-only or if the following line is present in /usr/local/etc/portmaster.rc:

PM_DEL_BUILD_ONLY=pm_dbo

This makes Portmaster clean up the build dependencies automatically.

Reinstall all ports

To reinstall (recompile and install) all installed ports, and at the same time upgrade the outdated ports I run the following command:

# portmaster -af

This should be done after upgrading the OS. Portmaster will give you a nice list with the actions it has performed after it finishes.


There is a lot of [other options] to portmaster of course, but like I said, the defaults are fine for me. Eventually I will update this page with more Portmaster commands and tricks.