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

Problem with dpkg-architecture



Hello,

there is a small problem with dpkg-architecture nobody seems to have noticed
before.

"make" does by default override environment variables, unless the option
"-e" is given. For this, dpkg-cross sets MAKEFLAGS="-e".

In my proposal I assumed that "-e" is the default, but I was wrong. The
reason I didn't notice earlier is 1) that I use dpkg-cross, 2) my test cases
did not cover this.

There are three solutions to this problem, I hope you help me to decide on
the best one:

1) Make "-e" the default.
1.a) Packages that support dpkg-architecture specify "-e" at the top of
     debian/rules. [IMHO: This is bad because it forces many files to change]
1.b) Specify "MAKEFLAGS=-e" in dpkg-buildpackage. Note: make documentation
     does not recommend -e to be the default.
1.c) dpkg-architecture defaults to set not only the arch env variables, but
     also MAKEFLAGS += -e

2) Don't make "-e" the default.
   We can avoid this by testing the definition in the packages:
   ifndef DEB_HOST_ARCH
   DEB_HOST_ARCH := ${DEB_BUILD_ARCH}
   endif

   etc. Pro: Principle of least surprise is fulfilled. Affects only small
   part of the build system. Contra: Three times more lines (a check for
   each arch variable used). Many files have to be changed.

One good thing is that maintainers can choose between 1.a and 2 if we don't
go for 1.b and 1.c

If we go for 1.b and 1.c, the side effects could be critical. Therefore I
suggest to document 1.a and 2 in the dpkg-architecture documentation and let
the maintainer make the individual decision.

Please give me some input on this.

Thanks,
Marcus


-- 
`Rhubarb is no Egyptian god.' Debian http://www.debian.org   finger brinkmd@ 
Marcus Brinkmann              GNU    http://www.gnu.org     master.debian.org
Marcus.Brinkmann@ruhr-uni-bochum.de                        for public  PGP Key
http://homepage.ruhr-uni-bochum.de/Marcus.Brinkmann/       PGP Key ID 36E7CD09


Reply to: