summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-10-27 02:04:40 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-10-27 02:04:40 +0100
commit6b567b80c45c1f03c71e59cb4eb370fa331e038e (patch)
tree4a7a3e45fd8c49e9a3b1634c51363b3c87243b54
parentc9fada27e2381b7a3d53d93014a1a9921c0f56c4 (diff)
bugfix : https://bugs.redcorelinux.org/show_bug.cgi?id=129
-rw-r--r--src/backend/getEnvironment.py5
-rw-r--r--src/backend/resolveDeps.py8
2 files changed, 7 insertions, 6 deletions
diff --git a/src/backend/getEnvironment.py b/src/backend/getEnvironment.py
index 4214986..5edd038 100644
--- a/src/backend/getEnvironment.py
+++ b/src/backend/getEnvironment.py
@@ -1,16 +1,17 @@
#!/usr/bin/python3
+import io
import subprocess
def binhostURL():
binhostURL = []
portageExec = subprocess.Popen(['emerge', '--info', '--verbose'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- stdout, stderr = portageExec.communicate()
- for portageOutput in stdout.decode('ascii').splitlines():
+ for portageOutput in io.TextIOWrapper(portageExec.stdout, encoding="utf-8"):
if "PORTAGE_BINHOST" in portageOutput:
binhostURL = portageOutput.rstrip().split("=")[1].strip('\"')
+ portageExec.wait()
return binhostURL
def csvURL():
diff --git a/src/backend/resolveDeps.py b/src/backend/resolveDeps.py
index 517c574..41e9103 100644
--- a/src/backend/resolveDeps.py
+++ b/src/backend/resolveDeps.py
@@ -11,7 +11,7 @@ def package(pkgname):
portageExec = subprocess.Popen(['emerge', '--quiet', '--pretend', '--getbinpkg', '--rebuilt-binaries', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n'] + list(pkgname), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout, stderr = portageExec.communicate()
- for portageOutput in stderr.decode('ascii').splitlines():
+ for portageOutput in stderr.decode('utf-8').splitlines():
if "The following keyword changes are necessary to proceed:" in portageOutput:
needsConfig = int(1)
@@ -24,7 +24,7 @@ def package(pkgname):
if "The following REQUIRED_USE flag constraints are unsatisfied:" in portageOutput:
needsConfig = int(1)
- for portageOutput in stdout.decode('ascii').splitlines():
+ for portageOutput in stdout.decode('utf-8').splitlines():
if "[binary" in portageOutput:
isBinary = portageOutput.split("]")[1].split("[")[0].strip(" ")
areBinaries.append(isBinary)
@@ -43,7 +43,7 @@ def world():
portageExec = subprocess.Popen(['emerge', '--quiet', '--update', '--deep', '--newuse', '--pretend', '--getbinpkg', '--rebuilt-binaries', '--backtrack=100', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n', '@world'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout, stderr = portageExec.communicate()
- for portageOutput in stderr.decode('ascii').splitlines():
+ for portageOutput in stderr.decode('utf-8').splitlines():
if "The following keyword changes are necessary to proceed:" in portageOutput:
needsConfig = int(1)
@@ -56,7 +56,7 @@ def world():
if "The following REQUIRED_USE flag constraints are unsatisfied:" in portageOutput:
needsConfig = int(1)
- for portageOutput in stdout.decode('ascii').splitlines():
+ for portageOutput in stdout.decode('utf-8').splitlines():
if "[binary" in portageOutput:
isBinary = portageOutput.split("]")[1].split("[")[0].strip(" ")
areBinaries.append(isBinary)