Bug#806608: cjk: FTBFS when built with dpkg-buildpackage -A (mkdir: cannot create directory)

2016-03-27 Thread Santiago Vila
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)


Bug#806608: cjk: FTBFS when built with dpkg-buildpackage -A (mkdir: cannot create directory)

2015-11-29 Thread 韓達耐
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.

Cheers

-- 
Danai

On 30 November 2015 at 00:22, Santiago Vila  wrote:

> Package: src:cjk
> Version: 4.8.4+git20150701-1
> User: sanv...@debian.org
> Usertags: binary-indep
> Severity: important
>
> Dear maintainer:
>
> I tried to build this package with "dpkg-buildpackage -A"
> (i.e. only architecture-independent packages), and it failed:
>
>
> 
> [...]
>  debian/rules build-indep
> dh_testdir
> mkdir build_thaifonts
> (cd build_thaifonts && cp ../utils/thaifont/tools/c90.*
> ../utils/thaifont/tools/*.fontinst
> /usr/share/texlive/texmf-dist/fonts/afm/public/fonts-tlwg/garuda*.afm
> /usr/share/texlive/texmf-dist/fonts/afm/public/fonts-tlwg/norasi*.afm .)
> (cd build_thaifonts && tex norasi-c90.fontinst && tex garuda-c90.fontinst
> && for i in f*.pl; do pltotf $i; done)
> This is TeX, Version 3.14159265 (TeX Live 2015/Debian) (preloaded
> format=tex)
> (./norasi-c90.fontinst
> (/usr/share/texlive/texmf-dist/tex/fontinst/base/fontinst.sty
> No file fontinst.rc.
> ) (./norasi.afm)
> Metrics written on norasi.mtx.
> (./norasi.mtx)
>
> [... snipped ...]
>
> fontinst warning:
> missing glyph `breve' for slot 21 in font `fgdo8z.pl'.
>
> )
> Font written on fgdo8z.pl.
> Font definitions written on c90garuda.fd.
> (/usr/share/texlive/texmf-dist/tex/fontinst/base/finstmsc.sty
> No file finstmsc.rc.
> ) (./c90.etx)
> Encoding vector written on c90.enc.
>  )
> No pages of output.
> Transcript written on garuda-c90.log.
> I had to round some heights by 0.0315008 units.
> I had to round some depths by 0.0345001 units.
> I had to round some heights by 0.0315008 units.
> I had to round some depths by 0.0345001 units.
> I had to round some italic corrections by 0.0010004 units.
> I had to round some heights by 0.0305004 units.
> I had to round some depths by 0.0305004 units.
> I had to round some italic corrections by 0.0010004 units.
> I had to round some heights by 0.0305004 units.
> I had to round some depths by 0.0305004 units.
> I had to round some heights by 0.027 units.
> I had to round some depths by 0.0265007 units.
> I had to round some heights by 0.0290003 units.
> I had to round some depths by 0.0270004 units.
> I had to round some italic corrections by 0.0005007 units.
> I had to round some heights by 0.0305004 units.
> I had to round some depths by 0.0314999 units.
> I had to round some italic corrections by 0.0010004 units.
> I had to round some heights by 0.0314999 units.
> I had to round some depths by 0.0305004 units.
> touch build-indep-stamp
>  fakeroot debian/rules binary-indep
> dh_testdir
> mkdir build_thaifonts
> mkdir: cannot create directory 'build_thaifonts': File exists
> debian/rules:49: recipe for target 'build-indep' failed
> make: *** [build-indep] Error 1
> dpkg-buildpackage: error: fakeroot debian/rules binary-indep gave error
> exit status 2
>
> 
>
> Sorry not to have a fix, as I am reporting many bugs similar to
> this one. The common hints are:
>
> * If the only architecture-independent packages are dummy transitional
> ones and they were released with jessie, the easy fix is to drop them
> now.
>
> * When using "dh", it is allowed to use (independently)
> optional targets override_dh_foo-arch and override_dh_foo-indep
> (for several values of "foo").
>
>
> Once that both "dpkg-buildpackage -A" and "dpkg-buildpackage -B" work
> properly, the package would be suitable to be uploaded in source-only
> form if you wish.
>
> Thanks.
>
>


Bug#806608: cjk: FTBFS when built with dpkg-buildpackage -A (mkdir: cannot create directory)

2015-11-29 Thread Santiago Vila
Package: src:cjk
Version: 4.8.4+git20150701-1
User: sanv...@debian.org
Usertags: binary-indep
Severity: important

Dear maintainer:

I tried to build this package with "dpkg-buildpackage -A"
(i.e. only architecture-independent packages), and it failed:


[...]
 debian/rules build-indep
dh_testdir
mkdir build_thaifonts
(cd build_thaifonts && cp ../utils/thaifont/tools/c90.* 
../utils/thaifont/tools/*.fontinst 
/usr/share/texlive/texmf-dist/fonts/afm/public/fonts-tlwg/garuda*.afm 
/usr/share/texlive/texmf-dist/fonts/afm/public/fonts-tlwg/norasi*.afm .)
(cd build_thaifonts && tex norasi-c90.fontinst && tex garuda-c90.fontinst && 
for i in f*.pl; do pltotf $i; done)
This is TeX, Version 3.14159265 (TeX Live 2015/Debian) (preloaded format=tex)
(./norasi-c90.fontinst
(/usr/share/texlive/texmf-dist/tex/fontinst/base/fontinst.sty
No file fontinst.rc.
) (./norasi.afm)
Metrics written on norasi.mtx.
(./norasi.mtx)

[... snipped ...]

fontinst warning:
missing glyph `breve' for slot 21 in font `fgdo8z.pl'.

)
Font written on fgdo8z.pl.
Font definitions written on c90garuda.fd.
(/usr/share/texlive/texmf-dist/tex/fontinst/base/finstmsc.sty
No file finstmsc.rc.
) (./c90.etx)
Encoding vector written on c90.enc.
 )
No pages of output.
Transcript written on garuda-c90.log.
I had to round some heights by 0.0315008 units.
I had to round some depths by 0.0345001 units.
I had to round some heights by 0.0315008 units.
I had to round some depths by 0.0345001 units.
I had to round some italic corrections by 0.0010004 units.
I had to round some heights by 0.0305004 units.
I had to round some depths by 0.0305004 units.
I had to round some italic corrections by 0.0010004 units.
I had to round some heights by 0.0305004 units.
I had to round some depths by 0.0305004 units.
I had to round some heights by 0.027 units.
I had to round some depths by 0.0265007 units.
I had to round some heights by 0.0290003 units.
I had to round some depths by 0.0270004 units.
I had to round some italic corrections by 0.0005007 units.
I had to round some heights by 0.0305004 units.
I had to round some depths by 0.0314999 units.
I had to round some italic corrections by 0.0010004 units.
I had to round some heights by 0.0314999 units.
I had to round some depths by 0.0305004 units.
touch build-indep-stamp
 fakeroot debian/rules binary-indep
dh_testdir
mkdir build_thaifonts
mkdir: cannot create directory 'build_thaifonts': File exists
debian/rules:49: recipe for target 'build-indep' failed
make: *** [build-indep] Error 1
dpkg-buildpackage: error: fakeroot debian/rules binary-indep gave error exit 
status 2


Sorry not to have a fix, as I am reporting many bugs similar to
this one. The common hints are:

* If the only architecture-independent packages are dummy transitional
ones and they were released with jessie, the easy fix is to drop them
now.

* When using "dh", it is allowed to use (independently)
optional targets override_dh_foo-arch and override_dh_foo-indep
(for several values of "foo").


Once that both "dpkg-buildpackage -A" and "dpkg-buildpackage -B" work
properly, the package would be suitable to be uploaded in source-only
form if you wish.

Thanks.