On 29/10/13 11:45, Ximin Luo wrote: > On 29/10/13 10:24, Jakub Wilk wrote: >> Your clean target unapplies all the patches. >> > > That is still done independently of architecture, so I don't see why that > would > cause this bug. > > I don't believe it's incorrect to un-apply the patches during a clean, since > the build process is supposed to restore them. The normal developer tools work > this way: > > man dpkg-buildpackage: > > 3. If a specific target has been selected with the -T or --target > option, it calls that target and stops here. Otherwise it calls fakeroot > debian/rules clean to clean the build-tree (unless -nc is specified). > > 4. It calls dpkg-source -b to generate the source package (unless a > binary-only build has been requested with -b, -B or -A). >
I had a look and the bug symptom is due to buildd doing a binary-only build which bypasses `dpkg-source -b` re-applying the patches. Reading the documentation, it seems that the applied patches are strictly "part of the source package". So you are right that I ought not to be calling `dh_quilt_apply` and `dh_quilt_unapply`. However, the reason why I did this in the first place, is because `debuild clean` does not detect an unpatched source tree (which strictly is *not* the correct source package). man debuild: An alternative way of using debuild is to use one or more of the parameters binary, binary-arch, binary-indep and clean, in which case debuild will attempt to gain root privileges and then run debian/rules with the given parameters. Therefore I will file a bug for `debuild` in addition to fixing my clean target. There might be other tools that fail to properly check when the patches are applied, please let me know about them. (`dpkg-buildpackage` does do this, since it calls `dpkg-source --before-build` unconditionally.) > man dpkg-source: > > Note: dpkg-source --before-build (and -b) will ensure that all patches > listed in the series file are applied so that a package build always has all > patches applied. It does this by finding unapplied patches (they are listed in > the series file but not in > .pc/applied-patches), and if the first patch in that set can be applied > without errors, it will apply them all. The option --no-preparation can be > used > to disable this behavior. > > If buildd's behaviour differs from this, I consider it a bug of buildd and not > this package - I can't be expected to have a copy of the entire Debian build > infrastructure in order to maintain packages. > -- GPG: 4096R/1318EFAC5FBBDBCE git://github.com/infinity0/pubkeys.git
signature.asc
Description: OpenPGP digital signature