On Wed, 18 Mar 2009, Frédéric Brière wrote:

On Wed, Mar 18, 2009 at 09:48:32PM +0100, Martin Koeppe wrote:
The behaviour still hasn't changed. time_1.7-23 can't still be built

Hmm, me thinks Jonas mistook r269 for something else.  :)

with debhelper's dh_testroot, instead the hardcoded
  test "`id -u`" = 0
is executed.

What intrigues me is that dh_testroot does (almost) just that:

 if ($< != 0) {
        error("You must run this as root (or use fakeroot).");
 }

Why would one work but not the other?

That's not the point here. rules includes debhelper.mk, so the maintainer apparently intends to use debhelper. If he had included debhelper.mk first, this would be the case. Unfortunately, many maintainers don't include debhelper.mk first as they should.

This bug is about 'wrong' inclusion order in rules, and the current 0.4.53 still can't handle the 'wrong' order, so the bug shouldn't be closed.

But FYI: On interix root does not have uid 0 (no POSIX requirement), and I have patched debhelper for that. So for me it would be important that dh_testroot is used (I think one could expect that from debhelper.mk anyway), so I don't need to patch cdbs also and still can use it with the many packages that use debhelper.mk, even if they use the wrong inclusion order. For more details see also #416018 and http://www.debian-interix.net

The post from Jonas on 2008-07-12 is about using functions, not conditionals, but apparently this has not been done.

Notice that dh_testroot tests for the *real* UID, while buildcore.mk
tests for the *effective* UID.  Does this explain the discrepancy?
(What does "id -ru" return for you?)

No, it doesn't matter, see above.


Martin

Reply via email to