Subject: Re: CVS commit: pkgsrc/mk/bulk
To: Roland Illig <rillig@NetBSD.org>
From: Julian Coleman <jdc@coris.org.uk>
List: pkgsrc-changes
Date: 01/18/2006 21:48:39
> Do you mean the NetBSD tsort(1)? The only open() with write access I
> could find there is the dbopen(NULL, ...). But the code in
> src/lib/libc/db/hash does not seem to create a file at all.
I did. I started a bulk build on NetBSD/sparc64 3.0. The output in the
log file showed:
tsort -q /usr/obj/bulk-log/.dependstree > /usr/obj/bulk-log/.order
tsort: db: devel/subversion-base: Permission denied
If I run the command manually from an unwriteable (to me) directory, I see:
tsort -q /usr/obj/bulk-log/.dependstree
tsort: db: devel/subversion-base: Permission denied
and ktruss shows:
15913 tsort open("_hash15913a", 0xa02, 0x180) Err#13 EACCES
I didn't follow the code path through, but hash/hash_page.c:open_temp() sets
up a temporary file with the template "_hashXXXXXX". I also noted that
btree/bt_open.c:__bt_open() checks "TMPDIR" via btree/bt_open.c:tmp(), but
__hash_open() and __rec_open() do not.
So, changing to a writeable directory (the bulk log file directory where
the 2 files were) seemed sensible to me. Now I see:
cd /usr/obj/bulk-log && tsort -q /usr/obj/bulk-log/.dependstree > /usr/obj/bulk-log/.order
and things are fine.
It might also be sensible to have __hash_open() and __rec_open() also check
"TMPDIR" and share the tmp() function.
J
--
My other computer also runs NetBSD / Sailing at Newbiggin
http://www.netbsd.org/ / http://www.newbigginsailingclub.org/