mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
migrate_to_bullseye: /etc/apt/sources.list may not exist
This commit is contained in:
parent
1e1b0ddbbb
commit
b928dd1222
1 changed files with 3 additions and 2 deletions
|
@ -299,7 +299,7 @@ class MyMigration(Migration):
|
||||||
# Check system is up to date
|
# Check system is up to date
|
||||||
# (but we don't if 'bullseye' is already in the sources.list ...
|
# (but we don't if 'bullseye' is already in the sources.list ...
|
||||||
# which means maybe a previous upgrade crashed and we're re-running it)
|
# which means maybe a previous upgrade crashed and we're re-running it)
|
||||||
if " bullseye " not in read_file("/etc/apt/sources.list"):
|
if os.path.exists("/etc/apt/sources.list") and " bullseye " not in read_file("/etc/apt/sources.list"):
|
||||||
tools_update(target="system")
|
tools_update(target="system")
|
||||||
upgradable_system_packages = list(_list_upgradable_apt_packages())
|
upgradable_system_packages = list(_list_upgradable_apt_packages())
|
||||||
if upgradable_system_packages:
|
if upgradable_system_packages:
|
||||||
|
@ -355,6 +355,7 @@ class MyMigration(Migration):
|
||||||
def patch_apt_sources_list(self):
|
def patch_apt_sources_list(self):
|
||||||
|
|
||||||
sources_list = glob.glob("/etc/apt/sources.list.d/*.list")
|
sources_list = glob.glob("/etc/apt/sources.list.d/*.list")
|
||||||
|
if os.path.exists("/etc/apt/sources.list"):
|
||||||
sources_list.append("/etc/apt/sources.list")
|
sources_list.append("/etc/apt/sources.list")
|
||||||
|
|
||||||
# This :
|
# This :
|
||||||
|
|
Loading…
Add table
Reference in a new issue