MFH: r526586

Fix accidental overwriting of properties on update

See:
https://github.com/iocage/iocage/issues/1130
b47dc2c47f

PR:		244252

Approved by:	portmgr (runtime fix blanket)
This commit is contained in:
Michael Gmelin 2020-02-20 20:38:00 +00:00
parent 9dcb5d4edc
commit 6e9ebf3092
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/branches/2020Q1/; revision=526588
2 changed files with 28 additions and 1 deletions

View File

@ -2,7 +2,7 @@
PORTNAME= iocage
PORTVERSION= 1.2
PORTREVISION= 4
PORTREVISION= 5
CATEGORIES= sysutils python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}

View File

@ -0,0 +1,27 @@
See https://github.com/iocage/iocage/commit/b47dc2c47ff125d644720b03f598a9caf4e08192
--- iocage_lib/ioc_fetch.py.orig 2019-09-26 07:23:24 UTC
+++ iocage_lib/ioc_fetch.py
@@ -964,19 +964,16 @@ class IOCFetch(iocage_lib.ioc_json.IOCZF
if not cli:
for jail, path in jails.items():
- _json = iocage_lib.ioc_json.IOCJson(path)
+ _json = iocage_lib.ioc_json.IOCJson(path, cli=False)
props = _json.json_get_value('all')
if props['basejail'] and self.release.rsplit(
'-', 1
)[0] in props['release']:
- props['release'] = new_release
- _json.json_write(props)
+ _json.json_set_value(f'release={new_release}')
else:
- _json = iocage_lib.ioc_json.IOCJson(jails[uuid])
- props = _json.json_get_value('all')
- props['release'] = new_release
- _json.json_write(props)
+ _json = iocage_lib.ioc_json.IOCJson(jails[uuid], cli=False)
+ _json.json_set_value(f'release={new_release}')
if self.verify:
# tmp only exists if they verify SSL certs