mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Fix small issue with unscd upgrade/downgrade ... new version ain't always 0.53.1, so find it using dirty scrapping
This commit is contained in:
parent
ef15130980
commit
6defbfdbac
1 changed files with 5 additions and 1 deletions
|
@ -50,7 +50,11 @@ class MyMigration(Migration):
|
|||
# which for apt appears as a lower version (hence the --allow-downgrades and the hardcoded version number)
|
||||
unscd_version = check_output('dpkg -s unscd | grep "^Version: " | cut -d " " -f 2')
|
||||
if "yunohost" in unscd_version:
|
||||
self.apt_install('unscd=0.53-1+b1 --allow-downgrades')
|
||||
new_version = check_output("apt policy unscd 2>/dev/null | grep -v '\\*\\*\\*' | grep -A100 'Version table' | grep debian -B1 | head -n 1 | awk '{print $1}'")
|
||||
if new_version:
|
||||
self.apt_install('unscd=%s --allow-downgrades' % new_version)
|
||||
else:
|
||||
logger.warning("Could not identify which version of unscd to install")
|
||||
|
||||
# Upgrade libpam-modules independently, small issue related to willing to overwrite a file previously provided by Yunohost
|
||||
libpammodules_version = check_output('dpkg -s libpam-modules | grep "^Version: " | cut -d " " -f 2')
|
||||
|
|
Loading…
Add table
Reference in a new issue