diff --git a/CHANGELOG.md b/CHANGELOG.md index 959bee9..28f5fc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.20.3] - 2025-06-25 + +### Fixed + +- Fixed bugs when partitioning disks + ## [0.20.2] - 2025-06-24 ### Changed diff --git a/ogclient/interfaceAdm/Configurar.py b/ogclient/interfaceAdm/Configurar.py index b6fb12f..39f2308 100755 --- a/ogclient/interfaceAdm/Configurar.py +++ b/ogclient/interfaceAdm/Configurar.py @@ -159,7 +159,7 @@ if 'CACHE' in sparam: # Definir particionado. SystemLib.ogEcho (['session', 'log'], None, f'[50] {ogGlobals.lang.MSG_HELP_ogCreatePartitions}') SystemLib.ogEcho (['session', 'log'], None, f' ogCreatePartitions {dis} {' '.join (tbp)}') -res = SystemLib.ogExecAndLog ('command', [f'{ogGlobals.OGPYFUNCS}/ogCreatePartitions', dis] + tbp) +res = SystemLib.ogExecAndLog ('command', [f'{ogGlobals.OGPYFUNCS}/ogCreatePartitions', str(dis)] + tbp) if not res: coproc.kill() SystemLib.ogRaiseError (['log', 'session'], ogGlobals.OG_ERR_GENERIC, f'ogCreatePartitions {dis} {' '.join (tbp)}') @@ -177,9 +177,9 @@ for p in range (1, maxp+1): retval = SystemLib.ogExecAndLog ('command', [f'{ogGlobals.OGPYFUNCS}/ogFormatCache']) else: SystemLib.ogEcho (['session', 'log'], None, f' ogFormatFs {dis} {p} {tbf[p]}') - retval = SystemLib.ogExecAndLog ('command', [f'{ogGlobals.OGPYFUNCS}/ogFormatFs', dis, str(p), tbf[p]]) - if retval: coproc.kill() + retval = SystemLib.ogExecAndLog ('command', [f'{ogGlobals.OGPYFUNCS}/ogFormatFs', str(dis), str(p), tbf[p]]) + if not retval: SystemLib.ogRaiseError (['session', 'log'], ogGlobals.OG_ERR_GENERIC, f'ogFormatFs {dis} {p} {tbf[p]}') sys.exit (1) # Registro de fin de ejecución diff --git a/ogclient/lib/python3/FileSystemLib.py b/ogclient/lib/python3/FileSystemLib.py index 1067ddc..f3cd9a3 100644 --- a/ogclient/lib/python3/FileSystemLib.py +++ b/ogclient/lib/python3/FileSystemLib.py @@ -263,7 +263,7 @@ def ogFormatFs (disk, par, fs=None, label=None): errcode = ogGlobals.OG_ERR_PARTITION ogUnlock (disk, par) - return errcode + return not errcode ## reverse to indicate success #/** diff --git a/ogclient/scripts/updateCache.py b/ogclient/scripts/updateCache.py index f0f7364..4d81517 100755 --- a/ogclient/scripts/updateCache.py +++ b/ogclient/scripts/updateCache.py @@ -143,7 +143,7 @@ if sizerequired >= cachesizefree: SystemLib.ogRaiseError ('session', ogGlobals.OG_ERR_CACHESIZE, 'CACHE') sys.exit (1) -# Comprobamos que imagen cache igual a la del repo. Si sincronizada no podemos comprobar. +# Comprobamos que imagen cache igual a la del repo. Si sincronizada no podemos comprobar. rc = ProtocolLib.ogUpdateCacheIsNecesary (repositorio, path, protocolo) # si rc=True: actualizamos; si rc=False: no actualizamos (exit 0); si rc=None: exit error if rc == True: pass ## es necesario actualizar