Subject: Re: [bulk] Adequate modelling of the report generation
To: Hubert Feyrer <firstname.lastname@example.org>
From: Roland Illig <rillig@NetBSD.org>
Date: 12/06/2005 11:20:59
Hubert Feyrer wrote:
> On Tue, 6 Dec 2005, Roland Illig wrote:
>> Up to now, I have only received comments for the bad choice of the FTP
>> host name. What I find much more interesting is the variable names and
>> their meanings.
>> - Do they make sense?
> +REPORT_BASEDIR=`date +%Y%m%d.%H%M`
> In the given case, a "base" directory would probably include
> /pub/NetBSD/pkgstat, i.e. the common part of both network and filesystem
> based access. As the two need to be the same in both places, adding them
> in the right place also removes a possible source of errors besides the
I don't think the two need to be the same. Maybe they are in your
configuration, but in my configuration the build host is different from
the report host, and so are my directories:
In this case there is no redundancy.
> I still think that
> REPORT_DIR="/pub/NetBSD/pkgstat`date +%Y%m%d.%H%M`"
> Would make most sence (as said before), as you're dealing with *two
> differend* base specifiers there.
And I would not want to mix two different things into REPORT_DIR, as you
did here. The post-build script adjusts the "last" link in the
/pub/NetBSD/pkgstat directory. The name of the directory would have to
be extracted from your REPORT_DIR variable, as well as the basename of
the report directory.
I find it much more appealing to let the user define the basic path
components and let the programs concatenate them instead of splitting
complex paths into components. It also makes the documentation easier to
read and write, as you have _names_ for the individual parts. With your
definition of REPORT_DIR, one had to write "everything except the last
component of REPORT_DIR" to refer to what I have called REPORTS_DIR.