tags 589274 patch
thanks

Hi,

On Fri, 16 Jul 2010 11:47:06 +0200
Cyril Brulebois <k...@debian.org> wrote:

> your package FTBFS on kfreebsd-* due to some python issue in
> build_tools/mozc_version.py:
> | - third_party/rx/rx.gyp
> | Running GYP...
> | Traceback (most recent call last):
> |   File "build_mozc.py", line 775, in <module>
> |     main()
> |   File "build_mozc.py", line 767, in main
> |     GypMain(deps_file_name)
> |   File "build_mozc.py", line 335, in GypMain
> |     version = mozc_version.MozcVersion(template_path, expand_daily=False)
> |   File 
> "/build/buildd-mozc_0.12.410.102-1-kfreebsd-i386-J22oyk/mozc-0.12.410.102/build_tools/mozc_version.py",
>  line 83, in __init__
> |     self.ParseVersionFile(path, expand_daily)
> |   File 
> "/build/buildd-mozc_0.12.410.102-1-kfreebsd-i386-J22oyk/mozc-0.12.410.102/build_tools/mozc_version.py",
>  line 104, in ParseVersionFile
> |     self._revision = CalculateRevisionForPlatform(self._dict['REVISION'])
> |   File 
> "/build/buildd-mozc_0.12.410.102-1-kfreebsd-i386-J22oyk/mozc-0.12.410.102/build_tools/mozc_version.py",
>  line 71, in CalculateRevisionForPlatform
> |     if last_digit:
> | UnboundLocalError: local variable 'last_digit' referenced before assignment
> | make[1]: *** [override_dh_auto_configure] Error 1
> 

This problem can revise by patch that I attached.
It is not revised the other architecture.

Best regards,
 Nobuhiro

-- 
Nobuhiro Iwamatsu <iwama...@debian.org>
--- mozc-0.12.410.102.orig/build_mozc.py
+++ mozc-0.12.410.102/build_mozc.py
@@ -69,7 +69,7 @@ def IsMac():
 
 def IsLinux():
   """Returns true if the platform is Linux."""
-  return os.name == 'posix' and os.uname()[0] == 'Linux'
+  return os.name == 'posix' and os.uname()[0] == 'Linux' or os.uname()[0] == 'GNU/kFreeBSD'
 
 
 # TODO(yukawa): Move this function to util.py (b/2715400)
diff --git a/build_tools/mozc_version.py b/build_tools/mozc_version.py
index 42af980..9cd8c4e 100755
--- a/build_tools/mozc_version.py
+++ b/build_tools/mozc_version.py
@@ -55,7 +55,7 @@ def IsMac():
 
 def IsLinux():
   """Returns true if the platform is Linux."""
-  return os.name == 'posix' and os.uname()[0] == 'Linux'
+  return os.name == 'posix' and os.uname()[0] == 'Linux' or os.uname()[0] == 'GNU/kFreeBSD'
 
 
 def CalculateRevisionForPlatform(revision):

Reply via email to