aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/portage/repository/storage/hardlink_rcu.py')
-rw-r--r--lib/portage/repository/storage/hardlink_rcu.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/portage/repository/storage/hardlink_rcu.py b/lib/portage/repository/storage/hardlink_rcu.py
index 4fd87a24b..6f464c8d0 100644
--- a/lib/portage/repository/storage/hardlink_rcu.py
+++ b/lib/portage/repository/storage/hardlink_rcu.py
@@ -19,13 +19,13 @@ class HardlinkRcuRepoStorage(RepoStorageInterface):
Enable read-copy-update (RCU) behavior for sync operations. The
current latest immutable version of a repository will be
reference by a symlink found where the repository would normally
- be located. Repository consumers should resolve the cannonical
+ be located. Repository consumers should resolve the canonical
path of this symlink before attempt to access the repository,
and all operations should be read-only, since the repository
is considered immutable. Updates occur by atomic replacement
of the symlink, which causes new consumers to use the new
immutable version, while any earlier consumers continue to use
- the cannonical path that was resolved earlier.
+ the canonical path that was resolved earlier.
Performance is better than HardlinkQuarantineRepoStorage,
since commit involves atomic replacement of a symlink. Since
@@ -112,7 +112,7 @@ class HardlinkRcuRepoStorage(RepoStorageInterface):
"""
Run cmd and raise RepoStorageException on failure.
- @param cmd: command to executre
+ @param cmd: command to execute
@type cmd: list
@param privileged: run with maximum privileges
@type privileged: bool
@@ -125,7 +125,7 @@ class HardlinkRcuRepoStorage(RepoStorageInterface):
p.start()
if await p.async_wait() != os.EX_OK:
raise RepoStorageException(
- "command exited with status {}: {}".format(p.returncode, " ".join(cmd))
+ f"command exited with status {p.returncode}: {' '.join(cmd)}"
)
async def init_update(self):
@@ -216,7 +216,7 @@ class HardlinkRcuRepoStorage(RepoStorageInterface):
os.unlink(new_symlink)
except OSError:
pass
- os.symlink("snapshots/{}".format(new_id), new_symlink)
+ os.symlink(f"snapshots/{new_id}", new_symlink)
# If SyncManager.pre_sync creates an empty directory where
# self._latest_symlink is suppose to be (which is normal if