Package: dpkg-dev
Version: 1.22.8
Severity: important

Hi!

It seems like constructs like

  include /usr/share/dpkg/buildflags.mk
  CFLAGS += -DFOO
  LDFLAGS += -lbar

etc somehow stopped working on buildds since dpkg 1.22.8,
although I can't reproduce it locally no matter how I try.

An example is samba package which uses this construct in
a few places, and later uses the variables like this:

  CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" ./configure ...

No matter what I append to these variables, the resulting
value does not change.

I can only guess this is due to dpkg_lazy_eval which resets
values of each variable (it has `eval VAR=VAL` inside), but
the thing is that I can't reproduce it locally.  Something
might be different on a buildd.

Yes, I can switch to using DEB_LDFLAGS_MAINT_APPEND etc,
but it requires quite some rearrangements/reordering of
d/rules, and it doesn't tell me why current way, which
used to work before, broke now.

This issue potentially can affect multiple packages in an
unexpected way, because CFLAGS+=foo definitely used to
work before.

And no, 1.22.9 upload does not fix the issue.

Reply via email to