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

Enforce clean before unpatch (was: Re: debuild/dpkg-buildpackage behaves not as expected)



Hi,

Le 18/05/12 13:46, Goswin von Brederlow a écrit :
>> This works only for the special case that "build" does not change any
>> source file. Otherwise you would also commit the changed source files.
> 
> And it better not. There is no excuse for changing source files during
> build. If you need to change a file then that means that file isn't
> source anymore but generated. Try switching to out-of-tree builds if you
> have something like that.

In an ideal world, every file should be either source or generated.
Unfortunately in the real world some build systems modify some "source"
files. Even though, from our point of view, it would be best to get
upstream fixing this, this is not a reasonable assumption to think that
we can force them to.

Policy states that clean must revert any changes made during build, but
no policy states that no source file must be modified during build.

This is therefore not a reasonable assumption to expect that you can
unpatch before cleaning in the general case.

[...]

> I ment: It leaves the source in the same state it found it other than
> the side effects the called target(s) have themself.

And it's the role of the clean target to revert the changes introduced
by the "build" and "binary" targets...

> [...]
> My main point, which I didn't explicitly state, is this:
> 
> The way debuild/dpkg-buildpackage/dpkg-source currently behave allow
> maintainers to modify the behaviour by adding something to
> debian/rules. If the clean target needs the patches applied then
> debian/rules can easily make sure that they are.

Tanks, that's certainly the point: Ole and I must have missed the
documentation on this feature. Is it sufficient to make the clean target
depend on "patch"?

It's also possible that we simply have to dump a line in
debian/source/option to get the "-tc" option by default. Any pointer to
the right option would be welcome. I did look for it, but then: I can't
even find the butter in the fridge :-)

> [...] That means that the build MUST not
> modify any source files (which is simply evil to begin with) 

"Evil" is part of this world.

> [...]

Regards, Thibaut.


Reply to: