Port update problem?
Arthur Chance
freebsd at qeng-ho.org
Fri Oct 29 11:43:36 UTC 2010
On 10/28/10 19:07, Doug Spangler wrote:
> You are correct I meant chapter 4. Just out of curiosity is your INDEX
> intact or is that the cause of the odd behavior
> of /etc/periodic/weekly/400.status-pkg, portion of the problem. I
> understand that it is not the root cause of your problem just a
> symptom.
OK, I've found what's happening. Nothing beats having the source code.
It turns out it's nothing to do with updating ports, a bent INDEX-8 file
or anything like that. Here's what was happening:
/etc/periodic/weekly/400.status-pkg calls pkg_version. For each
installed port, pkg_version cd's to the port directory and forks a
make -V PKGNAME
to get the latest version of the package, and if that comes back blank
you get the "Failed to get PKGNAME from
/usr/ports/<foo>/<bar>/Makefile!" error message that was my problem.
Immediately before I updated ports I'd been trying to understand the
details of the make {build,install}{world,kernel} process as I'm trying
to do something vaguely similar to nanobsd. As a result of this playing
about I had DESTDIR set in my environment. For some reason having
DESTDIR set makes some, but not all, port makefiles fail to set PKGNAME.
(E.g. on my box, with the ports updated as of 13:35 UTC yesterday,
net/GeoIP doesn't set it, archivers/xz does.)
unsetenv DESTDIR cleared the problem. Why a set DESTDIR has this effect,
and why it's only on some ports, is something I haven't tracked down
yet, and it's going to be a low priority task. If anyone does know why,
I'd be interested in the explanation.
--
"Although the wombat is real and the dragon is not, few know what a
wombat looks like, but everyone knows what a dragon looks like."
-- Avram Davidson, _Adventures in Unhistory_
More information about the freebsd-questions
mailing list