On Mon, 30 Nov 2015, Danai SAE-HAN (韓達耐) wrote:
> Hi Santiago
> Thanks for that bug report! It looks like it doesn't clean up some folder.
> Let me try to run your commands on my PC at home this week, and see if I can
> replicate it.
Actually, it is not lack of cleaning up:
dpkg-buildpackage calls the build targets and then the binary targets.
In the debian/rules for cjk, binary-indep depends on build-indep, so
when binary-indep is invoked, build-indep is executed again.
Because $(build_thaifonts) was already created the first time build-indep
was invoked, creating the directory again is what triggers the error.
Avoiding targets to be executed twice is precisely what stamp files
are used for. The attached patch (warning: not tested) might fix the problem.
Thanks.
--- a/debian/rules
+++ b/debian/rules
@@ -35,7 +35,9 @@ unixdate := $(shell expr $(unixdate) + 86400 )
build: $(QUILT_STAMPFN) build-stamp
-build-arch:
+build-arch: build-arch-stamp
+
+build-arch-stamp:
dh_testdir
# Update config.{guess,sub}
@@ -45,7 +47,9 @@ build-arch:
touch build-arch-stamp
-build-indep:
+build-indep: build-indep-stamp
+
+build-indep-stamp:
dh_testdir
mkdir $(build_thaifonts)