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

Bug#949006: debian-policy: Stop recommending stamp files in debian/rules



Source: debian-policy
Severity: wishlist

Hi,

I would like to propose that we drop or replace the following
recommendation in Policy:

"""
When a package has a configuration and build routine which takes a
long time, or when the makefiles are poorly designed, or when build
needs to run clean first, it is a good idea to touch build when the
build process is complete. This will ensure that if debian/rules build
is run again it will not rebuild the whole program. [11]
"""

(And related footnote about using "build-stamp" instead of "build").


I think a better solution would be to either drop the recommendation
entirely or keep it only for packages with this issue and
Rules-Requires-Root set to binary-targets.  Either way would enable me
to move some debhelper hacks out of the "default" in future compat
level (at least for people with Rules-Requires-Root).


# Rationale:


As I understand it, the primary purpose behind this recommendation
comes from the need for running "debian/rules build && fakeroot
debian/rules binary" and thereby repeating the build step in some
cases (as listed in the text).

However, with the advent of Rules-Requires-Root many packages can now
be built with a direct "debian/rules binary" call and here the stamp
file is no longer useful for the above purpose.

Furthermore, debhelper need some complexity in implementing/emulating
this behaviour.  This may sound "easy" until you try to implement this
"correctly" for the following sequence of debian/rules calls:


     debian/rules build-arch
     debian/rules binary-indep


This has resulted in debhelper using arcane trickery such as log files
(up to compat 9) and its own "stamp-log" (compat 10+).  Both
techniques have their limitations and causes frustrations for people
that has a "well-behaving" upstream build system as they have to work
around debhelper's trickery.

Notely, this trickery prevents you from hacking on the upstream parts
and use "dpkg-buildpackage -b -nc -uc -us" to reduce the build times
for subsequent builds.  You would have to add some rm -f calls to
delete "internal debhelper state files" as well between each
dpkg-buildpackage call.

Thanks,
~Niels


Reply to: