On Tue, Feb 05, 2013 at 11:28:05AM +0100, Landry Breuil wrote:
> On Tue, Feb 05, 2013 at 10:52:14AM +0100, Sébastien Marie wrote:
> > Hi,
> >
> > I start having a problem with recent bsd.port.mk in ports, that seems
> > related to readonly /usr/ports partition.
> >
> > My bsd.port.mk is 1.1208.
> > The base is (on i386):
> > OpenBSD 5.3-beta (GENERIC.MP) #25: Fri Feb 1 16:35:30 MST 2013
> >
> >
> > bert:/usr/ports/textproc/groff# make clean
> > ===> Cleaning for groff-1.21p8
> > rm: /usr/ports/textproc/groff/w-groff-1.21: Read-only file system
> > *** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2859
> > '_internal-clean': @rm -rf /usr/ports/textproc/groff/w-groff-1.21)
> > *** Error 1 in /usr/ports/textproc/groff
> > (/usr/ports/infrastructure/mk/bsd.port.mk:2342 'clean')
>
> w-XXXX (OLD_WRKDIR_NAME) calculation changed in
> http://www.openbsd.org/cgi-bin/cvsweb/ports/infrastructure/mk/bsd.port.mk.diff?r1=1.1205;r2=1.1206
>
> pretty sure that's related. The wrong codepath is used because
> WRKOBJDIR_${PKGPATH} is empty.
>
It seems not:
_WRKDIRS=/usr/ports/textproc/groff/w-groff-1.21 /usr/obj/pobj/groff-1.21
/usr/obj/pobj/groff-1.21 /tmp/pobj/groff-1.21
PKGPATH=textproc/groff
WRKOBJDIR_textproc/groff=/usr/obj/pobj
(I patch bsd.port.mk to echo vars just before line 2859).
It seems that _WRKDIRS is inconditionnally populated with ${OLD_WRKDIR_NAME}.
And rm(1) doesn't like read-only filesystem: with a user without write perm on
/usr/ports, and /usr/ports mount rw, there is no error...
For example: (/ is rw)
$ rm -rf /really-not-existent-file && echo $?
0
But if rm on read-only (/usr/ports is ro):
$ rm -rf /usr/ports/really-not-existent-file && echo $?
rm: /usr/ports/really-not-existent-file: Read-only file system
Should be considered as a bug in rm ?
--
Sébastien Marie