mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[CI] Format code with Black
This commit is contained in:
parent
625eb79ca3
commit
f7fc609abe
2 changed files with 22 additions and 7 deletions
|
@ -64,7 +64,9 @@ class MyDiagnoser(Diagnoser):
|
|||
yunohost_version_req = (
|
||||
app["manifest"].get("requirements", {}).get("yunohost", "").strip(">= ")
|
||||
)
|
||||
if yunohost_version_req.startswith("2.") or yunohost_version_req.startswith("3."):
|
||||
if yunohost_version_req.startswith("2.") or yunohost_version_req.startswith(
|
||||
"3."
|
||||
):
|
||||
yield ("error", "diagnosis_apps_outdated_ynh_requirement")
|
||||
|
||||
deprecated_helpers = [
|
||||
|
|
|
@ -194,20 +194,31 @@ class MyMigration(Migration):
|
|||
os.system("mkdir -p /etc/systemd/system/dhcpcd.service.d")
|
||||
write_to_file(
|
||||
"/etc/systemd/system/dhcpcd.service.d/wait.conf",
|
||||
'[Service]\nExecStart=\nExecStart=/usr/sbin/dhcpcd -w'
|
||||
"[Service]\nExecStart=\nExecStart=/usr/sbin/dhcpcd -w",
|
||||
)
|
||||
|
||||
#
|
||||
# Another boring fix for the super annoying libc6-dev: Breaks libgcc-8-dev
|
||||
# https://forum.yunohost.org/t/20617
|
||||
#
|
||||
if os.system("grep -A10 'ynh-deps' /var/lib/dpkg/status | grep -q 'Depends:.*build-essential'") == 0:
|
||||
logger.info("Attempting to fix the build-essential / libc6-dev / libgcc-8-dev hell ...")
|
||||
if (
|
||||
os.system(
|
||||
"grep -A10 'ynh-deps' /var/lib/dpkg/status | grep -q 'Depends:.*build-essential'"
|
||||
)
|
||||
== 0
|
||||
):
|
||||
logger.info(
|
||||
"Attempting to fix the build-essential / libc6-dev / libgcc-8-dev hell ..."
|
||||
)
|
||||
os.system("cp /var/lib/dpkg/status /root/dpkg_status.bkp")
|
||||
# This removes the dependency to build-essential from $app-ynh-deps
|
||||
os.system("perl -i~ -0777 -pe 's/(Package: .*-ynh-deps\\n(.+:.+\\n)+Depends:.*)(build-essential, ?)(.*)/$1$4/g' /var/lib/dpkg/status")
|
||||
os.system(
|
||||
"perl -i~ -0777 -pe 's/(Package: .*-ynh-deps\\n(.+:.+\\n)+Depends:.*)(build-essential, ?)(.*)/$1$4/g' /var/lib/dpkg/status"
|
||||
)
|
||||
self.apt("build-essential", verb="remove")
|
||||
os.system("LC_ALL=C DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none apt autoremove --assume-yes")
|
||||
os.system(
|
||||
"LC_ALL=C DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none apt autoremove --assume-yes"
|
||||
)
|
||||
self.apt("gcc-8 libgcc-8-dev", verb="remove")
|
||||
|
||||
#
|
||||
|
@ -302,7 +313,9 @@ class MyMigration(Migration):
|
|||
|
||||
# Clean the mess
|
||||
logger.info(m18n.n("migration_0021_cleaning_up"))
|
||||
os.system("LC_ALL=C DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none apt autoremove --assume-yes")
|
||||
os.system(
|
||||
"LC_ALL=C DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none apt autoremove --assume-yes"
|
||||
)
|
||||
os.system("apt clean --assume-yes")
|
||||
|
||||
#
|
||||
|
|
Loading…
Add table
Reference in a new issue