Problem using Portmaster to upgrade installed ports via packages only

Doug Barton dougb at
Sat Jul 3 00:58:14 UTC 2010

Apologies for not answering sooner ...

On 06/29/10 13:37, Alexandre L. wrote:
> I have done tests last days, and now I can set PACKAGESITE correctly
> in user's .cshrc (I have unset the parameter in root's .cshrc). Else,
> I have set /usr/local/etc/portmaster.rc, as described in the
> portmaster's manpage.
> Here my /usr/local/etc/portmaster.rc

It's not necessary in shell scripting to set empty variables like this.
That's particularly true for the "flag" variables in portmaster rc
files. If the variable isn't actually set to something then what you
have here is exactly the same (to portmaster) as if you had not included
it at all.

> PM_SU_CMD=/usr/local/bin/sudo

This is fine, assuming that you want to be able to type 'portmaster ...'
as a non-root user and have it be able to do things that usually require
root privileges. However, there are a lot of other things that need to
be done to set that up. They are not difficult, but the details matter.
Please look closely at the section about this in the portmaster man page
for more details.

> I don't know (or understand) if I have to set a value to

That depends on your goal. Why are you setting this?

> I have tried to set PM_SU_VERBOSE=/usr/local/bin/sudo
> without success If you can help me here, I have read the manpage
> hundred times, but haven't found where I am wrong.

Please copy and paste the parts of the man page that are confusing. That
will help me improve it.

> Then I have tried without the line PM_SU_VERBOSE, just with
> PM_SU_CMD=/usr/local/bin/sudo I can install without problem packages
> with $ portmaster -P -a -x openoffice
> But if there is no package available for the port, I got the message
> (it is an example) :
> => libpng-1.4.3.tar.xz doesn't seem to exist in
> /usr/ports/distfiles//. => /usr/ports/distfiles/ is not writable by
> you; cannot fetch. 

That tells me that you haven't followed the instructions in the man page
for setting up your environment for sudo. So once again, if there are
specific parts of the man page that you find confusing, let me know what
they are so that I can improve it.

Meanwhile, you might also consider simply running portmaster as root.
There is nothing preferable about running it with sudo, it is a feature
that I added because users so often requested it.

hope this helps,



	... and that's just a little bit of history repeating.
			-- Propellerheads

	Improve the effectiveness of your Internet presence with
	a domain name makeover!

More information about the freebsd-questions mailing list