On Thu, 05 Nov 2009, Mike Hommey wrote: > A bit more information. It *hum*hum* works, actually, and the error > message above was due to remaining stuff in > debian/source/include-binaries.
No, it really doesn't work as expected. It works in lenny but doesn't work properly in sid. I think it might be due to a behavioural difference in perl's File::Find... With --include-binaries if you should really get messages like this: dpkg-source: info: adding debian/test.png to debian/source/include-binaries and not: dpkg-source: info: adding ../test.png to debian/source/include-binaries debian/source/include-binaries should contain paths relative to the root directory of the source package. Effectively find() behaves differently but it's also due to a lack of a parameter that guaranteed that it would not change the current directory. So it's a bug of dpkg-source and not of File::Find. That said, it should work for binaries outside of the debian directory as it's not the same code path and in that case I get proper messages. Attached is the suggested patch. Tell me if you have other problems. Cheers, -- Raphaƫl Hertzog
diff --git a/scripts/Dpkg/Source/Package/V2.pm b/scripts/Dpkg/Source/Package/V2.pm index 613dff9..b7fe76d 100644 --- a/scripts/Dpkg/Source/Package/V2.pm +++ b/scripts/Dpkg/Source/Package/V2.pm @@ -349,8 +349,8 @@ sub do_build { } return @result; }; - find({ wanted => $check_binary, preprocess => $filter_ignore }, - File::Spec->catdir($dir, "debian")); + find({ wanted => $check_binary, preprocess => $filter_ignore, + no_chdir => 1 }, File::Spec->catdir($dir, "debian")); error(_g("detected %d unwanted binary file(s) " . "(add them in debian/source/include-binaries to allow their " . "inclusion)."), $unwanted_binaries) if $unwanted_binaries;