Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 535682 Details for
Bug 657766
app-emulation/qemu-2.12.0-r1(python3.5) - "UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 54: ordinal not in range(128)" if en_US.UTF-8 locale is not available
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
qemu-python.patch (text/plain), 4.37 KB, created by
Arfrever Frehtes Taifersar Arahesis
on 2018-06-12 05:56:05 UTC
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Arfrever Frehtes Taifersar Arahesis
Created:
2018-06-12 05:56:05 UTC
Size:
4.37 KB
patch
obsolete
>diff --git a/Makefile b/Makefile >index 023b3437ec..2d27bae0a8 100644 >--- a/Makefile >+++ b/Makefile >@@ -20,8 +20,6 @@ ifneq ($(wildcard config-host.mak),) > all: > include config-host.mak > >-PYTHON_UTF8 = LC_ALL= LANG=C LC_CTYPE=en_US.UTF-8 $(PYTHON) >- > git-submodule-update: > > .PHONY: git-submodule-update >@@ -576,7 +574,7 @@ qga/qapi-generated/qga-qapi-commands.h qga/qapi-generated/qga-qapi-commands.c \ > qga/qapi-generated/qga-qapi-doc.texi: \ > qga/qapi-generated/qapi-gen-timestamp ; > qga/qapi-generated/qapi-gen-timestamp: $(SRC_PATH)/qga/qapi-schema.json $(qapi-py) >- $(call quiet-command,$(PYTHON_UTF8) $(SRC_PATH)/scripts/qapi-gen.py \ >+ $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-gen.py \ > -o qga/qapi-generated -p "qga-" $<, \ > "GEN","$(@:%-timestamp=%)") > @>$@ >@@ -676,7 +674,7 @@ qapi/qapi-introspect.h qapi/qapi-introspect.c \ > qapi/qapi-doc.texi: \ > qapi-gen-timestamp ; > qapi-gen-timestamp: $(qapi-modules) $(qapi-py) >- $(call quiet-command,$(PYTHON_UTF8) $(SRC_PATH)/scripts/qapi-gen.py \ >+ $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-gen.py \ > -o "qapi" -b $<, \ > "GEN","$(@:%-timestamp=%)") > @>$@ >diff --git a/scripts/qapi/common.py b/scripts/qapi/common.py >index e82990f0f2..38bc6d7960 100644 >--- a/scripts/qapi/common.py >+++ b/scripts/qapi/common.py >@@ -261,7 +261,7 @@ class QAPISchemaParser(object): > self.fname = fp.name > previously_included.append(os.path.abspath(fp.name)) > self.incl_info = incl_info >- self.src = fp.read() >+ self.src = fp.read().decode("UTF-8") > if self.src == '' or self.src[-1] != '\n': > self.src += '\n' > self.cursor = 0 >@@ -343,7 +343,7 @@ class QAPISchemaParser(object): > return None > > try: >- fobj = open(incl_fname, 'r') >+ fobj = open(incl_fname, 'rb') > except IOError as e: > raise QAPISemError(info, '%s: %s' % (e.strerror, incl_fname)) > return QAPISchemaParser(fobj, previously_included, info) >@@ -1495,7 +1495,7 @@ class QAPISchemaEvent(QAPISchemaEntity): > class QAPISchema(object): > def __init__(self, fname): > self._fname = fname >- parser = QAPISchemaParser(open(fname, 'r')) >+ parser = QAPISchemaParser(open(fname, 'rb')) > exprs = check_exprs(parser.exprs) > self.docs = parser.docs > self._entity_list = [] >@@ -2009,14 +2009,14 @@ class QAPIGen(object): > if e.errno != errno.EEXIST: > raise > fd = os.open(pathname, os.O_RDWR | os.O_CREAT, 0o666) >- f = os.fdopen(fd, 'r+') >+ f = os.fdopen(fd, 'r+b') > text = (self._top(fname) + self._preamble + self._body > + self._bottom(fname)) >- oldtext = f.read(len(text) + 1) >+ oldtext = f.read(len(text) + 1).decode("UTF-8") > if text != oldtext: > f.seek(0) > f.truncate(0) >- f.write(text) >+ f.write(text.encode("UTF-8")) > f.close() > > >diff --git a/tests/Makefile.include b/tests/Makefile.include >index d098a104bb..cdfc2d1751 100644 >--- a/tests/Makefile.include >+++ b/tests/Makefile.include >@@ -675,13 +675,13 @@ tests/test-qapi-events.c tests/test-qapi-events.h \ > tests/test-qapi-introspect.c tests/test-qapi-introspect.h: \ > tests/test-qapi-gen-timestamp ; > tests/test-qapi-gen-timestamp: $(SRC_PATH)/tests/qapi-schema/qapi-schema-test.json $(qapi-py) >- $(call quiet-command,$(PYTHON_UTF8) $(SRC_PATH)/scripts/qapi-gen.py \ >+ $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-gen.py \ > -o tests -p "test-" $<, \ > "GEN","$(@:%-timestamp=%)") > @>$@ > > tests/qapi-schema/doc-good.test.texi: $(SRC_PATH)/tests/qapi-schema/doc-good.json $(qapi-py) >- $(call quiet-command,$(PYTHON_UTF8) $(SRC_PATH)/scripts/qapi-gen.py \ >+ $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-gen.py \ > -o tests/qapi-schema -p "doc-good-" $<, \ > "GEN","$@") > @mv tests/qapi-schema/doc-good-qapi-doc.texi $@ >@@ -939,7 +939,7 @@ check-tests/qemu-iotests-quick.sh: tests/qemu-iotests-quick.sh qemu-img$(EXESUF) > .PHONY: $(patsubst %, check-%, $(check-qapi-schema-y)) > $(patsubst %, check-%, $(check-qapi-schema-y)): check-%.json: $(SRC_PATH)/%.json > $(call quiet-command, PYTHONPATH=$(SRC_PATH)/scripts \ >- $(PYTHON_UTF8) $(SRC_PATH)/tests/qapi-schema/test-qapi.py \ >+ $(PYTHON) $(SRC_PATH)/tests/qapi-schema/test-qapi.py \ > $^ >$*.test.out 2>$*.test.err; \ > echo $$? >$*.test.exit, \ > "TEST","$*.out")
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 657766
:
535604
|
535606
| 535682