Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 02 Jul 2010 17:57:49 -0700
From:      Doug Barton <dougb@FreeBSD.org>
To:        "Alexandre L." <axelbsd@ymail.com>
Cc:        bf1783@gmail.com, freebsd-questions@FreeBSD.org
Subject:   Re: Problem using Portmaster to upgrade installed ports via packages only
Message-ID:  <4C2E8B0D.5030106@FreeBSD.org>
In-Reply-To: <203787.97833.qm@web24808.mail.ird.yahoo.com>
References:  <203787.97833.qm@web24808.mail.ird.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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
> 
> PM_SU_VERBOSE=

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
> PM_SU_VERBOSE

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,

Doug

-- 

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

	Improve the effectiveness of your Internet presence with
	a domain name makeover!    http://SupersetSolutions.com/




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C2E8B0D.5030106>