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

Re: debhelpers "dh_pycentral: failed to write to log" fails



[ This isn't the right list. ]

Soeren Sonnenburg wrote:
> Only on mips and mipsel dh_pycentral dies for shogun:
> 
> dh_pycentral -pshogun-python
> dh_pycentral: failed to write to log
> make: *** [debian/stamp-build-python] Error 1
> 
> http://buildd.debian.org/~jeroen/status/package.php?suite=unstable&p=shogun
> 
> I don't see the reason why it fails as the module is included in
> dh_python use Debian::Debhelper::Dh_Lib; and
> the /usr/share/perl5/Debian/Debhelper/Dh_Lib.pm open call looks OK to
> me.
> 
> # Run at exit. Add the command to the log files for the packages it acted
> # on, if it's exiting successfully.
> my $write_log=1;
> sub END {
>     if ($? == 0 && $write_log) {
>         my $cmd=basename($0);
>         foreach my $package (@{$dh{DOPACKAGES}}) {
>             my $ext=pkgext($package);
> -->         open(LOG, ">>", "debian/${ext}debhelper.log") || error("failed to write to log");
>             print LOG $cmd."\n";
>             close LOG;
>         }
>     }
> }
> 
> Anyone seeing similar things?

Combination of fun factors:

- mips* run the binary and clean target as real root
- cdbs runs dh_listpackages *after* dh_clean, thereby leaving root-owned
  logfiles behind after clean
- your rules file, for some reason, runs dh_pycentral in a build target
  (instead of the much more common binary target .. can that possibly be
  right?), which is not run as root and so cannot write to the log files

I've put a (partial) fix into debhelper 7.0.3.

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature


Reply to: