[Pkg-mozext-maintainers] Bug#909527: Bug#909527: mozilla-devscripts: dh_webext breaks on non-ascii debian/control when building with LANG=C
Ximin Luo
infinity0 at debian.org
Thu Sep 27 04:46:00 BST 2018
Carsten Schoenert:
> [..]
> it seems some more fencing is needed.
> Even with the fix Christoph is suggesting I get some error like the one
> above.
>
> If I add the following additions it works better. Note, I'm not a Python
> programmer so this might done in a better way. :)
>
> @@ -70,7 +71,7 @@ def run(cmdline, verbose=False):
> subprocess.check_call(cmdline)
>
> def get_all_packages():
> - lines = open("debian/control").readlines()
> + lines = open("debian/control", encoding='utf8').readlines()
> package_lines = [x for x in lines if x.find("Package:") >= 0]
> packages = [p[p.find(":")+1:].strip() for p in package_lines]
> packages = [p for p in packages if p.startswith("webext-")]
> @@ -143,7 +144,7 @@ def install_webext(*args):
> args, unknown = parser.parse_known_args(args)
> if unknown:
> log("Ignored some command-line arguments: %r" % unknown)
> - packages = args.packages or get_all_packages()
> + packages = [x.decode('UTF8') for x in args.packages] or [x.decode('UTF8') for x in get_all_packages()]
>
> home = args.home
> name = args.name
>
On my computer here only the first hunk is necessary. Can you try without the second hunk? I can't see why it should be necessary.
--
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
https://github.com/infinity0/pubkeys.git
More information about the Pkg-mozext-maintainers
mailing list