Confliction:
The documentation says "It is possible to use a read-only ports tree" but I
got errors using the config example in:
https://www.openbsd.org/faq/ports/ports.html#PortsConfig

Explanation:
I found that save_history subroutine in
/usr/libdata/perl5/OpenBSD/PkgCreate.pm:1521 is trying to create the
directory /usr/ports/plist/arm/history in my read only tree.

Resolution:
After some digging through a perl module and an mk file I found that I have
to set the PLIST_REPOSITORY somewhere outside of the /usr/ports directory.
At this point I ran into the next problem where I had to set
BULK_COOKIES_DIR variable too. I spotted the UPDATE_COOKIES_DIR variable
along the way so I set that for good measure to head off future problems.

Conclusion:
These additional variables should be mentioned in the ports faq:
PLIST_REPOSITORY
BULK_COOKIES_DIR
UPDATE_COOKIES_DIR

Comment:
I found these two cookie directory variables not as user friendly as the
other mk variables since bsd.port.mk uses PORTSDIR to initialize the cookie
variables. This could be cleaned up a bit with a base COOKIES_DIR variable.
I ended up rewriting the variable initialization in my mk.conf:
BULK_COOKIES_DIR=${WRKOBJDIR}/bulk/${MACHINE_ARCH}
UPDATE_COOKIES_DIR=${WRKOBJDIR}/update/${MACHINE_ARCH}

-alfred

Reply via email to