Skip to content
Snippets Groups Projects
Unverified Commit 895e134a authored by Frede H's avatar Frede H :speech_balloon:
Browse files

Merge remote-tracking branch 'origin/master' into master

# Conflicts:
#	CHANGELOG.md
parents 706ceb64 5cbcd3f1
No related branches found
No related tags found
No related merge requests found
# Change Log
All notable changes to this project will be documented in this file.
## [4.17.1] 2020-09-19
* fix sway on arm
## [4.16.6] 2020-09-29
* fix --interactive on arm - sway edition
## [4.16.3] 2020-03-03
* Fix typo
......
......@@ -302,7 +302,9 @@ def parse_command_line(self, gtk_available: bool) -> None:
self.interactive = True
if args.default:
self.default = True
if os.environ.get("XDG_SESSION_TYPE") == "wayland" or not os.environ.get("DISPLAY") or not gtk_available:
# wayland - sway - console - gtk
if os.environ.get("XDG_SESSION_TYPE") == "wayland" or os.environ.get("XDG_SESSION_TYPE") == "tty" or not os.environ.get("DISPLAY") or not gtk_available:
self.no_display = True
"""
......
......@@ -51,7 +51,7 @@ def setup_config() -> tuple:
"test_file": conf.TEST_FILE,
"url_mirrors_json": conf.URL_MIRROR_JSON,
"url_status_json": conf.URL_STATUS_JSON,
"x32": False,
# "x32": False,
"arm": False
}
# try to replace default entries by reading conf file
......@@ -102,11 +102,11 @@ def sanitize_config(config: object) -> bool:
errors.append(" 'Method = {}'; {} {}".format(
config["method"], txt.EXP_CLR, "|".join(conf.METHODS)))
# Check Branch
if config["x32"]:
if config["branch"] not in conf.X32_BRANCHES:
errors.append(" 'Branch = {}'; {} {}".format(
config["branch"], txt.EXP_CLR, "|".join(conf.X32_BRANCHES)))
elif config["arm"]:
# if config["x32"]:
# if config["branch"] not in conf.X32_BRANCHES:
# errors.append(" 'Branch = {}'; {} {}".format(
# config["branch"], txt.EXP_CLR, "|".join(conf.X32_BRANCHES)))
if config["arm"]:
if config["branch"] not in conf.ARM_BRANCHES:
errors.append(" 'Branch = {}'; {} {}".format(
config["branch"], txt.EXP_CLR, "|".join(conf.ARM_BRANCHES)))
......
......@@ -64,9 +64,9 @@ def filter_user_branch(mirror_pool: list, config: object) -> list:
:return: list of up-to-date mirrors
"""
for idx, branch in enumerate(conf.BRANCHES):
if config["x32"]:
config_branch = config["branch"][4:]
elif config["arm"]:
#if config["x32"]:
# config_branch = config["branch"][4:]
if config["arm"]:
config_branch = config["branch"][4:]
else:
config_branch = config["branch"]
......
......@@ -120,8 +120,8 @@ def get_mirror_response(url: str, config: object, tty: bool = False, maxwait: in
message = ""
context = ssl.create_default_context()
arch = "x86_64"
if config["x32"]:
arch = "i686"
#if config["x32"]:
# arch = "i686"
if config["arm"]:
arch = "aarch64"
probe_url = f"{url}{config['branch']}/core/{arch}/{config['test_file']}"
......@@ -218,3 +218,4 @@ def download_mirror_pool(config: object, tty: bool = False, quiet: bool = False)
tty=tty)
result = (False, False)
return result
\ No newline at end of file
import importlib.util
import os
try:
importlib.util.find_spec("gi.repository.Gtk")
except ImportError:
GTK_AVAILABLE = False
else:
GTK_AVAILABLE = True
print(GTK_AVAILABLE)
# wayland - sway - console - gtk
print(os.environ.get("XDG_SESSION_TYPE"))
print(os.environ.get("DISPLAY"))
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment