[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Review of controllib-removal branch requested

On Wed, 2008-01-16 at 08:18:12 +0100, Raphael Hertzog wrote:
> On Wed, 16 Jan 2008, Guillem Jover wrote:
> > The Format substvar is not set anymore.
> Indeed, that was on purpose. It wasn't used by the code as a substitution
> but only like a general purpose variable (which I really created as is in
> dpkg-genchanges) and I have never seen any package use it. And it didn't
> make sense to store the version of the format of the changes file in all
> substvar objects that are used to make substitutions also in binary
> packages and source packages.

Well, it's a published interface (deb-substvars(5)), so I'd consider this
a regression. Exporting Format allows packages to extend it by changing
the value w/o needed to modify dpkg itself, and adding or changing
current field values for example.

> What would you suggest then ? Shall I add $substvar->set("Format",
> $changes_format) in dpkg-genchanges ?

Sure, and also override the Format field if such substvar is present
as documented in the man page.

> > In dpkg-source.pl, $varlistfile should not be initialized, this is a
> > functional change. I've actually been considering for some time
> > removing the substvar support from dpkg-source.

> It is a functional change indeed but it only brings it in line with the
> documentation, cf dpkg-source.1:
>        -Tsubstvarsfile
>               Read substitution variables in substvarsfile; the default is debian/substvars.

In this case I think the documentation is bogus. $varlistfile has
never been initialized since that option was added (fb269aa4). And I
don't think it makes sense to initalize it by default.

> As you say, if it's not initialised, we might as well drop the substvars
> support in dpkg-source.

One can always explicitely enable substvar processing by passing that
option, so it's not completely useless (another thing is if that
feature is desirable at all, but if it's disabled by default it does
not hurt having it).


Reply to: