tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: ${WRKDIR}/.{error,warning}-done dash intentional?
Am 25.08.2023 um 00:21 schrieb J. Lewis Muir:
> Hi!
>
> I was just looking at the cookie files in ${WRKDIR} after building a
> package, and I noticed that they all use a suffix of "_done" except
> for .error-done and .warning-done, which use a dash instead of an
> underscore. Is that intentional?
>
> I see that they're defined in
>
> mk/bsd.pkg.error.mk
>
> like so:
>
> _ERROR_DONE_DIR= ${WRKDIR}/.error-done
> _WARNING_DONE_DIR= ${WRKDIR}/.warning-done
>
> I initially thought this was an inconsistency, but then I noticed that
> these are directories, not files, and the variable names don't start
> with _COOKIE, so maybe it's intentional?
You're right that this looks like an inconsistency at first, meaning
that the pkgsrc infrastructure uses several different schemes of filenames.
https://github.com/NetBSD/pkgsrc/commit/4fccc74f6f89b78d
Back in 2006, when I added these two directories, I knew about the
cookie files, but I don't think I had put many thoughts in the filename
scheme.
Since there will not be a package building phase named "warning" or
"error", renaming these directories wouldn't produce any name clashes.
As these variables all begin with an underscore, they are considered
implementation details. If you want, you can use an entirely different
naming scheme for all 'done' files and directories, and as long as the
names don't clash, there should be no difference in behavior.
Since the two schemes of 'done' files and directories serve separate
purposes, it may actually be confusing if they use the same naming
scheme, so I'd rather leave everything as-is. Or maybe rename
.error-done to .error-printed to highlight that these directories are
not related to the phase cookie files.
Roland
Home |
Main Index |
Thread Index |
Old Index