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

Re: Overwriting binary files when building a package



* Thomas Weber <tweber@debian.org> [111212 22:29]:
> The problem is really that
> "debian/rules clean" doesn't give the same as "dpkg-source -x".
>
> As far as I understand Stefano in
> http://www.mail-archive.com/debian-ocaml-maint@lists.debian.org/msg22803.html,
> I have no guarantee that a buildd will actually run the "clean" target
> before building the package.

There is indeed no formal guarantee, so a package should not assume
clean is run. But that is only a problem if debian/rules build would
behave differently if clean would not have been called. If upstream
build scripts recreate the pdf files anyway, there is no danger.
(Though if you want to be sure, you can also delete the generated files
at the start of the build target).

To summarize some old discussions (I am too lazy to dig out decade old
mailing list discussions):

Your working directory should be the same regardless which of the
following sequences is called:

debian/rules clean

debian/rules build
debian/rules clean

debian/rules clean
debian/rules build
debian/rules clean

And your package should build the same files regardless of:

debian/rules build

debian/rules clean
debian/rules build

debian/rules clean
debian/rules build
debian/rules clean
debian/rules build

debian/rules clean
debian/rules build
debian/rules build

Though I assume there is a number of packages where a missing clean will
skew the build, as in practise it is always called before. Not being
able to build two times in a row is also a not uncommon bug.

	Bernhard R. Link


Reply to: