* [gentoo-commits] proj/portage:master commit in: lib/portage/tests/resolver/binpkg_multi_instance/, lib/portage/util/elf/, ...
@ 2023-02-03 13:00 Sam James
0 siblings, 0 replies; only message in thread
From: Sam James @ 2023-02-03 13:00 UTC (permalink / raw
To: gentoo-commits
commit: 4ceb199aab8035fdf2ebd244e213ca63c29b4d5f
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 3 12:59:29 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Feb 3 12:59:54 2023 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=4ceb199a
*/*: rerun black w/ 23.1.0
Signed-off-by: Sam James <sam <AT> gentoo.org>
bin/chmod-lite.py | 1 -
bin/chpathtool.py | 1 -
bin/dispatch-conf | 1 +
bin/dohtml.py | 1 -
bin/ebuild | 1 +
bin/ebuild-ipc.py | 9 +--
bin/egencache | 7 +--
bin/emaint | 1 +
bin/emerge | 1 +
bin/glsa-check | 6 +-
bin/gpkg-helper.py | 1 -
bin/lock-helper.py | 1 -
bin/portageq | 4 +-
bin/xattr-helper.py | 1 -
bin/xpak-helper.py | 2 -
lib/_emerge/AbstractEbuildProcess.py | 5 --
lib/_emerge/AbstractPollTask.py | 1 -
lib/_emerge/AsynchronousLock.py | 2 -
lib/_emerge/AsynchronousTask.py | 1 -
lib/_emerge/AtomArg.py | 1 -
lib/_emerge/Binpkg.py | 7 ---
| 1 -
| 1 -
lib/_emerge/BinpkgFetcher.py | 2 -
lib/_emerge/BinpkgPrefetcher.py | 2 -
lib/_emerge/BinpkgVerifier.py | 3 -
lib/_emerge/Blocker.py | 1 -
lib/_emerge/BlockerCache.py | 1 -
lib/_emerge/CompositeTask.py | 1 -
lib/_emerge/DepPriority.py | 1 -
lib/_emerge/DependencyArg.py | 1 -
lib/_emerge/EbuildBinpkg.py | 1 -
lib/_emerge/EbuildBuild.py | 5 --
lib/_emerge/EbuildBuildDir.py | 1 -
lib/_emerge/EbuildExecuter.py | 3 -
lib/_emerge/EbuildFetcher.py | 3 -
lib/_emerge/EbuildFetchonly.py | 1 -
lib/_emerge/EbuildIpcDaemon.py | 1 -
lib/_emerge/EbuildMerge.py | 1 -
lib/_emerge/EbuildMetadataPhase.py | 1 -
lib/_emerge/EbuildPhase.py | 9 ---
lib/_emerge/EbuildProcess.py | 2 -
lib/_emerge/EbuildSpawnProcess.py | 1 -
lib/_emerge/FakeVartree.py | 3 -
lib/_emerge/FifoIpcDaemon.py | 1 -
lib/_emerge/JobStatusDisplay.py | 3 -
lib/_emerge/MergeListItem.py | 5 --
lib/_emerge/MetadataRegen.py | 1 -
lib/_emerge/Package.py | 7 ---
lib/_emerge/PackageMerge.py | 1 -
lib/_emerge/PackageUninstall.py | 2 -
lib/_emerge/PipeReader.py | 2 -
lib/_emerge/PollScheduler.py | 1 -
lib/_emerge/Scheduler.py | 22 -------
lib/_emerge/SequentialTaskQueue.py | 2 -
lib/_emerge/SetArg.py | 1 -
lib/_emerge/SpawnProcess.py | 1 -
lib/_emerge/SubProcess.py | 1 -
lib/_emerge/UseFlagDisplay.py | 1 -
lib/_emerge/actions.py | 28 ---------
lib/_emerge/depgraph.py | 71 +---------------------
lib/_emerge/emergelog.py | 1 -
lib/_emerge/main.py | 1 -
lib/_emerge/post_emerge.py | 1 -
lib/_emerge/resolver/backtracking.py | 4 --
lib/_emerge/resolver/circular_dependency.py | 2 -
lib/_emerge/resolver/output_helpers.py | 4 --
lib/_emerge/resolver/package_tracker.py | 1 -
lib/_emerge/search.py | 3 -
lib/_emerge/show_invalid_depstring_notice.py | 1 -
lib/_emerge/unmerge.py | 1 -
lib/portage/__init__.py | 4 --
lib/portage/_emirrordist/Config.py | 2 -
lib/portage/_emirrordist/DeletionIterator.py | 2 -
lib/portage/_emirrordist/DeletionTask.py | 4 --
lib/portage/_emirrordist/FetchIterator.py | 4 --
lib/portage/_emirrordist/FetchTask.py | 15 -----
lib/portage/_emirrordist/MirrorDistTask.py | 7 ---
lib/portage/_emirrordist/main.py | 2 -
lib/portage/_sets/__init__.py | 1 -
lib/portage/_sets/dbapi.py | 11 ----
lib/portage/cache/anydbm.py | 1 -
lib/portage/cache/ebuild_xattr.py | 2 -
lib/portage/cache/flat_hash.py | 2 -
lib/portage/cache/fs_template.py | 1 -
lib/portage/cache/index/IndexStreamIterator.py | 4 --
lib/portage/cache/index/pkg_desc_index.py | 1 -
lib/portage/cache/mappings.py | 3 -
lib/portage/cache/sql_template.py | 1 -
lib/portage/cache/sqlite.py | 1 -
lib/portage/cache/template.py | 6 +-
lib/portage/cache/volatile.py | 1 -
lib/portage/checksum.py | 1 -
lib/portage/data.py | 1 -
lib/portage/dbapi/IndexedPortdb.py | 3 -
lib/portage/dbapi/_SyncfsProcess.py | 2 -
lib/portage/dbapi/_VdbMetadataDelta.py | 3 -
lib/portage/dbapi/_similar_name_search.py | 1 -
lib/portage/dbapi/bintree.py | 5 --
lib/portage/dbapi/porttree.py | 2 -
lib/portage/dbapi/vartree.py | 26 --------
lib/portage/dep/__init__.py | 8 ---
lib/portage/dep/_slot_operator.py | 1 -
lib/portage/dep/soname/SonameAtom.py | 1 -
lib/portage/dep/soname/multilib_category.py | 3 -
lib/portage/elog/mod_save.py | 1 -
lib/portage/emaint/main.py | 1 -
lib/portage/emaint/modules/binhost/binhost.py | 2 -
lib/portage/emaint/modules/config/config.py | 1 -
lib/portage/emaint/modules/logs/logs.py | 1 -
lib/portage/emaint/modules/move/move.py | 2 -
lib/portage/emaint/modules/resume/resume.py | 1 -
lib/portage/emaint/modules/sync/sync.py | 1 -
lib/portage/emaint/modules/world/world.py | 1 -
lib/portage/getbinpkg.py | 3 -
lib/portage/gpkg.py | 2 -
lib/portage/locks.py | 1 -
lib/portage/mail.py | 2 -
lib/portage/output.py | 1 -
.../package/ebuild/_config/LicenseManager.py | 1 -
lib/portage/package/ebuild/_ipc/ExitCommand.py | 2 -
lib/portage/package/ebuild/_ipc/IpcCommand.py | 1 -
lib/portage/package/ebuild/_ipc/QueryCommand.py | 1 -
lib/portage/package/ebuild/_metadata_invalid.py | 1 -
.../ebuild/_parallel_manifest/ManifestProcess.py | 1 -
.../ebuild/_parallel_manifest/ManifestScheduler.py | 2 -
.../ebuild/_parallel_manifest/ManifestTask.py | 1 -
lib/portage/package/ebuild/config.py | 6 --
lib/portage/package/ebuild/doebuild.py | 10 ---
lib/portage/package/ebuild/fetch.py | 6 --
lib/portage/package/ebuild/getmaskingstatus.py | 3 -
lib/portage/package/ebuild/prepare_build_dirs.py | 1 -
lib/portage/process.py | 5 --
lib/portage/proxy/lazyimport.py | 2 -
lib/portage/repository/config.py | 3 +-
lib/portage/sync/controller.py | 1 -
lib/portage/sync/modules/rsync/rsync.py | 1 -
lib/portage/sync/modules/webrsync/webrsync.py | 1 -
lib/portage/tests/bin/test_filter_bash_env.py | 1 -
lib/portage/tests/dbapi/test_auxdb.py | 1 -
lib/portage/tests/dbapi/test_portdb_cache.py | 1 -
lib/portage/tests/dep/testAtom.py | 1 -
lib/portage/tests/dep/testStandalone.py | 1 -
lib/portage/tests/dep/test_dep_getcpv.py | 1 -
lib/portage/tests/dep/test_dep_getrepo.py | 1 -
lib/portage/tests/dep/test_dep_getslot.py | 1 -
lib/portage/tests/dep/test_dep_getusedeps.py | 1 -
lib/portage/tests/dep/test_dnf_convert.py | 1 -
lib/portage/tests/dep/test_get_operator.py | 1 -
lib/portage/tests/dep/test_isjustname.py | 1 -
lib/portage/tests/dep/test_isvalidatom.py | 1 -
lib/portage/tests/dep/test_overlap_dnf.py | 1 -
lib/portage/tests/dep/test_paren_reduce.py | 1 -
lib/portage/tests/dep/test_soname_atom_pickle.py | 1 -
lib/portage/tests/dep/test_use_reduce.py | 1 -
lib/portage/tests/ebuild/test_config.py | 3 -
lib/portage/tests/ebuild/test_doebuild_fd_pipes.py | 2 -
lib/portage/tests/ebuild/test_doebuild_spawn.py | 2 -
lib/portage/tests/ebuild/test_fetch.py | 2 -
lib/portage/tests/ebuild/test_ipc_daemon.py | 1 -
lib/portage/tests/ebuild/test_shell_quote.py | 2 +-
.../tests/ebuild/test_use_expand_incremental.py | 1 -
lib/portage/tests/emerge/test_config_protect.py | 1 -
.../emerge/test_emerge_blocker_file_collision.py | 2 -
lib/portage/tests/emerge/test_emerge_slot_abi.py | 2 -
lib/portage/tests/emerge/test_simple.py | 3 -
.../tests/env/config/test_PackageKeywordsFile.py | 1 -
.../tests/env/config/test_PackageUseFile.py | 1 -
.../tests/env/config/test_PortageModulesFile.py | 1 -
lib/portage/tests/glsa/test_security_set.py | 1 -
.../test_lazy_import_portage_baseline.py | 1 -
lib/portage/tests/process/test_PopenProcess.py | 2 -
.../tests/process/test_PopenProcessBlockingIO.py | 1 -
lib/portage/tests/process/test_poll.py | 2 -
lib/portage/tests/process/test_unshare_net.py | 1 -
lib/portage/tests/resolver/ResolverPlayground.py | 5 --
.../test_build_id_profile_format.py | 1 -
.../binpkg_multi_instance/test_rebuilt_binaries.py | 1 -
.../tests/resolver/soname/test_autounmask.py | 1 -
lib/portage/tests/resolver/soname/test_depclean.py | 1 -
.../tests/resolver/soname/test_downgrade.py | 2 -
.../tests/resolver/soname/test_or_choices.py | 1 -
.../tests/resolver/soname/test_reinstall.py | 1 -
.../tests/resolver/soname/test_skip_update.py | 1 -
.../soname/test_slot_conflict_reinstall.py | 1 -
.../resolver/soname/test_slot_conflict_update.py | 1 -
.../tests/resolver/soname/test_soname_provided.py | 1 -
.../tests/resolver/soname/test_unsatisfiable.py | 1 -
.../tests/resolver/soname/test_unsatisfied.py | 1 -
.../test_aggressive_backtrack_downgrade.py | 1 -
lib/portage/tests/resolver/test_autounmask.py | 4 --
.../tests/resolver/test_autounmask_multilib_use.py | 1 -
.../tests/resolver/test_autounmask_parent.py | 1 -
.../tests/resolver/test_autounmask_use_breakage.py | 1 -
lib/portage/tests/resolver/test_bdeps.py | 1 -
.../resolver/test_binary_pkg_ebuild_visibility.py | 1 -
lib/portage/tests/resolver/test_changed_deps.py | 1 -
.../tests/resolver/test_circular_choices.py | 5 --
.../tests/resolver/test_circular_choices_rust.py | 1 -
.../tests/resolver/test_circular_dependencies.py | 2 -
...test_complete_if_new_subslot_without_revbump.py | 1 -
lib/portage/tests/resolver/test_depclean.py | 3 -
lib/portage/tests/resolver/test_depclean_order.py | 1 -
lib/portage/tests/resolver/test_depth.py | 1 -
lib/portage/tests/resolver/test_eapi.py | 1 -
.../resolver/test_imagemagick_graphicsmagick.py | 1 -
lib/portage/tests/resolver/test_or_choices.py | 3 -
lib/portage/tests/resolver/test_package_tracker.py | 1 -
.../tests/resolver/test_profile_default_eapi.py | 1 -
.../tests/resolver/test_profile_package_set.py | 1 -
.../test_regular_slot_change_without_revbump.py | 1 -
lib/portage/tests/resolver/test_required_use.py | 1 -
.../resolver/test_slot_change_without_revbump.py | 1 -
lib/portage/tests/resolver/test_slot_collisions.py | 1 -
.../resolver/test_slot_conflict_force_rebuild.py | 1 -
.../tests/resolver/test_slot_conflict_rebuild.py | 2 -
.../test_slot_conflict_unsatisfied_deep_deps.py | 1 -
.../tests/resolver/test_slot_conflict_update.py | 1 -
.../resolver/test_slot_conflict_update_virt.py | 1 -
.../resolver/test_slot_operator_complete_graph.py | 1 -
.../resolver/test_slot_operator_exclusive_slots.py | 1 -
.../resolver/test_slot_operator_missed_update.py | 1 -
.../tests/resolver/test_slot_operator_rebuild.py | 1 -
.../resolver/test_slot_operator_required_use.py | 1 -
.../resolver/test_slot_operator_reverse_deps.py | 1 -
.../test_slot_operator_runtime_pkg_mask.py | 1 -
.../resolver/test_slot_operator_unsatisfied.py | 1 -
..._slot_operator_update_probe_parent_downgrade.py | 1 -
.../test_solve_non_slot_operator_slot_conflicts.py | 1 -
.../tests/resolver/test_use_dep_defaults.py | 1 -
lib/portage/tests/resolver/test_virtual_slot.py | 4 --
lib/portage/tests/sets/shell/testShell.py | 1 -
lib/portage/tests/sync/test_sync_local.py | 1 -
lib/portage/tests/unicode/test_string_format.py | 3 -
lib/portage/tests/update/test_move_ent.py | 1 -
lib/portage/tests/update/test_move_slot_ent.py | 1 -
lib/portage/tests/update/test_update_dbentry.py | 1 -
.../tests/util/eventloop/test_call_soon_fifo.py | 1 -
lib/portage/tests/util/file_copy/test_copyfile.py | 2 -
.../util/futures/asyncio/test_child_watcher.py | 1 -
.../util/futures/asyncio/test_subprocess_exec.py | 2 -
.../tests/util/futures/test_compat_coroutine.py | 1 -
.../tests/util/futures/test_done_callback.py | 1 -
.../tests/util/futures/test_iter_completed.py | 2 -
lib/portage/tests/util/test_file_copier.py | 1 -
lib/portage/tests/util/test_normalizedPath.py | 1 -
lib/portage/tests/util/test_shelve.py | 1 -
lib/portage/tests/util/test_socks5.py | 2 -
lib/portage/tests/util/test_stackDicts.py | 2 -
lib/portage/tests/util/test_stackLists.py | 1 -
lib/portage/tests/util/test_varExpand.py | 4 --
lib/portage/tests/versions/test_cpv_sort_key.py | 1 -
lib/portage/tests/versions/test_vercmp.py | 3 -
lib/portage/tests/xpak/test_decodeint.py | 1 -
lib/portage/update.py | 1 -
lib/portage/util/__init__.py | 6 --
lib/portage/util/_async/FileDigester.py | 1 -
lib/portage/util/_async/ForkProcess.py | 1 -
lib/portage/util/_async/PipeLogger.py | 1 -
lib/portage/util/_async/PopenProcess.py | 2 -
lib/portage/util/_async/SchedulerInterface.py | 2 -
lib/portage/util/_dyn_libs/LinkageMapELF.py | 1 -
.../util/_dyn_libs/display_preserved_libs.py | 1 -
lib/portage/util/_get_vm_info.py | 2 -
lib/portage/util/_info_files.py | 1 -
lib/portage/util/compression_probe.py | 1 -
| 1 -
lib/portage/util/futures/_sync_decorator.py | 1 -
lib/portage/util/futures/compat_coroutine.py | 1 +
lib/portage/util/iterators/MultiIterGroupBy.py | 5 --
lib/portage/util/movefile.py | 4 --
lib/portage/versions.py | 1 -
lib/portage/xpak.py | 1 -
setup.py | 1 -
274 files changed, 17 insertions(+), 650 deletions(-)
diff --git a/bin/chmod-lite.py b/bin/chmod-lite.py
index 517a55bd9..5ce801c27 100755
--- a/bin/chmod-lite.py
+++ b/bin/chmod-lite.py
@@ -12,7 +12,6 @@ os.chdir(os.environ["__PORTAGE_HELPER_CWD"])
def main(files):
-
# We can't trust that the filesystem encoding (locale dependent)
# correctly matches the arguments, so use surrogateescape to
# pass through the original argv bytes for Python 3.
diff --git a/bin/chpathtool.py b/bin/chpathtool.py
index bd7493c45..8cc80b25d 100755
--- a/bin/chpathtool.py
+++ b/bin/chpathtool.py
@@ -143,7 +143,6 @@ def chpath_inplace_symlink(filename, st, old, new):
def main(argv):
-
parser = argparse.ArgumentParser(description=doc)
parser.add_argument("location", default=None, help="root directory (e.g. ${D})")
parser.add_argument("old", default=None, help="original build prefix (e.g. /)")
diff --git a/bin/dispatch-conf b/bin/dispatch-conf
index 9ca711b47..e0069d007 100755
--- a/bin/dispatch-conf
+++ b/bin/dispatch-conf
@@ -78,6 +78,7 @@ while SCRATCH_DIR is None:
raise
os.umask(oldmask)
+
# Ensure the scratch dir is deleted
def cleanup(mydir=SCRATCH_DIR):
shutil.rmtree(mydir)
diff --git a/bin/dohtml.py b/bin/dohtml.py
index d1f0e3140..9a8cd4c00 100755
--- a/bin/dohtml.py
+++ b/bin/dohtml.py
@@ -243,7 +243,6 @@ def parse_args():
def main():
-
(options, args) = parse_args()
if options.verbose:
diff --git a/bin/ebuild b/bin/ebuild
index dab82ab2e..8d1908795 100755
--- a/bin/ebuild
+++ b/bin/ebuild
@@ -10,6 +10,7 @@ raise_signal = getattr(
signal, "raise_signal", lambda signum: os.kill(os.getpid(), signum)
)
+
# Inherit from KeyboardInterrupt to avoid a traceback from asyncio.
class SignalInterrupt(KeyboardInterrupt):
def __init__(self, signum):
diff --git a/bin/ebuild-ipc.py b/bin/ebuild-ipc.py
index fa61d1ccc..df70850c0 100755
--- a/bin/ebuild-ipc.py
+++ b/bin/ebuild-ipc.py
@@ -13,6 +13,7 @@ raise_signal = getattr(
signal, "raise_signal", lambda signum: os.kill(os.getpid(), signum)
)
+
# Inherit from KeyboardInterrupt to avoid a traceback from asyncio.
class SignalInterrupt(KeyboardInterrupt):
def __init__(self, signum):
@@ -81,7 +82,6 @@ try:
RETURNCODE_WRITE_FAILED = 2
class FifoWriter(AbstractPollTask):
-
__slots__ = ("buf", "fifo", "_fd")
def _start(self):
@@ -128,7 +128,6 @@ try:
self._fd = None
class EbuildIpc:
-
# Timeout for each individual communication attempt (we retry
# as long as the daemon process appears to be alive).
_COMMUNICATE_RETRY_TIMEOUT = 15 # seconds
@@ -151,7 +150,6 @@ try:
return False
def communicate(self, args):
-
# Make locks quiet since unintended locking messages displayed on
# stdout could corrupt the intended output of this program.
portage.locks._quiet = True
@@ -209,7 +207,6 @@ try:
return fifo_writer.wait()
def _receive_reply(self, input_fd):
-
start_time = time.time()
pipe_reader = PipeReader(
@@ -237,7 +234,6 @@ try:
retval = 2
if not buf:
-
portage.util.writemsg_level(
f"ebuild-ipc: {portage.localization._('read failed')}\n",
level=logging.ERROR,
@@ -245,7 +241,6 @@ try:
)
else:
-
try:
reply = pickle.loads(buf)
except SystemExit:
@@ -258,7 +253,6 @@ try:
)
else:
-
(out, err, retval) = reply
if out:
@@ -270,7 +264,6 @@ try:
return retval
def _communicate(self, args):
-
if not self._daemon_is_alive():
self._no_daemon_msg()
return 2
diff --git a/bin/egencache b/bin/egencache
index 0050ca32a..1a6118bde 100755
--- a/bin/egencache
+++ b/bin/egencache
@@ -10,6 +10,7 @@ raise_signal = getattr(
signal, "raise_signal", lambda signum: os.kill(os.getpid(), signum)
)
+
# Inherit from KeyboardInterrupt to avoid a traceback from asyncio.
class SignalInterrupt(KeyboardInterrupt):
def __init__(self, signum):
@@ -376,7 +377,6 @@ try:
self._write_cache(trg_cache, cpv, repo_path, metadata, ebuild_hash)
def _write_cache(self, trg_cache, cpv, repo_path, metadata, ebuild_hash):
-
if not hasattr(trg_cache, "raise_stat_collision"):
# This cache does not avoid redundant writes automatically,
# so check for an identical existing entry before writing.
@@ -551,7 +551,6 @@ try:
self._verbose = verbose
def run(self):
-
display_updates = self._verbose > 0
old = {}
new = {}
@@ -901,7 +900,6 @@ try:
)
def generate_changelog(self, cp):
-
os.chdir(os.path.join(self._repo_path, cp))
# Determine whether ChangeLog is up-to-date by comparing
# the newest commit timestamp with the ChangeLog timestamp.
@@ -1099,7 +1097,6 @@ try:
)
def egencache_main(args):
-
# The calling environment is ignored, so the program is
# completely controlled by commandline arguments.
env = {}
@@ -1223,7 +1220,6 @@ try:
if options.update_manifests:
if repo_config.sign_manifest:
-
sign_problem = False
gpg_dir = None
gpg_cmd = settings.get("PORTAGE_GPG_SIGNING_COMMAND")
@@ -1361,7 +1357,6 @@ try:
ret.append(gen_clogs.returncode)
if options.update_manifests:
-
cp_iter = None
if atoms:
cp_iter = iter(atoms)
diff --git a/bin/emaint b/bin/emaint
index 7fb38f5e3..a1b726b18 100755
--- a/bin/emaint
+++ b/bin/emaint
@@ -13,6 +13,7 @@ raise_signal = getattr(
signal, "raise_signal", lambda signum: os.kill(os.getpid(), signum)
)
+
# Inherit from KeyboardInterrupt to avoid a traceback from asyncio.
class SignalInterrupt(KeyboardInterrupt):
def __init__(self, signum):
diff --git a/bin/emerge b/bin/emerge
index cb1c36eea..804dc0371 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -11,6 +11,7 @@ raise_signal = getattr(
signal, "raise_signal", lambda signum: os.kill(os.getpid(), signum)
)
+
# Inherit from KeyboardInterrupt to avoid a traceback from asyncio.
class SignalInterrupt(KeyboardInterrupt):
def __init__(self, signum):
diff --git a/bin/glsa-check b/bin/glsa-check
index 388651e68..b18ffdc08 100755
--- a/bin/glsa-check
+++ b/bin/glsa-check
@@ -364,9 +364,7 @@ if mode in ["dump", "fix", "inject", "pretend"]:
if quiet:
sys.stdout.write("Checking GLSA " + myid + "\n")
mergedict = {}
- for (vuln, update) in myglsa.getAffectionTable(
- least_change=least_change
- ):
+ for vuln, update in myglsa.getAffectionTable(least_change=least_change):
mergedict.setdefault(update, []).append(vuln)
# first, extract the atoms that cannot be upgraded (where key == "")
@@ -381,7 +379,7 @@ if mode in ["dump", "fix", "inject", "pretend"]:
# see if anything is left that can be upgraded
if mergedict:
sys.stdout.write(">>> Updates that will be performed:\n")
- for (upd, vuln) in mergedict.items():
+ for upd, vuln in mergedict.items():
sys.stdout.write(
" "
+ green(upd)
diff --git a/bin/gpkg-helper.py b/bin/gpkg-helper.py
index ddb13e454..c5e1561be 100755
--- a/bin/gpkg-helper.py
+++ b/bin/gpkg-helper.py
@@ -44,7 +44,6 @@ def command_compose(args):
def main(argv):
-
if argv and isinstance(argv[0], bytes):
for i, x in enumerate(argv):
argv[i] = portage._unicode_decode(x, errors="strict")
diff --git a/bin/lock-helper.py b/bin/lock-helper.py
index 6619d625a..3f89eeea0 100755
--- a/bin/lock-helper.py
+++ b/bin/lock-helper.py
@@ -13,7 +13,6 @@ portage._disable_legacy_globals()
def main(args):
-
if args and isinstance(args[0], bytes):
for i, x in enumerate(args):
args[i] = portage._unicode_decode(x, errors="strict")
diff --git a/bin/portageq b/bin/portageq
index e9bd146b9..e9b6b5d38 100755
--- a/bin/portageq
+++ b/bin/portageq
@@ -10,6 +10,7 @@ raise_signal = getattr(
signal, "raise_signal", lambda signum: os.kill(os.getpid(), signum)
)
+
# Inherit from KeyboardInterrupt to avoid a traceback from asyncio.
class SignalInterrupt(KeyboardInterrupt):
def __init__(self, signum):
@@ -653,7 +654,6 @@ try:
results = []
require_metadata = atom.slot or atom.repo
for cpv in vardb.cpv_all():
-
if not portage.match_from_list(atom, [cpv]):
continue
@@ -957,7 +957,6 @@ try:
@uses_configroot
@uses_eroot
def get_repo_path(argv):
-
if len(argv) < 2:
print("ERROR: insufficient parameters!", file=sys.stderr)
return 3
@@ -1451,7 +1450,6 @@ try:
pass
def main(argv):
-
argv = portage._decode_argv(argv)
nocolor = os.environ.get("NOCOLOR")
diff --git a/bin/xattr-helper.py b/bin/xattr-helper.py
index f14f7fc9d..94c2f6816 100755
--- a/bin/xattr-helper.py
+++ b/bin/xattr-helper.py
@@ -130,7 +130,6 @@ def restore_xattrs(file_in):
def main(argv):
-
parser = argparse.ArgumentParser(description=doc)
parser.add_argument("paths", nargs="*", default=[])
diff --git a/bin/xpak-helper.py b/bin/xpak-helper.py
index 6e874025c..e25e61c3a 100755
--- a/bin/xpak-helper.py
+++ b/bin/xpak-helper.py
@@ -11,7 +11,6 @@ from portage import os
def command_recompose(args):
-
usage = "usage: recompose <binpkg_path> <metadata_dir>\n"
if len(args) != 2:
@@ -37,7 +36,6 @@ def command_recompose(args):
def main(argv):
-
if argv and isinstance(argv[0], bytes):
for i, x in enumerate(argv):
argv[i] = portage._unicode_decode(x, errors="strict")
diff --git a/lib/_emerge/AbstractEbuildProcess.py b/lib/_emerge/AbstractEbuildProcess.py
index a8f830d1c..f457e4609 100644
--- a/lib/_emerge/AbstractEbuildProcess.py
+++ b/lib/_emerge/AbstractEbuildProcess.py
@@ -27,7 +27,6 @@ portage.proxy.lazyimport.lazyimport(
class AbstractEbuildProcess(SpawnProcess):
-
__slots__ = ("phase", "settings",) + (
"_build_dir",
"_build_dir_unlock",
@@ -65,7 +64,6 @@ class AbstractEbuildProcess(SpawnProcess):
self.phase = phase
def _start(self):
-
need_builddir = self.phase not in self._phases_without_builddir
# This can happen if the pre-clean phase triggers
@@ -247,12 +245,10 @@ class AbstractEbuildProcess(SpawnProcess):
os.close(null_fd)
def _init_ipc_fifos(self):
-
input_fifo = os.path.join(self.settings["PORTAGE_BUILDDIR"], ".ipc", "in")
output_fifo = os.path.join(self.settings["PORTAGE_BUILDDIR"], ".ipc", "out")
for p in (input_fifo, output_fifo):
-
st = None
try:
st = os.lstat(p)
@@ -354,7 +350,6 @@ class AbstractEbuildProcess(SpawnProcess):
self._eerror(textwrap.wrap(msg, 72))
def _unexpected_exit(self):
-
phase = self.phase
msg = (
diff --git a/lib/_emerge/AbstractPollTask.py b/lib/_emerge/AbstractPollTask.py
index c665cb516..fd49d9f43 100644
--- a/lib/_emerge/AbstractPollTask.py
+++ b/lib/_emerge/AbstractPollTask.py
@@ -10,7 +10,6 @@ from _emerge.AsynchronousTask import AsynchronousTask
class AbstractPollTask(AsynchronousTask):
-
__slots__ = ("_registered",)
_bufsize = 4096
diff --git a/lib/_emerge/AsynchronousLock.py b/lib/_emerge/AsynchronousLock.py
index aaa5a0c14..329ce6bbe 100644
--- a/lib/_emerge/AsynchronousLock.py
+++ b/lib/_emerge/AsynchronousLock.py
@@ -49,7 +49,6 @@ class AsynchronousLock(AsynchronousTask):
_use_process_by_default = True
def _start(self):
-
if not self._force_async:
try:
self._imp = lockfile(
@@ -224,7 +223,6 @@ class _LockProcess(AbstractPollTask):
os.close(in_pw)
def _proc_exit(self, proc):
-
if self._files is not None:
# Close pipe_out if it's still open, since it's useless
# after the process has exited. This helps to avoid
diff --git a/lib/_emerge/AsynchronousTask.py b/lib/_emerge/AsynchronousTask.py
index b987cbbdb..4290eede3 100644
--- a/lib/_emerge/AsynchronousTask.py
+++ b/lib/_emerge/AsynchronousTask.py
@@ -193,7 +193,6 @@ class AsynchronousTask(SlotObject):
self._start_hook()
if self.returncode is not None and self._exit_listeners is not None:
-
listeners = self._exit_listeners
self._exit_listeners = None
if self._exit_listener_handles is None:
diff --git a/lib/_emerge/AtomArg.py b/lib/_emerge/AtomArg.py
index 1c436efd5..8884798a8 100644
--- a/lib/_emerge/AtomArg.py
+++ b/lib/_emerge/AtomArg.py
@@ -6,7 +6,6 @@ from _emerge.DependencyArg import DependencyArg
class AtomArg(DependencyArg):
-
__slots__ = ("atom", "pset")
def __init__(self, atom=None, **kwargs):
diff --git a/lib/_emerge/Binpkg.py b/lib/_emerge/Binpkg.py
index 8d4cf5041..fac872206 100644
--- a/lib/_emerge/Binpkg.py
+++ b/lib/_emerge/Binpkg.py
@@ -26,7 +26,6 @@ import logging
class Binpkg(CompositeTask):
-
__slots__ = (
"find_blockers",
"ldpath_mtimes",
@@ -60,7 +59,6 @@ class Binpkg(CompositeTask):
)
def _start(self):
-
pkg = self.pkg
settings = self.settings
settings.setcpv(pkg)
@@ -115,7 +113,6 @@ class Binpkg(CompositeTask):
if prefetcher is None:
pass
elif prefetcher.isAlive() and prefetcher.poll() is None:
-
if not self.background:
fetch_log = os.path.join(
_emerge.emergelog._emerge_log_dir, "emerge-fetch.log"
@@ -137,7 +134,6 @@ class Binpkg(CompositeTask):
self._prefetch_exit(prefetcher)
def _prefetch_exit(self, prefetcher):
-
if self._was_cancelled():
self.wait()
return
@@ -169,7 +165,6 @@ class Binpkg(CompositeTask):
fetcher = None
if self.opts.getbinpkg and self._bintree.isremote(pkg.cpv):
-
fetcher = BinpkgFetcher(
background=self.background,
logfile=self.settings.get("PORTAGE_LOG_FILE"),
@@ -201,7 +196,6 @@ class Binpkg(CompositeTask):
self._fetcher_exit(fetcher)
def _fetcher_exit(self, fetcher):
-
# The fetcher only has a returncode when
# --getbinpkg is enabled.
if fetcher is not None:
@@ -312,7 +306,6 @@ class Binpkg(CompositeTask):
)
async def _unpack_metadata(self, loop=None):
-
dir_path = self.settings["PORTAGE_BUILDDIR"]
infloc = self._infloc
--git a/lib/_emerge/BinpkgEnvExtractor.py b/lib/_emerge/BinpkgEnvExtractor.py
index b2e0bdba2..d25a2a8a7 100644
--- a/lib/_emerge/BinpkgEnvExtractor.py
+++ b/lib/_emerge/BinpkgEnvExtractor.py
@@ -58,7 +58,6 @@ class BinpkgEnvExtractor(CompositeTask):
raise
def _extractor_exit(self, extractor_proc):
-
if self._default_exit(extractor_proc) != os.EX_OK:
self._remove_dest_env()
self.wait()
--git a/lib/_emerge/BinpkgExtractorAsync.py b/lib/_emerge/BinpkgExtractorAsync.py
index 9245fd00a..f20b7707a 100644
--- a/lib/_emerge/BinpkgExtractorAsync.py
+++ b/lib/_emerge/BinpkgExtractorAsync.py
@@ -24,7 +24,6 @@ import tarfile
class BinpkgExtractorAsync(SpawnProcess):
-
__slots__ = ("features", "image_dir", "pkg", "pkg_path")
_shell_binary = portage.const.BASH_BINARY
diff --git a/lib/_emerge/BinpkgFetcher.py b/lib/_emerge/BinpkgFetcher.py
index aeeff8c4a..df99486a0 100644
--- a/lib/_emerge/BinpkgFetcher.py
+++ b/lib/_emerge/BinpkgFetcher.py
@@ -18,7 +18,6 @@ from portage.util._pty import _create_pty_or_pipe
class BinpkgFetcher(CompositeTask):
-
__slots__ = ("pkg", "pretend", "logfile", "pkg_path", "pkg_allocated_path")
def __init__(self, **kwargs):
@@ -93,7 +92,6 @@ class BinpkgFetcher(CompositeTask):
class _BinpkgFetcherProcess(SpawnProcess):
-
__slots__ = ("pkg", "pretend", "locked", "pkg_path", "_lock_obj")
def _start(self):
diff --git a/lib/_emerge/BinpkgPrefetcher.py b/lib/_emerge/BinpkgPrefetcher.py
index 912673bd1..37dbe0a40 100644
--- a/lib/_emerge/BinpkgPrefetcher.py
+++ b/lib/_emerge/BinpkgPrefetcher.py
@@ -8,7 +8,6 @@ from portage import os
class BinpkgPrefetcher(CompositeTask):
-
__slots__ = ("pkg",) + (
"pkg_path",
"pkg_allocated_path",
@@ -28,7 +27,6 @@ class BinpkgPrefetcher(CompositeTask):
self._start_task(fetcher, self._fetcher_exit)
def _fetcher_exit(self, fetcher):
-
if self._default_exit(fetcher) != os.EX_OK:
self.wait()
return
diff --git a/lib/_emerge/BinpkgVerifier.py b/lib/_emerge/BinpkgVerifier.py
index 0477ea304..4923331c3 100644
--- a/lib/_emerge/BinpkgVerifier.py
+++ b/lib/_emerge/BinpkgVerifier.py
@@ -22,7 +22,6 @@ class BinpkgVerifier(CompositeTask):
__slots__ = ("logfile", "pkg", "_digests", "_pkg_path")
def _start(self):
-
bintree = self.pkg.root_config.trees["bintree"]
digests = bintree._get_digests(self.pkg)
if "size" not in digests:
@@ -69,7 +68,6 @@ class BinpkgVerifier(CompositeTask):
)
def _digester_exit(self, digester):
-
if self._default_exit(digester) != os.EX_OK:
self.wait()
return
@@ -119,7 +117,6 @@ class BinpkgVerifier(CompositeTask):
)
def _digest_exception(self, name, value, expected):
-
head, tail = os.path.split(self._pkg_path)
temp_filename = _checksum_failure_temp_file(
self.pkg.root_config.settings, head, tail
diff --git a/lib/_emerge/Blocker.py b/lib/_emerge/Blocker.py
index 9833b1469..175527182 100644
--- a/lib/_emerge/Blocker.py
+++ b/lib/_emerge/Blocker.py
@@ -5,7 +5,6 @@ from _emerge.Task import Task
class Blocker(Task):
-
__hash__ = Task.__hash__
__slots__ = ("root", "atom", "cp", "eapi", "priority", "satisfied")
diff --git a/lib/_emerge/BlockerCache.py b/lib/_emerge/BlockerCache.py
index ccc8d416c..940416e83 100644
--- a/lib/_emerge/BlockerCache.py
+++ b/lib/_emerge/BlockerCache.py
@@ -22,7 +22,6 @@ class BlockerCache(portage.cache.mappings.MutableMapping):
_cache_threshold = 5
class BlockerData:
-
__slots__ = ("__weakref__", "atoms", "counter")
def __init__(self, counter, atoms):
diff --git a/lib/_emerge/CompositeTask.py b/lib/_emerge/CompositeTask.py
index c15659ae3..a0203e71f 100644
--- a/lib/_emerge/CompositeTask.py
+++ b/lib/_emerge/CompositeTask.py
@@ -6,7 +6,6 @@ from portage import os
class CompositeTask(AsynchronousTask):
-
__slots__ = ("_current_task",)
_TASK_QUEUED = -1
diff --git a/lib/_emerge/DepPriority.py b/lib/_emerge/DepPriority.py
index 0b222b1ab..ed4adc5ab 100644
--- a/lib/_emerge/DepPriority.py
+++ b/lib/_emerge/DepPriority.py
@@ -5,7 +5,6 @@ from _emerge.AbstractDepPriority import AbstractDepPriority
class DepPriority(AbstractDepPriority):
-
__slots__ = ("satisfied", "optional", "ignored")
def __int__(self):
diff --git a/lib/_emerge/DependencyArg.py b/lib/_emerge/DependencyArg.py
index 5f487b344..30cadb1c4 100644
--- a/lib/_emerge/DependencyArg.py
+++ b/lib/_emerge/DependencyArg.py
@@ -3,7 +3,6 @@
class DependencyArg:
-
__slots__ = ("arg", "force_reinstall", "internal", "reset_depth", "root_config")
def __init__(
diff --git a/lib/_emerge/EbuildBinpkg.py b/lib/_emerge/EbuildBinpkg.py
index 04a17f283..cb01f73d7 100644
--- a/lib/_emerge/EbuildBinpkg.py
+++ b/lib/_emerge/EbuildBinpkg.py
@@ -44,7 +44,6 @@ class EbuildBinpkg(CompositeTask):
self._start_task(package_phase, self._package_phase_exit)
def _package_phase_exit(self, package_phase):
-
self.settings.pop("PORTAGE_BINPKG_TMPFILE", None)
if self._default_exit(package_phase) != os.EX_OK:
try:
diff --git a/lib/_emerge/EbuildBuild.py b/lib/_emerge/EbuildBuild.py
index 2623b718c..079a67ffb 100644
--- a/lib/_emerge/EbuildBuild.py
+++ b/lib/_emerge/EbuildBuild.py
@@ -26,7 +26,6 @@ from portage.util.path import first_existing
class EbuildBuild(CompositeTask):
-
__slots__ = (
"args_set",
"config_pool",
@@ -100,7 +99,6 @@ class EbuildBuild(CompositeTask):
if prefetcher is None:
pass
elif prefetcher.isAlive() and prefetcher.poll() is None:
-
if not self.background:
fetch_log = os.path.join(
_emerge.emergelog._emerge_log_dir, "emerge-fetch.log"
@@ -139,7 +137,6 @@ class EbuildBuild(CompositeTask):
return success
def _prefetch_exit(self, prefetcher):
-
if self._was_cancelled():
self.wait()
return
@@ -317,7 +314,6 @@ class EbuildBuild(CompositeTask):
self.scheduler.fetch.schedule(fetcher)
def _fetch_exit(self, fetcher):
-
if fetcher is not None and self._default_exit(fetcher) != os.EX_OK:
self._fetch_failed()
return
@@ -360,7 +356,6 @@ class EbuildBuild(CompositeTask):
and not buildpkg_live_disabled
and not self.opts.buildpkg_exclude.findAtomForPackage(pkg)
):
-
self._buildpkg = True
msg = " === ({} of {}) Compiling/Packaging ({}::{})".format(
diff --git a/lib/_emerge/EbuildBuildDir.py b/lib/_emerge/EbuildBuildDir.py
index 136737204..71a258f89 100644
--- a/lib/_emerge/EbuildBuildDir.py
+++ b/lib/_emerge/EbuildBuildDir.py
@@ -12,7 +12,6 @@ from portage.util.SlotObject import SlotObject
class EbuildBuildDir(SlotObject):
-
__slots__ = ("scheduler", "settings", "locked", "_catdir", "_lock_obj")
def __init__(self, **kwargs):
diff --git a/lib/_emerge/EbuildExecuter.py b/lib/_emerge/EbuildExecuter.py
index 758afa8fc..915385759 100644
--- a/lib/_emerge/EbuildExecuter.py
+++ b/lib/_emerge/EbuildExecuter.py
@@ -13,7 +13,6 @@ from portage.eapi import (
class EbuildExecuter(CompositeTask):
-
__slots__ = ("pkg", "settings")
_phases = ("prepare", "configure", "compile", "test", "install")
@@ -46,7 +45,6 @@ class EbuildExecuter(CompositeTask):
self.scheduler.scheduleSetup(setup_phase)
def _setup_exit(self, setup_phase):
-
if self._default_exit(setup_phase) != os.EX_OK:
self.wait()
return
@@ -70,7 +68,6 @@ class EbuildExecuter(CompositeTask):
self._start_task(unpack_phase, self._unpack_exit)
def _unpack_exit(self, unpack_phase):
-
if self._default_exit(unpack_phase) != os.EX_OK:
self.wait()
return
diff --git a/lib/_emerge/EbuildFetcher.py b/lib/_emerge/EbuildFetcher.py
index 8cb8ec440..7e28be493 100644
--- a/lib/_emerge/EbuildFetcher.py
+++ b/lib/_emerge/EbuildFetcher.py
@@ -25,7 +25,6 @@ from _emerge.CompositeTask import CompositeTask
class EbuildFetcher(CompositeTask):
-
__slots__ = (
"config_pool",
"ebuild_path",
@@ -99,7 +98,6 @@ class EbuildFetcher(CompositeTask):
class _EbuildFetcherProcess(ForkProcess):
-
__slots__ = (
"config_pool",
"ebuild_path",
@@ -212,7 +210,6 @@ class _EbuildFetcherProcess(ForkProcess):
return success
def _start(self):
-
root_config = self.pkg.root_config
portdb = root_config.trees["porttree"].dbapi
ebuild_path = self._get_ebuild_path()
diff --git a/lib/_emerge/EbuildFetchonly.py b/lib/_emerge/EbuildFetchonly.py
index 0b7c49f96..e887dd858 100644
--- a/lib/_emerge/EbuildFetchonly.py
+++ b/lib/_emerge/EbuildFetchonly.py
@@ -8,7 +8,6 @@ from portage.util.SlotObject import SlotObject
class EbuildFetchonly(SlotObject):
-
__slots__ = ("fetch_all", "pkg", "pretend", "settings")
def execute(self):
diff --git a/lib/_emerge/EbuildIpcDaemon.py b/lib/_emerge/EbuildIpcDaemon.py
index 75ecb6c2f..6097e056c 100644
--- a/lib/_emerge/EbuildIpcDaemon.py
+++ b/lib/_emerge/EbuildIpcDaemon.py
@@ -48,7 +48,6 @@ class EbuildIpcDaemon(FifoIpcDaemon):
# any exception when given corrupt data.
pass
else:
-
self._reopen_input()
cmd_key = obj[0]
diff --git a/lib/_emerge/EbuildMerge.py b/lib/_emerge/EbuildMerge.py
index fefe737d5..f91beff5a 100644
--- a/lib/_emerge/EbuildMerge.py
+++ b/lib/_emerge/EbuildMerge.py
@@ -10,7 +10,6 @@ from portage.util._async.AsyncTaskFuture import AsyncTaskFuture
class EbuildMerge(CompositeTask):
-
__slots__ = (
"exit_hook",
"find_blockers",
diff --git a/lib/_emerge/EbuildMetadataPhase.py b/lib/_emerge/EbuildMetadataPhase.py
index 5fad3991f..fd695e025 100644
--- a/lib/_emerge/EbuildMetadataPhase.py
+++ b/lib/_emerge/EbuildMetadataPhase.py
@@ -199,7 +199,6 @@ class EbuildMetadataPhase(SubProcess):
# EAPI from _parse_eapi_ebuild_head, we don't write cache
# entries for unsupported EAPIs.
if self.eapi_supported:
-
if metadata.get("INHERITED", False):
metadata[
"_eclasses_"
diff --git a/lib/_emerge/EbuildPhase.py b/lib/_emerge/EbuildPhase.py
index 3d0828593..c81bf54a8 100644
--- a/lib/_emerge/EbuildPhase.py
+++ b/lib/_emerge/EbuildPhase.py
@@ -61,7 +61,6 @@ from portage import _unicode_encode
class EbuildPhase(CompositeTask):
-
__slots__ = ("actionmap", "fd_pipes", "phase", "settings") + ("_ebuild_lock",)
# FEATURES displayed prior to setup phase
@@ -95,7 +94,6 @@ class EbuildPhase(CompositeTask):
self._start_task(AsyncTaskFuture(future=future), self._async_start_exit)
async def _async_start(self):
-
need_builddir = self.phase not in EbuildProcess._phases_without_builddir
if need_builddir:
@@ -113,7 +111,6 @@ class EbuildPhase(CompositeTask):
ensure_dirs(os.path.join(self.settings["PORTAGE_BUILDDIR"], "empty"))
if self.phase in ("nofetch", "pretend", "setup"):
-
use = self.settings.get("PORTAGE_BUILT_USE")
if use is None:
use = self.settings["PORTAGE_USE"]
@@ -393,7 +390,6 @@ class EbuildPhase(CompositeTask):
self.wait()
def _post_phase_exit(self, post_phase):
-
self._assert_current(post_phase)
log_path = None
@@ -415,7 +411,6 @@ class EbuildPhase(CompositeTask):
return
def _append_temp_log(self, temp_log, log_path):
-
temp_file = open(
_unicode_encode(temp_log, encoding=_encodings["fs"], errors="strict"), "rb"
)
@@ -432,7 +427,6 @@ class EbuildPhase(CompositeTask):
os.unlink(temp_log)
def _open_log(self, log_path):
-
f = open(
_unicode_encode(log_path, encoding=_encodings["fs"], errors="strict"),
mode="ab",
@@ -539,7 +533,6 @@ class EbuildPhase(CompositeTask):
class _PostPhaseCommands(CompositeTask):
-
__slots__ = ("commands", "elog", "fd_pipes", "logfile", "phase", "settings")
def _start(self):
@@ -575,7 +568,6 @@ class _PostPhaseCommands(CompositeTask):
self._start_task(tasks, self._commands_exit)
def _commands_exit(self, task):
-
if self._default_exit(task) != os.EX_OK:
self._async_wait()
return
@@ -607,7 +599,6 @@ class _PostPhaseCommands(CompositeTask):
self._default_final_exit(task)
async def _soname_deps_qa(self):
-
vardb = QueryCommand.get_db()[self.settings["EROOT"]]["vartree"].dbapi
all_provides = await self.scheduler.run_in_executor(
diff --git a/lib/_emerge/EbuildProcess.py b/lib/_emerge/EbuildProcess.py
index b8b74293c..d34038ecd 100644
--- a/lib/_emerge/EbuildProcess.py
+++ b/lib/_emerge/EbuildProcess.py
@@ -10,11 +10,9 @@ portage.proxy.lazyimport.lazyimport(
class EbuildProcess(AbstractEbuildProcess):
-
__slots__ = ("actionmap",)
def _spawn(self, args, **kwargs):
-
actionmap = self.actionmap
if actionmap is None:
actionmap = _spawn_actionmap(self.settings)
diff --git a/lib/_emerge/EbuildSpawnProcess.py b/lib/_emerge/EbuildSpawnProcess.py
index e75a56d2e..df601e522 100644
--- a/lib/_emerge/EbuildSpawnProcess.py
+++ b/lib/_emerge/EbuildSpawnProcess.py
@@ -14,7 +14,6 @@ class EbuildSpawnProcess(AbstractEbuildProcess):
__slots__ = ("fakeroot_state", "spawn_func")
def _spawn(self, args, **kwargs):
-
env = self.settings.environ()
if self._dummy_pipe_fd is not None:
diff --git a/lib/_emerge/FakeVartree.py b/lib/_emerge/FakeVartree.py
index e6c8a4215..72da6fb2d 100644
--- a/lib/_emerge/FakeVartree.py
+++ b/lib/_emerge/FakeVartree.py
@@ -144,7 +144,6 @@ class FakeVartree(vartree):
return self._aux_get(cpv, wants)
def _apply_dynamic_deps(self, pkg, live_metadata):
-
try:
if live_metadata is None:
raise _DynamicDepsNotApplicable()
@@ -234,7 +233,6 @@ class FakeVartree(vartree):
self.dbapi.aux_get = self._aux_get_wrapper
def _sync(self):
-
real_vardb = self._root_config.trees["vartree"].dbapi
current_cpv_set = frozenset(real_vardb.cpv_all())
pkg_vardb = self.dbapi
@@ -249,7 +247,6 @@ class FakeVartree(vartree):
root_config = self._pkg_root_config
validation_keys = ["COUNTER", "_mtime_"]
for cpv in current_cpv_set:
-
pkg_hash_key = Package._gen_hash_key(
cpv=cpv, installed=True, root_config=root_config, type_name="installed"
)
diff --git a/lib/_emerge/FifoIpcDaemon.py b/lib/_emerge/FifoIpcDaemon.py
index 4f9758470..f94ce01ce 100644
--- a/lib/_emerge/FifoIpcDaemon.py
+++ b/lib/_emerge/FifoIpcDaemon.py
@@ -8,7 +8,6 @@ from portage.cache.mappings import slot_dict_class
class FifoIpcDaemon(AbstractPollTask):
-
__slots__ = ("input_fifo", "output_fifo", "_files")
_file_names = ("pipe_in",)
diff --git a/lib/_emerge/JobStatusDisplay.py b/lib/_emerge/JobStatusDisplay.py
index 33e955167..dfdd37c27 100644
--- a/lib/_emerge/JobStatusDisplay.py
+++ b/lib/_emerge/JobStatusDisplay.py
@@ -16,7 +16,6 @@ from _emerge.getloadavg import getloadavg
class JobStatusDisplay:
-
_bound_properties = ("curval", "failed", "running")
# Don't update the display unless at least this much
@@ -138,7 +137,6 @@ class JobStatusDisplay:
self._displayed = True
def _update(self, msg):
-
if not self._isatty:
self._write(self._format_msg(msg) + self._term_codes["newline"])
self._displayed = True
@@ -150,7 +148,6 @@ class JobStatusDisplay:
self._display(self._format_msg(msg))
def displayMessage(self, msg):
-
was_displayed = self._displayed
if self._isatty and self._displayed:
diff --git a/lib/_emerge/MergeListItem.py b/lib/_emerge/MergeListItem.py
index d96dfc11d..fb3a0687a 100644
--- a/lib/_emerge/MergeListItem.py
+++ b/lib/_emerge/MergeListItem.py
@@ -38,7 +38,6 @@ class MergeListItem(CompositeTask):
) + ("_install_task",)
def _start(self):
-
pkg = self.pkg
build_opts = self.build_opts
@@ -86,7 +85,6 @@ class MergeListItem(CompositeTask):
)
if pkg.type_name == "ebuild":
-
build = EbuildBuild(
args_set=args_set,
background=self.background,
@@ -108,7 +106,6 @@ class MergeListItem(CompositeTask):
return
if pkg.type_name == "binary":
-
binpkg = Binpkg(
background=self.background,
find_blockers=find_blockers,
@@ -128,7 +125,6 @@ class MergeListItem(CompositeTask):
return
def create_install_task(self):
-
pkg = self.pkg
build_opts = self.build_opts
mtimedb = self.mtimedb
@@ -141,7 +137,6 @@ class MergeListItem(CompositeTask):
if not (
build_opts.buildpkgonly or build_opts.fetchonly or build_opts.pretend
):
-
task = PackageUninstall(
background=self.background,
ldpath_mtimes=ldpath_mtimes,
diff --git a/lib/_emerge/MetadataRegen.py b/lib/_emerge/MetadataRegen.py
index c2ab6722e..d29722b94 100644
--- a/lib/_emerge/MetadataRegen.py
+++ b/lib/_emerge/MetadataRegen.py
@@ -140,7 +140,6 @@ class MetadataRegen(AsyncScheduler):
portdb.flush_cache()
def _task_exit(self, metadata_process):
-
if metadata_process.returncode != os.EX_OK:
self._valid_pkgs.discard(metadata_process.cpv)
if not self._terminated_tasks:
diff --git a/lib/_emerge/Package.py b/lib/_emerge/Package.py
index d824401fa..13ef5cabd 100644
--- a/lib/_emerge/Package.py
+++ b/lib/_emerge/Package.py
@@ -24,7 +24,6 @@ from _emerge.Task import Task
class Package(Task):
-
__hash__ = Task.__hash__
__slots__ = (
"built",
@@ -264,7 +263,6 @@ class Package(Task):
type_name=None,
**kwargs,
):
-
if operation is None:
if installed or onlydeps:
operation = "nomerge"
@@ -480,9 +478,7 @@ class Package(Task):
return masks
def _eval_visiblity(self, masks):
-
if masks is not False:
-
if "EAPI.unsupported" in masks:
return False
@@ -533,7 +529,6 @@ class Package(Task):
return pmask is not None
def _metadata_exception(self, k, e):
-
if k.endswith("DEPEND"):
qacat = "dependency.syntax"
else:
@@ -611,7 +606,6 @@ class Package(Task):
return s
class _use_class:
-
__slots__ = ("enabled", "_expand", "_expand_hidden", "_force", "_pkg", "_mask")
# Share identical frozenset instances when available.
@@ -725,7 +719,6 @@ class Package(Task):
return use_str
class _iuse:
-
__slots__ = (
"__weakref__",
"_iuse_implicit_match",
diff --git a/lib/_emerge/PackageMerge.py b/lib/_emerge/PackageMerge.py
index 3e03ea137..8272511a1 100644
--- a/lib/_emerge/PackageMerge.py
+++ b/lib/_emerge/PackageMerge.py
@@ -10,7 +10,6 @@ class PackageMerge(CompositeTask):
__slots__ = ("merge", "postinst_failure")
def _start(self):
-
self.scheduler = self.merge.scheduler
pkg = self.merge.pkg
pkg_count = self.merge.pkg_count
diff --git a/lib/_emerge/PackageUninstall.py b/lib/_emerge/PackageUninstall.py
index f792b5fed..c42b52894 100644
--- a/lib/_emerge/PackageUninstall.py
+++ b/lib/_emerge/PackageUninstall.py
@@ -35,7 +35,6 @@ class PackageUninstall(CompositeTask):
)
def _start(self):
-
vardb = self.pkg.root_config.trees["vartree"].dbapi
dbdir = vardb.getpath(self.pkg.cpv)
if not os.path.exists(dbdir):
@@ -150,7 +149,6 @@ class PackageUninstall(CompositeTask):
emergelog("notitles" not in self.settings.features, msg)
def _writemsg_level(self, msg, level=0, noiselevel=0):
-
log_path = self.settings.get("PORTAGE_LOG_FILE")
background = self.background
diff --git a/lib/_emerge/PipeReader.py b/lib/_emerge/PipeReader.py
index 12957a24d..026346e0b 100644
--- a/lib/_emerge/PipeReader.py
+++ b/lib/_emerge/PipeReader.py
@@ -48,7 +48,6 @@ class PipeReader(AbstractPollTask):
self._read_data = None
def _output_handler(self, fd):
-
while True:
data = self._read_buf(fd)
if data is None:
@@ -62,7 +61,6 @@ class PipeReader(AbstractPollTask):
break
def _array_output_handler(self, f):
-
while True:
data = self._read_array(f)
if data is None:
diff --git a/lib/_emerge/PollScheduler.py b/lib/_emerge/PollScheduler.py
index 864da9f6a..73f2affde 100644
--- a/lib/_emerge/PollScheduler.py
+++ b/lib/_emerge/PollScheduler.py
@@ -14,7 +14,6 @@ from _emerge.getloadavg import getloadavg
class PollScheduler:
-
# max time between loadavg checks (milliseconds)
_loadavg_latency = None
diff --git a/lib/_emerge/Scheduler.py b/lib/_emerge/Scheduler.py
index 19bb815ae..d2b1b5999 100644
--- a/lib/_emerge/Scheduler.py
+++ b/lib/_emerge/Scheduler.py
@@ -64,7 +64,6 @@ FAILURE = 1
class Scheduler(PollScheduler):
-
# max time between loadavg checks (seconds)
_loadavg_latency = 30
@@ -340,7 +339,6 @@ class Scheduler(PollScheduler):
)
def _handle_self_update(self):
-
if self._opts_no_self_update.intersection(self.myopts):
return os.EX_OK
@@ -494,7 +492,6 @@ class Scheduler(PollScheduler):
return interactive_tasks
def _set_graph_config(self, graph_config):
-
if graph_config is None:
self._graph_config = None
self._pkg_cache = {}
@@ -787,12 +784,10 @@ class Scheduler(PollScheduler):
return os.EX_OK
def _add_prefetchers(self):
-
if not self._parallel_fetch:
return
if self._parallel_fetch:
-
prefetchers = self._prefetchers
for pkg in self._mergelist:
@@ -819,7 +814,6 @@ class Scheduler(PollScheduler):
pass
elif pkg.type_name == "ebuild":
-
prefetcher = EbuildFetcher(
background=True,
config_pool=self._ConfigPool(
@@ -838,7 +832,6 @@ class Scheduler(PollScheduler):
and "--getbinpkg" in self.myopts
and pkg.root_config.trees["bintree"].isremote(pkg.cpv)
):
-
prefetcher = BinpkgPrefetcher(
background=True, pkg=pkg, scheduler=self._sched_iface
)
@@ -908,7 +901,6 @@ class Scheduler(PollScheduler):
current_task = None
try:
-
# Clean up the existing build dir, in case pkg_pretend
# checks for available space (bug #390711).
if existing_builddir:
@@ -1028,7 +1020,6 @@ class Scheduler(PollScheduler):
self._record_pkg_failure(x, settings, ret)
portage.elog.elog_process(x.cpv, settings)
finally:
-
if current_task is not None:
if current_task.isAlive():
current_task.cancel()
@@ -1126,7 +1117,6 @@ class Scheduler(PollScheduler):
return rval
while True:
-
received_signal = []
def sighandler(signum, frame):
@@ -1268,7 +1258,6 @@ class Scheduler(PollScheduler):
and self._failed_pkgs_die_msgs
and not mod_echo_output
):
-
for mysettings, key, logentries in self._failed_pkgs_die_msgs:
root_msg = ""
if mysettings["ROOT"] != "/":
@@ -1329,7 +1318,6 @@ class Scheduler(PollScheduler):
self._failed_pkgs_die_msgs.append((mysettings, key, errors))
def _locate_failure_log(self, failed_pkg):
-
log_paths = [failed_pkg.build_log]
for log_path in log_paths:
@@ -1548,7 +1536,6 @@ class Scheduler(PollScheduler):
self._event_loop.run_until_complete(self._main_exit)
def _merge(self):
-
if self._opts_no_background.intersection(self.myopts):
self._set_max_jobs(1)
@@ -1755,9 +1742,7 @@ class Scheduler(PollScheduler):
return self._jobs
def _schedule_tasks(self):
-
while True:
-
state_change = 0
# When the number of jobs and merges drops to zero,
@@ -1852,15 +1837,12 @@ class Scheduler(PollScheduler):
"""
if self._jobs and self._max_load is not None:
-
current_time = time.time()
if self._sigcont_time is not None:
-
elapsed_seconds = current_time - self._sigcont_time
# elapsed_seconds < 0 means the system clock has been adjusted
if elapsed_seconds > 0 and elapsed_seconds < self._sigcont_delay:
-
if self._job_delay_timeout_id is not None:
self._job_delay_timeout_id.cancel()
@@ -1885,7 +1867,6 @@ class Scheduler(PollScheduler):
elapsed_seconds = current_time - self._previous_job_start_time
# elapsed_seconds < 0 means the system clock has been adjusted
if elapsed_seconds > 0 and elapsed_seconds < delay:
-
if self._job_delay_timeout_id is not None:
self._job_delay_timeout_id.cancel()
@@ -1905,7 +1886,6 @@ class Scheduler(PollScheduler):
state_change = 0
while True:
-
if not self._keep_scheduling():
return bool(state_change)
@@ -1973,7 +1953,6 @@ class Scheduler(PollScheduler):
return prefetcher
def _task(self, pkg):
-
pkg_to_replace = None
if pkg.operation != "uninstall":
vardb = pkg.root_config.trees["vartree"].dbapi
@@ -2220,7 +2199,6 @@ class Scheduler(PollScheduler):
atom = self._world_atoms.get(pkg)
try:
-
if hasattr(world_set, "lock"):
world_set.lock()
world_locked = True
diff --git a/lib/_emerge/SequentialTaskQueue.py b/lib/_emerge/SequentialTaskQueue.py
index 829f44ba6..f57b060eb 100644
--- a/lib/_emerge/SequentialTaskQueue.py
+++ b/lib/_emerge/SequentialTaskQueue.py
@@ -8,7 +8,6 @@ from portage.util.SlotObject import SlotObject
class SequentialTaskQueue(SlotObject):
-
__slots__ = ("max_jobs", "running_tasks") + ("_scheduling", "_task_queue")
def __init__(self, **kwargs):
@@ -27,7 +26,6 @@ class SequentialTaskQueue(SlotObject):
self.schedule()
def schedule(self):
-
if self._scheduling:
# Ignore any recursive schedule() calls triggered via
# self._task_exit().
diff --git a/lib/_emerge/SetArg.py b/lib/_emerge/SetArg.py
index 5d89c68e7..6e169a9b5 100644
--- a/lib/_emerge/SetArg.py
+++ b/lib/_emerge/SetArg.py
@@ -6,7 +6,6 @@ from portage._sets import SETPREFIX
class SetArg(DependencyArg):
-
__slots__ = ("name", "pset")
def __init__(self, pset=None, **kwargs):
diff --git a/lib/_emerge/SpawnProcess.py b/lib/_emerge/SpawnProcess.py
index 5ecf477b4..c00f86d0e 100644
--- a/lib/_emerge/SpawnProcess.py
+++ b/lib/_emerge/SpawnProcess.py
@@ -62,7 +62,6 @@ class SpawnProcess(SubProcess):
_CGROUP_CLEANUP_RETRY_MAX = 8
def _start(self):
-
if self.fd_pipes is None:
self.fd_pipes = {}
else:
diff --git a/lib/_emerge/SubProcess.py b/lib/_emerge/SubProcess.py
index 2399b00d1..ba783241c 100644
--- a/lib/_emerge/SubProcess.py
+++ b/lib/_emerge/SubProcess.py
@@ -12,7 +12,6 @@ import errno
class SubProcess(AbstractPollTask):
-
__slots__ = ("pid",) + ("_dummy_pipe_fd", "_files", "_waitpid_id")
# This is how much time we allow for waitpid to succeed after
diff --git a/lib/_emerge/UseFlagDisplay.py b/lib/_emerge/UseFlagDisplay.py
index 2cfc6f77e..4c526947d 100644
--- a/lib/_emerge/UseFlagDisplay.py
+++ b/lib/_emerge/UseFlagDisplay.py
@@ -10,7 +10,6 @@ from portage.output import blue
class UseFlagDisplay:
-
__slots__ = ("name", "enabled", "forced")
def __init__(self, name, enabled, forced):
diff --git a/lib/_emerge/actions.py b/lib/_emerge/actions.py
index d8fd99d88..3945afce2 100644
--- a/lib/_emerge/actions.py
+++ b/lib/_emerge/actions.py
@@ -115,7 +115,6 @@ def action_build(
myfiles=DeprecationWarning,
spinner=None,
):
-
if not isinstance(emerge_config, _emerge_config):
warnings.warn(
"_emerge.actions.action_build() now expects "
@@ -550,7 +549,6 @@ def action_build(
return retval
else:
-
if not mergelist_shown:
# If we haven't already shown the merge list above, at
# least show warnings about missed updates and such.
@@ -573,7 +571,6 @@ def action_build(
)
if need_write_bindb or need_write_vardb:
-
eroots = set()
ebuild_eroots = set()
for x in mydepgraph.altlist():
@@ -1002,9 +999,7 @@ def _calc_depclean(settings, trees, ldpath_mtimes, myopts, action, args_set, spi
real_vardb = trees[eroot]["vartree"].dbapi
if action == "depclean":
-
if args_set:
-
if deselect:
# Start with an empty set.
selected_set = InternalPackageSet()
@@ -1030,7 +1025,6 @@ def _calc_depclean(settings, trees, ldpath_mtimes, myopts, action, args_set, spi
continue
elif action == "prune":
-
if deselect:
# Start with an empty set.
selected_set = InternalPackageSet()
@@ -1043,7 +1037,6 @@ def _calc_depclean(settings, trees, ldpath_mtimes, myopts, action, args_set, spi
protected_set.update(vardb.cp_all())
if not args_set:
-
# Try to prune everything that's slotted.
for cp in vardb.cp_all():
if len(vardb.cp_list(cp)) > 1:
@@ -1111,7 +1104,6 @@ def _calc_depclean(settings, trees, ldpath_mtimes, myopts, action, args_set, spi
return _depclean_result(1, [], False, 0, resolver)
def unresolved_deps():
-
soname_deps = set()
unresolvable = set()
for dep in resolver._dynamic_config._initially_unsatisfied_deps:
@@ -1146,7 +1138,6 @@ def _calc_depclean(settings, trees, ldpath_mtimes, myopts, action, args_set, spi
return False
if unresolvable and not allow_missing_deps:
-
if "--debug" in myopts:
writemsg("\ndigraph:\n\n", noiselevel=-1)
resolver._dynamic_config.digraph.debug_print()
@@ -1288,7 +1279,6 @@ def _calc_depclean(settings, trees, ldpath_mtimes, myopts, action, args_set, spi
return -1
def create_cleanlist():
-
if "--debug" in myopts:
writemsg("\ndigraph:\n\n", noiselevel=-1)
graph.debug_print()
@@ -1298,7 +1288,6 @@ def _calc_depclean(settings, trees, ldpath_mtimes, myopts, action, args_set, spi
if action == "depclean":
if args_set:
-
for pkg in sorted(vardb, key=cmp_sort_key(cmp_pkg_cpv)):
arg_atom = None
try:
@@ -1321,7 +1310,6 @@ def _calc_depclean(settings, trees, ldpath_mtimes, myopts, action, args_set, spi
show_parents(pkg)
elif action == "prune":
-
for atom in args_set:
for pkg in vardb.match_pkgs(atom):
if pkg not in graph:
@@ -1358,7 +1346,6 @@ def _calc_depclean(settings, trees, ldpath_mtimes, myopts, action, args_set, spi
break
if depclean_lib_check and (preserve_libs_restrict or not preserve_libs):
-
# Check if any of these packages are the sole providers of libraries
# with consumers that have not been selected for removal. If so, these
# packages and any dependencies need to be added to the graph.
@@ -1370,7 +1357,6 @@ def _calc_depclean(settings, trees, ldpath_mtimes, myopts, action, args_set, spi
writemsg_level(">>> Checking for lib consumers...\n")
for pkg in cleanlist:
-
if preserve_libs and "preserve-libs" not in pkg.restrict:
# Any needed libraries will be preserved
# when this package is unmerged, so there's
@@ -1407,7 +1393,6 @@ def _calc_depclean(settings, trees, ldpath_mtimes, myopts, action, args_set, spi
continue
for lib, lib_consumers in consumers.items():
-
soname = linkmap.getSoname(lib)
consumer_providers = []
@@ -1426,7 +1411,6 @@ def _calc_depclean(settings, trees, ldpath_mtimes, myopts, action, args_set, spi
consumer_map[pkg] = consumers
if consumer_map:
-
search_files = set()
for consumers in consumer_map.values():
for lib, consumer_providers in consumers.items():
@@ -1659,7 +1643,6 @@ def _calc_depclean(settings, trees, ldpath_mtimes, myopts, action, args_set, spi
continue
for child_node in matches:
if child_node in clean_set:
-
mypriority = priority.copy()
if atom.slot_operator_built:
if mypriority.buildtime:
@@ -1783,7 +1766,6 @@ def action_deselect(settings, trees, opts, atoms):
break
if discard_atoms:
for atom in sorted(discard_atoms):
-
if pretend:
action_desc = "Would remove"
else:
@@ -1840,7 +1822,6 @@ class _info_pkgs_ver:
def action_info(settings, trees, myopts, myfiles):
-
# See if we can find any packages installed matching the strings
# passed on the command line
mypkgs = []
@@ -1899,7 +1880,6 @@ def action_info(settings, trees, myopts, myfiles):
)
if myopts.get("--misspell-suggestions", "y") != "n":
-
writemsg("\nemerge: searching for similar names...", noiselevel=-1)
search_index = myopts.get("--search-index", "y") != "n"
@@ -2425,7 +2405,6 @@ def action_sync(
opts=DeprecationWarning,
action=DeprecationWarning,
):
-
if not isinstance(emerge_config, _emerge_config):
warnings.warn(
"_emerge.actions.action_sync() now expects "
@@ -2472,7 +2451,6 @@ def action_uninstall(settings, trees, ldpath_mtimes, opts, action, files, spinne
if is_valid_package_atom(x, allow_repo=True) or (
ignore_missing_eq and is_valid_package_atom("=" + x)
):
-
try:
atom = dep_expand(x, mydb=vardb, settings=settings)
except portage.exception.AmbiguousPackageName as e:
@@ -2803,7 +2781,6 @@ def adjust_config(myopts, settings):
def display_missing_pkg_set(root_config, set_name):
-
msg = []
msg.append(
("emerge: There are no sets to satisfy '%s'. " + "The following sets exist:")
@@ -2898,7 +2875,6 @@ def getportageversion(portdir, _unused, profile, chost, vardb):
class _emerge_config(SlotObject):
-
__slots__ = ("action", "args", "opts", "running_config", "target_config", "trees")
# Support unpack as tuple, for load_emerge_config backward compatibility.
@@ -2915,7 +2891,6 @@ class _emerge_config(SlotObject):
def load_emerge_config(emerge_config=None, env=None, **kargs):
-
if emerge_config is None:
emerge_config = _emerge_config(**kargs)
@@ -3085,7 +3060,6 @@ def nice(settings):
def ionice(settings):
-
ionice_cmd = settings.get("PORTAGE_IONICE_COMMAND")
if ionice_cmd:
ionice_cmd = portage.util.shlex_split(ionice_cmd)
@@ -3437,7 +3411,6 @@ def repo_name_duplicate_check(trees):
def run_action(emerge_config):
-
# skip global updates prior to sync, since it's called after sync
if (
emerge_config.action not in ("help", "info", "sync", "version")
@@ -3951,7 +3924,6 @@ def run_action(emerge_config):
return rval
elif emerge_config.action == "info":
-
# Ensure atoms are valid before calling unmerge().
vardb = emerge_config.target_config.trees["vartree"].dbapi
portdb = emerge_config.target_config.trees["porttree"].dbapi
diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py
index a88c7a1fa..9030b6543 100644
--- a/lib/_emerge/depgraph.py
+++ b/lib/_emerge/depgraph.py
@@ -302,7 +302,6 @@ class _rebuild_config:
or dep_root_slot in self.rebuild_list
or not dep_pkg.installed
):
-
# A direct rebuild dependency is being installed. We
# should update the parent as well to the latest binary,
# if that binary is valid.
@@ -637,7 +636,6 @@ class _dynamic_depgraph_config:
class depgraph:
-
# Represents the depth of a node that is unreachable from explicit
# user arguments (or their deep dependencies). Such nodes are pulled
# in by the _complete_graph method.
@@ -697,7 +695,6 @@ class depgraph:
return
for myroot in self._frozen_config.trees:
-
dynamic_deps = "dynamic_deps" in self._dynamic_config.myparams
preload_installed_pkgs = "--nodeps" not in self._frozen_config.myopts
@@ -761,7 +758,6 @@ class depgraph:
yield proc
class _dynamic_deps_proc_exit:
-
__slots__ = ("_pkg", "_fake_vartree")
def __init__(self, pkg, fake_vartree):
@@ -812,9 +808,7 @@ class depgraph:
forced_rebuilds = {}
for root, rebuild_atoms in atoms.items():
-
for slot_atom in rebuild_atoms:
-
inst_pkg, reinst_pkg = self._select_pkg_from_installed(root, slot_atom)
if inst_pkg is reinst_pkg or reinst_pkg is None:
@@ -869,7 +863,6 @@ class depgraph:
if built_slot_op_atoms and reinst_pkg is not None:
for child in self._dynamic_config.digraph.child_nodes(reinst_pkg):
-
if child.installed:
continue
@@ -997,7 +990,6 @@ class depgraph:
self._forced_rebuilds = forced_rebuilds
def _show_abi_rebuild_info(self):
-
if not self._forced_rebuilds:
return
@@ -1017,11 +1009,9 @@ class depgraph:
for which a more optimal alternative exists.
"""
for pkg in list(self._dynamic_config.ignored_binaries):
-
for selected_pkg in self._dynamic_config._package_tracker.match(
pkg.root, pkg.slot_atom
):
-
if selected_pkg > pkg:
self._dynamic_config.ignored_binaries.pop(pkg)
break
@@ -1225,7 +1215,6 @@ class depgraph:
self._show_ignored_binaries_changed_deps(ignored_binaries["changed_deps"])
def _show_ignored_binaries_respect_use(self, respect_use):
-
writemsg(
"\n!!! The following binary packages have been ignored "
+ "due to non matching USE:\n\n",
@@ -1258,7 +1247,6 @@ class depgraph:
writemsg(line + "\n", noiselevel=-1)
def _show_ignored_binaries_changed_deps(self, changed_deps):
-
writemsg(
"\n!!! The following binary packages have been "
"ignored due to changed dependencies:\n\n",
@@ -1284,7 +1272,6 @@ class depgraph:
writemsg(line + "\n", noiselevel=-1)
def _get_missed_updates(self):
-
# In order to minimize noise, show only the highest
# missed update from each SLOT.
missed_updates = {}
@@ -1322,7 +1309,6 @@ class depgraph:
return missed_updates
def _show_missed_update(self):
-
missed_updates = self._get_missed_updates()
if not missed_updates:
@@ -1348,7 +1334,6 @@ class depgraph:
)
def _show_missed_update_unsatisfied_dep(self, missed_updates):
-
if not missed_updates:
return
@@ -1356,7 +1341,6 @@ class depgraph:
backtrack_masked = []
for pkg, parent_atoms in missed_updates:
-
try:
for parent, root, atom in parent_atoms:
self._show_unsatisfied_dep(
@@ -1409,7 +1393,6 @@ class depgraph:
writemsg("\n", noiselevel=-1)
def _show_missed_update_slot_conflicts(self, missed_updates):
-
if not missed_updates:
return
@@ -1917,7 +1900,6 @@ class depgraph:
conflict_pkgs = []
conflict_atoms = {}
for pkg in slot_nodes:
-
if (
self._dynamic_config._allow_backtracking
and pkg in self._dynamic_config._runtime_pkg_mask
@@ -1968,7 +1950,6 @@ class depgraph:
)
def _slot_confict_backtrack(self, root, slot_atom, all_parents, conflict_pkgs):
-
debug = "--debug" in self._frozen_config.myopts
existing_node = next(
self._dynamic_config._package_tracker.match(
@@ -2223,9 +2204,7 @@ class depgraph:
return new_dep
if self._dynamic_config._autounmask is True:
-
for autounmask_level in self._autounmask_levels():
-
new_dep = self._slot_operator_update_probe(
dep, slot_conflict=True, autounmask_level=autounmask_level
)
@@ -2378,7 +2357,6 @@ class depgraph:
for replacement_parent in self._iter_similar_available(
dep.parent, dep.parent.slot_atom, autounmask_level=autounmask_level
):
-
if replacement_parent is dep.parent:
continue
@@ -2424,7 +2402,6 @@ class depgraph:
# so continue checking the rest of the atoms.
continue
else:
-
if atom.blocker or atom.cp != dep.child.cp:
continue
@@ -2509,7 +2486,6 @@ class depgraph:
dep.child, pkg, replacement_parent=replacement_parent
)
):
-
candidate_pkg_atoms.append((pkg, unevaluated_atom or atom))
candidate_pkgs.append(pkg)
@@ -2586,7 +2562,6 @@ class depgraph:
return None
def _slot_operator_unsatisfied_probe(self, dep):
-
if (
dep.parent.installed
and self._frozen_config.excluded_pkgs.findAtomForPackage(
@@ -2600,7 +2575,6 @@ class depgraph:
for replacement_parent in self._iter_similar_available(
dep.parent, dep.parent.slot_atom
):
-
for atom in replacement_parent.validated_atoms:
if (
not atom.slot_operator == "="
@@ -2619,7 +2593,6 @@ class depgraph:
)
if pkg is not None:
-
if debug:
msg = (
"",
@@ -2653,7 +2626,6 @@ class depgraph:
return False
def _slot_operator_unsatisfied_backtrack(self, dep):
-
parent = dep.parent
if "--debug" in self._frozen_config.myopts:
@@ -2872,9 +2844,7 @@ class depgraph:
)
for slot_key, slot_info in self._dynamic_config._slot_operator_deps.items():
-
for dep in slot_info:
-
atom = dep.atom
if not (atom.soname or atom.slot_operator_built):
@@ -2941,7 +2911,6 @@ class depgraph:
return None
def _changed_deps(self, pkg):
-
ebuild = None
try:
ebuild = self._pkg(pkg.cpv, "ebuild", pkg.root_config, myrepo=pkg.repo)
@@ -3105,7 +3074,6 @@ class depgraph:
debug = "--debug" in self._frozen_config.myopts
nodeps = "--nodeps" in self._frozen_config.myopts
if dep.blocker:
-
# Slot collision nodes are not allowed to block other packages since
# blocker validation is only able to account for one package per slot.
is_slot_conflict_parent = any(
@@ -3238,7 +3206,6 @@ class depgraph:
onlydeps=dep.onlydeps,
)
if dep_pkg is None:
-
# In order to suppress the sort of aggressive
# backtracking that can trigger undesirable downgrades
# as in bug 693836, do not backtrack if there's an
@@ -3417,7 +3384,6 @@ class depgraph:
return 0
if not pkg.onlydeps:
-
existing_node, existing_node_matches = self._check_slot_conflict(
pkg, dep.atom
)
@@ -3689,7 +3655,6 @@ class depgraph:
self._dynamic_config._highest_pkg_cache_cp_map.clear()
def _check_masks(self, pkg):
-
slot_key = (pkg.root, pkg.slot_atom)
# Check for upgrades in the same slot that are
@@ -3715,7 +3680,6 @@ class depgraph:
slot_info.append(dep)
def _add_pkg_deps(self, pkg, allow_unsatisfied=False):
-
if not self._add_pkg_soname_deps(pkg, allow_unsatisfied=allow_unsatisfied):
return False
@@ -4062,7 +4026,6 @@ class depgraph:
for atom, child in self._minimize_children(
pkg, dep_priority, root_config, selected_atoms[pkg]
):
-
# If this was a specially generated virtual atom
# from dep_check, map it back to the original, in
# order to avoid distortion in places like display
@@ -4077,7 +4040,6 @@ class depgraph:
mypriority = dep_priority.copy()
if not atom.blocker:
-
if atom.slot_operator == "=":
if mypriority.buildtime:
mypriority.buildtime_slot_op = True
@@ -4158,7 +4120,6 @@ class depgraph:
# here in order to avoid distorting the dependency graph like
# <=portage-2.1.6.x did.
for virt_dep, atoms in selected_atoms.items():
-
virt_pkg = virt_dep.child
if virt_pkg not in traversed_virt_pkgs:
continue
@@ -4171,7 +4132,6 @@ class depgraph:
)
if not dep_priority.ignored or self._dynamic_config._traverse_ignored_deps:
-
inst_pkgs = [
inst_pkg
for inst_pkg in reversed(vardb.match_pkgs(virt_dep.atom))
@@ -4195,7 +4155,6 @@ class depgraph:
for atom, child in self._minimize_children(
pkg, self._priority(runtime=True), root_config, atoms
):
-
# If this was a specially generated virtual atom
# from dep_check, map it back to the original, in
# order to avoid distortion in places like display
@@ -4985,7 +4944,6 @@ class depgraph:
return self._resolve(myfavorites)
def _gen_reinstall_sets(self):
-
atom_list = []
for root, atom in self._rebuild.rebuild_list:
atom_list.append((root, "__auto_rebuild__", atom))
@@ -6413,7 +6371,6 @@ class depgraph:
show_req_use = required_use_unsatisfied[0]
if show_req_use is not None:
-
pkg = show_req_use
output_cpv = pkg.cpv + _repo_separator + pkg.repo
writemsg(
@@ -6524,7 +6481,6 @@ class depgraph:
and not cp_exists
and self._frozen_config.myopts.get("--misspell-suggestions", "y") != "n"
):
-
writemsg("\nemerge: searching for similar names...", noiselevel=-1)
search_index = (
@@ -6671,7 +6627,6 @@ class depgraph:
and atom.slot is not None
and not atom.slot_operator_built
):
-
if "remove" in self._dynamic_config.myparams:
# We need to search the portdbapi, which is not in our
# normal dbs list, in order to find the real SLOT.
@@ -6794,7 +6749,6 @@ class depgraph:
return not arg
def _want_update_pkg(self, parent, pkg):
-
if self._frozen_config.excluded_pkgs.findAtomForPackage(
pkg, modified_use=self._pkg_use_enabled(pkg)
):
@@ -6997,7 +6951,6 @@ class depgraph:
autounmask_level.allow_unstable_keywords = True
for missing_keyword, unmask in ((False, True), (True, True)):
-
autounmask_level.allow_missing_keywords = missing_keyword
autounmask_level.allow_unmasks = unmask
@@ -7054,7 +7007,6 @@ class depgraph:
return pkg, existing
def _pkg_visibility_check(self, pkg, autounmask_level=None, trust_graph=True):
-
if pkg.visible:
return True
@@ -7532,7 +7484,6 @@ class depgraph:
continue
if atom.package and atom.use is not None:
-
if (
autounmask_level
and autounmask_level.allow_use_changes
@@ -8353,7 +8304,6 @@ class depgraph:
# are already built.
dep_keys = Package._runtime_keys
for myroot in self._frozen_config.trees:
-
if (
self._frozen_config.myopts.get("--root-deps") is not None
and myroot != self._frozen_config.target_root
@@ -8710,7 +8660,6 @@ class depgraph:
deep_system_deps = _find_deep_system_runtime_deps(mygraph)
def cmp_merge_preference(node1, node2):
-
if node1.operation == "uninstall":
if node2.operation == "uninstall":
return 0
@@ -8733,7 +8682,6 @@ class depgraph:
mygraph.order.sort(key=cmp_sort_key(cmp_merge_preference))
def altlist(self, reversed=DeprecationWarning): # pylint: disable=redefined-builtin
-
if reversed is not DeprecationWarning:
warnings.warn(
"The reversed parameter of "
@@ -8868,7 +8816,6 @@ class depgraph:
] = root_config
def _resolve_conflicts(self):
-
if (
"complete" not in self._dynamic_config.myparams
and self._dynamic_config._allow_backtracking
@@ -8883,7 +8830,6 @@ class depgraph:
self._process_slot_conflicts()
def _serialize_tasks(self):
-
debug = "--debug" in self._frozen_config.myopts
if debug:
@@ -9621,7 +9567,6 @@ class depgraph:
unsolved_cycle = False
if self._dynamic_config._allow_backtracking:
-
backtrack_infos = self._dynamic_config._backtrack_infos
backtrack_infos.setdefault("config", {})
circular_dependency = backtrack_infos["config"].setdefault(
@@ -9873,7 +9818,6 @@ class depgraph:
self._dynamic_config._blocked_pkgs.child_nodes(blocker),
self._dynamic_config._blocker_parents.parent_nodes(blocker),
):
-
is_slot_conflict_pkg = False
for conflict in self._dynamic_config._package_tracker.slot_conflicts():
if conflict.root == pkg.root and conflict.atom == pkg.slot_atom:
@@ -9912,7 +9856,6 @@ class depgraph:
msg = ["\n"]
indent = " "
for pkg, parent_atoms in conflict_pkgs.items():
-
# Prefer packages that are not directly involved in a conflict.
# It can be essential to see all the packages here, so don't
# omit any. If the list is long, people can simply use a pager.
@@ -9968,7 +9911,6 @@ class depgraph:
show_blocker_docs_link()
def display(self, mylist, favorites=[], verbosity=None):
-
# This is used to prevent display_problems() from
# redundantly displaying this exact same merge list
# again via _show_merge_list().
@@ -11079,7 +11021,6 @@ class depgraph:
and self._frozen_config.myopts.get("--autounmask-backtrack") != "y"
and self._have_autounmask_changes()
):
-
if (
self._frozen_config.myopts.get("--autounmask-continue") is True
and self._frozen_config.myopts.get("--autounmask-backtrack") != "n"
@@ -11237,7 +11178,6 @@ class _dep_check_composite_db(dbapi):
# when appropriate for bug #526160.
selected = pkg
for candidate in self._iter_virt_update(pkg, atom_set):
-
if candidate.slot != slot:
continue
@@ -11286,7 +11226,6 @@ class _dep_check_composite_db(dbapi):
return False
if pkg.cp.startswith("virtual/"):
-
if not self._depgraph._virt_deps_visible(pkg, ignore_use=True):
return False
@@ -11348,18 +11287,15 @@ class _dep_check_composite_db(dbapi):
return True
def _iter_virt_update(self, pkg, atom_set):
-
if (
self._depgraph._select_atoms_parent is not None
and self._depgraph._want_update_pkg(
self._depgraph._select_atoms_parent, pkg
)
):
-
for new_child in self._depgraph._iter_similar_available(
pkg, next(iter(atom_set))
):
-
if not self._depgraph._virt_deps_visible(new_child, ignore_use=True):
continue
@@ -11374,7 +11310,6 @@ class _dep_check_composite_db(dbapi):
yield new_child
def _have_virt_update(self, pkg, atom_set):
-
for new_child in self._iter_virt_update(pkg, atom_set):
if pkg < new_child:
return True
@@ -11390,7 +11325,6 @@ class _dep_check_composite_db(dbapi):
def ambiguous_package_name(arg, atoms, root_config, spinner, myopts):
-
if "--quiet" in myopts:
writemsg(
f'!!! The short ebuild name "{arg}" is ambiguous. Please specify\n',
@@ -11510,7 +11444,6 @@ def backtrack_depgraph(settings, trees, myopts, myparams, myaction, myfiles, spi
def _backtrack_depgraph(settings, trees, myopts, myparams, myaction, myfiles, spinner):
-
debug = "--debug" in myopts
mydepgraph = None
max_retries = myopts.get("--backtrack", 10)
@@ -11522,7 +11455,6 @@ def _backtrack_depgraph(settings, trees, myopts, myparams, myaction, myfiles, sp
frozen_config = _frozen_depgraph_config(settings, trees, myopts, myparams, spinner)
while backtracker:
-
if debug and mydepgraph is not None:
writemsg_level(
f"\n\nbacktracking try {backtracked} \n\n",
@@ -11564,7 +11496,6 @@ def _backtrack_depgraph(settings, trees, myopts, myparams, myaction, myfiles, sp
backtracked += 1
if backtracked and not success and not mydepgraph.need_display_problems():
-
if debug:
writemsg_level(
f"\n\nbacktracking aborted after {backtracked} tries\n\n",
@@ -11767,7 +11698,7 @@ def show_masked_packages(masked_packages):
# show one of them to avoid redundant appearance.
shown_cpvs = set()
have_eapi_mask = False
- for (root_config, pkgsettings, cpv, repo, metadata, mreasons) in masked_packages:
+ for root_config, pkgsettings, cpv, repo, metadata, mreasons in masked_packages:
output_cpv = cpv
if repo:
output_cpv += _repo_separator + repo
diff --git a/lib/_emerge/emergelog.py b/lib/_emerge/emergelog.py
index 50c1fddf0..c3c42d8e6 100644
--- a/lib/_emerge/emergelog.py
+++ b/lib/_emerge/emergelog.py
@@ -18,7 +18,6 @@ _emerge_log_dir = "/var/log"
def emergelog(xterm_titles, mystr, short_msg=None):
-
if _disable:
return
diff --git a/lib/_emerge/main.py b/lib/_emerge/main.py
index d22da1926..921d8cae7 100644
--- a/lib/_emerge/main.py
+++ b/lib/_emerge/main.py
@@ -975,7 +975,6 @@ def parse_opts(tmpcmdline, silent=False):
myoptions.selective = True
if myoptions.backtrack is not None:
-
try:
backtrack = int(myoptions.backtrack)
except (OverflowError, ValueError):
diff --git a/lib/_emerge/post_emerge.py b/lib/_emerge/post_emerge.py
index 922d07f17..37e2c3cc8 100644
--- a/lib/_emerge/post_emerge.py
+++ b/lib/_emerge/post_emerge.py
@@ -18,7 +18,6 @@ from ._flush_elog_mod_echo import _flush_elog_mod_echo
def clean_logs(settings):
-
if "clean-logs" not in settings.features:
return
diff --git a/lib/_emerge/resolver/backtracking.py b/lib/_emerge/resolver/backtracking.py
index d281afc5c..6fbfdd89c 100644
--- a/lib/_emerge/resolver/backtracking.py
+++ b/lib/_emerge/resolver/backtracking.py
@@ -5,7 +5,6 @@ import copy
class BacktrackParameter:
-
__slots__ = (
"circular_dependency",
"needed_unstable_keywords",
@@ -79,7 +78,6 @@ class BacktrackParameter:
class _BacktrackNode:
-
__slots__ = (
"parameter",
"depth",
@@ -100,7 +98,6 @@ class _BacktrackNode:
class Backtracker:
-
__slots__ = (
"_max_depth",
"_unexplored_nodes",
@@ -151,7 +148,6 @@ class Backtracker:
"""
for pkg, mask_info in runtime_pkg_mask.items():
-
if (
"missing dependency" in mask_info
or "slot_operator_mask_built" in mask_info
diff --git a/lib/_emerge/resolver/circular_dependency.py b/lib/_emerge/resolver/circular_dependency.py
index c43abc44c..c88b18a57 100644
--- a/lib/_emerge/resolver/circular_dependency.py
+++ b/lib/_emerge/resolver/circular_dependency.py
@@ -20,7 +20,6 @@ from portage.util import writemsg_level
class circular_dependency_handler:
-
MAX_AFFECTING_USE = 10
def __init__(self, depgraph, graph):
@@ -251,7 +250,6 @@ class circular_dependency_handler:
changed_parent
)
for ppkg, atom in parent_parent_atoms:
-
atom = atom.unevaluated_atom
if not atom.use:
continue
diff --git a/lib/_emerge/resolver/output_helpers.py b/lib/_emerge/resolver/output_helpers.py
index f27186181..fb9a030ca 100644
--- a/lib/_emerge/resolver/output_helpers.py
+++ b/lib/_emerge/resolver/output_helpers.py
@@ -270,7 +270,6 @@ def _create_use_string(
feature_flags,
reinst_flags,
):
-
if not conf.print_use_string:
return ""
@@ -342,7 +341,6 @@ def _create_use_string(
def _tree_display(conf, mylist):
-
# If there are any Uninstall instances, add the
# corresponding blockers to the digraph.
mygraph = conf.digraph.copy()
@@ -416,7 +414,6 @@ def _unordered_tree_display(mygraph, mylist):
seen_nodes = set()
def print_node(node, depth):
-
if node in seen_nodes:
pass
else:
@@ -591,7 +588,6 @@ class PkgInfo:
class PkgAttrDisplay(SlotObject):
-
__slots__ = (
"downgrade",
"fetch_restrict",
diff --git a/lib/_emerge/resolver/package_tracker.py b/lib/_emerge/resolver/package_tracker.py
index 03562334b..05f5d4e25 100644
--- a/lib/_emerge/resolver/package_tracker.py
+++ b/lib/_emerge/resolver/package_tracker.py
@@ -269,7 +269,6 @@ class PackageTracker:
self._conflicts_cache = []
for cp_key in self._multi_pkgs:
-
# Categorize packages according to cpv and slot.
slot_map = collections.defaultdict(list)
cpv_map = collections.defaultdict(list)
diff --git a/lib/_emerge/search.py b/lib/_emerge/search.py
index 6bdb4b739..eace589c2 100644
--- a/lib/_emerge/search.py
+++ b/lib/_emerge/search.py
@@ -18,7 +18,6 @@ from _emerge.Package import Package
class search:
-
#
# class constants
#
@@ -152,7 +151,6 @@ class search:
).visible
def _first_cp(self, cp):
-
for db in self._dbs:
if hasattr(db, "cp_list"):
matches = db.cp_list(cp)
@@ -249,7 +247,6 @@ class search:
self.searchkey = searchkey
def _iter_search(self):
-
match_category = 0
self.packagematches = []
if self.searchdesc:
diff --git a/lib/_emerge/show_invalid_depstring_notice.py b/lib/_emerge/show_invalid_depstring_notice.py
index c3c2dc8c7..536b9d64f 100644
--- a/lib/_emerge/show_invalid_depstring_notice.py
+++ b/lib/_emerge/show_invalid_depstring_notice.py
@@ -9,7 +9,6 @@ from portage.util import writemsg_level
def show_invalid_depstring_notice(parent_node, error_msg):
-
msg1 = (
"\n\n!!! Invalid or corrupt dependency specification: "
+ f"\n\n{error_msg}\n\n{parent_node}\n\n"
diff --git a/lib/_emerge/unmerge.py b/lib/_emerge/unmerge.py
index b49a8e8b6..e8fabb85f 100644
--- a/lib/_emerge/unmerge.py
+++ b/lib/_emerge/unmerge.py
@@ -417,7 +417,6 @@ def _unmerge_display(
# special purposes and can be ignored here (and are usually generated dynamically, so the
# user can't do much about them anyway)
if isinstance(sets[s], EditablePackageSet):
-
# This is derived from a snippet of code in the
# depgraph._iter_atoms_for_pkg() method.
for atom in sets[s].iterAtomsForPackage(pkg):
diff --git a/lib/portage/__init__.py b/lib/portage/__init__.py
index 3ff27a1a2..aa7e69920 100644
--- a/lib/portage/__init__.py
+++ b/lib/portage/__init__.py
@@ -52,7 +52,6 @@ except ImportError as e:
raise
try:
-
import portage.proxy.lazyimport
import portage.proxy as proxy
@@ -638,7 +637,6 @@ class _trees_dict(dict):
def create_trees(
config_root=None, target_root=None, trees=None, env=None, sysroot=None, eprefix=None
):
-
if trees is None:
trees = _trees_dict()
elif not isinstance(trees, _trees_dict):
@@ -664,7 +662,6 @@ def create_trees(
if settings["ROOT"] == "/" and settings["EPREFIX"] == const.EPREFIX:
trees._running_eroot = trees._target_eroot
else:
-
# When ROOT != "/" we only want overrides from the calling
# environment to apply to the config that's associated
# with ROOT != "/", so pass a nearly empty dict for the env parameter.
@@ -803,7 +800,6 @@ def _reset_legacy_globals():
class _LegacyGlobalProxy(proxy.objectproxy.ObjectProxy):
-
__slots__ = ("_name",)
def __init__(self, name):
diff --git a/lib/portage/_emirrordist/Config.py b/lib/portage/_emirrordist/Config.py
index eef859477..5b7f51221 100644
--- a/lib/portage/_emirrordist/Config.py
+++ b/lib/portage/_emirrordist/Config.py
@@ -88,7 +88,6 @@ class Config:
self.layouts = self.layout_conf.get_all_layouts()
def _open_log(self, log_desc, log_path, mode):
-
if log_path is None or getattr(self.options, "dry_run", False):
log_func = logger.info
line_format = "%s: %%s" % log_desc
@@ -103,7 +102,6 @@ class Config:
return self._LogFormatter(line_format, log_func)
class _LogFormatter:
-
__slots__ = ("_line_format", "_log_func")
def __init__(self, line_format, log_func):
diff --git a/lib/portage/_emirrordist/DeletionIterator.py b/lib/portage/_emirrordist/DeletionIterator.py
index 4921e226e..4494b7b24 100644
--- a/lib/portage/_emirrordist/DeletionIterator.py
+++ b/lib/portage/_emirrordist/DeletionIterator.py
@@ -91,7 +91,6 @@ class DeletionIterator:
self._config.scheduled_deletion_count += 1
if deletion_db is None or deletion_delay is None:
-
yield DeletionTask(
background=True,
distfile=filename,
@@ -107,7 +106,6 @@ class DeletionIterator:
deletion_db[filename] = start_time
elif deletion_entry + deletion_delay <= start_time:
-
yield DeletionTask(
background=True,
distfile=filename,
diff --git a/lib/portage/_emirrordist/DeletionTask.py b/lib/portage/_emirrordist/DeletionTask.py
index d01a6496c..cb8174d10 100644
--- a/lib/portage/_emirrordist/DeletionTask.py
+++ b/lib/portage/_emirrordist/DeletionTask.py
@@ -13,7 +13,6 @@ logger = logging.getLogger(__name__)
class DeletionTask(CompositeTask):
-
__slots__ = ("distfile", "distfile_path", "config")
def _start(self):
@@ -70,7 +69,6 @@ class DeletionTask(CompositeTask):
self._async_wait()
def _recycle_copier_exit(self, copier):
-
self._assert_current(copier)
if self._was_cancelled():
self.wait()
@@ -78,7 +76,6 @@ class DeletionTask(CompositeTask):
success = True
if copier.returncode == os.EX_OK:
-
try:
os.unlink(copier.src_path)
except OSError as e:
@@ -124,7 +121,6 @@ class DeletionTask(CompositeTask):
self.returncode = 1
def _success(self):
-
cpv = "unknown"
if self.config.distfiles_db is not None:
cpv = self.config.distfiles_db.get(self.distfile, cpv)
diff --git a/lib/portage/_emirrordist/FetchIterator.py b/lib/portage/_emirrordist/FetchIterator.py
index 50e2f58e7..0fd684e2c 100644
--- a/lib/portage/_emirrordist/FetchIterator.py
+++ b/lib/portage/_emirrordist/FetchIterator.py
@@ -44,7 +44,6 @@ class FetchIterator:
yield from cp_all(categories=(category,))
def __iter__(self):
-
portdb = self._config.portdb
get_repo_for_location = portdb.repositories.get_repo_for_location
@@ -53,19 +52,16 @@ class FetchIterator:
hash_filter = None
for cp in self._iter_every_cp():
-
if self._terminated.is_set():
return
for tree in portdb.porttrees:
-
# Reset state so the Manifest is pulled once
# for this cp / tree combination.
repo_config = get_repo_for_location(tree)
digests_future = portdb._event_loop.create_future()
for cpv in portdb.cp_list(cp, mytree=tree):
-
if self._terminated.is_set():
return
diff --git a/lib/portage/_emirrordist/FetchTask.py b/lib/portage/_emirrordist/FetchTask.py
index ebf418578..5b1d596fe 100644
--- a/lib/portage/_emirrordist/FetchTask.py
+++ b/lib/portage/_emirrordist/FetchTask.py
@@ -27,7 +27,6 @@ default_fetchcommand = 'wget -c -v -t 1 --passive-ftp --no-check-certificate --t
class FetchTask(CompositeTask):
-
__slots__ = (
"distfile",
"digests",
@@ -48,7 +47,6 @@ class FetchTask(CompositeTask):
)
def _start(self):
-
if (
self.config.options.fetch_log_dir is not None
and not self.config.options.dry_run
@@ -169,7 +167,6 @@ class FetchTask(CompositeTask):
pass
if self.config.options.recycle_dir is not None:
-
recycle_file = os.path.join(self.config.options.recycle_dir, self.distfile)
if self.config.options.dry_run:
@@ -184,7 +181,6 @@ class FetchTask(CompositeTask):
logger.debug(f"delete '{self.distfile}' from recycle")
def _distfiles_digester_exit(self, digester):
-
self._assert_current(digester)
if self._was_cancelled():
self.wait()
@@ -215,7 +211,6 @@ class FetchTask(CompositeTask):
_mirror_info = collections.namedtuple("_mirror_info", "name location")
def _start_fetch(self):
-
self._previously_added = False
self._fs_mirror_stack = []
if self.config.options.distfiles_local is not None:
@@ -244,7 +239,6 @@ class FetchTask(CompositeTask):
@staticmethod
def _mirror_iterator(uri, mirrors_dict):
-
slash_index = uri.find("/", 9)
if slash_index != -1:
mirror_name = uri[9:slash_index].strip("/")
@@ -279,7 +273,6 @@ class FetchTask(CompositeTask):
def _next_uri(self):
remaining_tries = self.config.options.tries - len(self._tried_uris)
if remaining_tries > 0:
-
if remaining_tries <= self.config.options.tries // 2:
while self._primaryuri_stack:
uri = self._primaryuri_stack.pop()
@@ -334,7 +327,6 @@ class FetchTask(CompositeTask):
self._try_next_mirror()
def _fs_mirror_digester_exit(self, digester):
-
self._assert_current(digester)
if self._was_cancelled():
self.wait()
@@ -409,7 +401,6 @@ class FetchTask(CompositeTask):
self._try_next_mirror()
def _fs_mirror_copier_exit(self, copier):
-
self._assert_current(copier)
if self._was_cancelled():
self.wait()
@@ -425,7 +416,6 @@ class FetchTask(CompositeTask):
self.scheduler.output(msg + "\n", background=True, log_path=self._log_path)
logger.error(msg)
else:
-
logger.debug(
f"copy '{self.distfile}' from {current_mirror.name} to distfiles"
)
@@ -456,7 +446,6 @@ class FetchTask(CompositeTask):
self._try_next_mirror()
def _fetch_uri(self, uri):
-
if self.config.options.dry_run:
# Simply report success.
logger.info(f"dry-run: fetch '{self.distfile}' from '{uri}'")
@@ -510,7 +499,6 @@ class FetchTask(CompositeTask):
self._start_task(fetcher, self._fetcher_exit)
def _fetcher_exit(self, fetcher):
-
self._assert_current(fetcher)
if self._was_cancelled():
self.wait()
@@ -530,7 +518,6 @@ class FetchTask(CompositeTask):
self._try_next_mirror()
def _fetch_digester_exit(self, digester):
-
self._assert_current(digester)
if self._was_cancelled():
self.wait()
@@ -585,7 +572,6 @@ class FetchTask(CompositeTask):
self._try_next_mirror()
def _fetch_copier_exit(self, copier):
-
self._assert_current(copier)
try:
@@ -697,7 +683,6 @@ class FetchTask(CompositeTask):
return st1.st_dev == st2.st_dev
def _hardlink_atomic(self, src, dest, dir_info, symlink=False):
-
head, tail = os.path.split(dest)
hardlink_tmp = os.path.join(
head, f".{tail}._mirrordist_hardlink_.{portage.getpid()}"
diff --git a/lib/portage/_emirrordist/MirrorDistTask.py b/lib/portage/_emirrordist/MirrorDistTask.py
index c52aec24e..5b2543c13 100644
--- a/lib/portage/_emirrordist/MirrorDistTask.py
+++ b/lib/portage/_emirrordist/MirrorDistTask.py
@@ -21,7 +21,6 @@ logger = logging.getLogger(__name__)
class MirrorDistTask(CompositeTask):
-
__slots__ = ("_config", "_fetch_iterator", "_term_rlock", "_term_callback_handle")
def __init__(self, config):
@@ -42,7 +41,6 @@ class MirrorDistTask(CompositeTask):
self._start_task(fetch, self._fetch_exit)
def _fetch_exit(self, fetch):
-
self._assert_current(fetch)
if self._was_cancelled():
self._async_wait()
@@ -61,7 +59,6 @@ class MirrorDistTask(CompositeTask):
self._post_deletion()
def _deletion_exit(self, deletion):
-
self._assert_current(deletion)
if self._was_cancelled():
self._async_wait()
@@ -70,7 +67,6 @@ class MirrorDistTask(CompositeTask):
self._post_deletion()
def _post_deletion(self):
-
if self._config.options.recycle_db is not None:
self._update_recycle_db()
@@ -84,7 +80,6 @@ class MirrorDistTask(CompositeTask):
self._async_wait()
def _update_recycle_db(self):
-
start_time = self._config.start_time
recycle_dir = self._config.options.recycle_dir
recycle_db = self._config.recycle_db
@@ -94,7 +89,6 @@ class MirrorDistTask(CompositeTask):
recycle_db_cache = dict(recycle_db.items())
for filename in os.listdir(recycle_dir):
-
recycle_file = os.path.join(recycle_dir, filename)
try:
@@ -150,7 +144,6 @@ class MirrorDistTask(CompositeTask):
logger.debug(("drop non-existent '%s' from " "recycle db") % filename)
def _scheduled_deletion_log(self):
-
start_time = self._config.start_time
dry_run = self._config.options.dry_run
deletion_delay = self._config.options.deletion_delay
diff --git a/lib/portage/_emirrordist/main.py b/lib/portage/_emirrordist/main.py
index a497ff4e1..1383b4652 100644
--- a/lib/portage/_emirrordist/main.py
+++ b/lib/portage/_emirrordist/main.py
@@ -232,7 +232,6 @@ def parse_args(args):
def emirrordist_main(args):
-
# The calling environment is ignored, so the program is
# completely controlled by commandline arguments.
env = {}
@@ -459,7 +458,6 @@ def emirrordist_main(args):
l.setLevel(l.getEffectiveLevel() - 10 * options.verbose)
with Config(options, portdb, SchedulerInterface(global_event_loop())) as config:
-
if not options.mirror:
parser.error("No action specified")
diff --git a/lib/portage/_sets/__init__.py b/lib/portage/_sets/__init__.py
index 3130ce22f..e3fd77fa2 100644
--- a/lib/portage/_sets/__init__.py
+++ b/lib/portage/_sets/__init__.py
@@ -339,7 +339,6 @@ class SetConfig:
def load_default_config(settings, trees):
-
if not _ENABLE_SET_CONFIG:
return SetConfig(None, settings, trees)
diff --git a/lib/portage/_sets/dbapi.py b/lib/portage/_sets/dbapi.py
index f40246261..b3d7c5ffb 100644
--- a/lib/portage/_sets/dbapi.py
+++ b/lib/portage/_sets/dbapi.py
@@ -63,7 +63,6 @@ class EverythingSet(PackageSet):
class OwnerSet(PackageSet):
-
_operations = ["merge", "unmerge"]
description = (
@@ -145,7 +144,6 @@ class OwnerSet(PackageSet):
class VariableSet(EverythingSet):
-
_operations = ["merge", "unmerge"]
description = (
@@ -221,7 +219,6 @@ class VariableSet(EverythingSet):
class SubslotChangedSet(PackageSet):
-
_operations = ["merge", "unmerge"]
description = (
@@ -258,7 +255,6 @@ class SubslotChangedSet(PackageSet):
class DowngradeSet(PackageSet):
-
_operations = ["merge", "unmerge"]
description = (
@@ -297,7 +293,6 @@ class DowngradeSet(PackageSet):
class UnavailableSet(EverythingSet):
-
_operations = ["unmerge"]
description = (
@@ -314,7 +309,6 @@ class UnavailableSet(EverythingSet):
return not self._metadatadb.match(atom)
def singleBuilder(cls, options, settings, trees):
-
metadatadb = options.get("metadata-source", "porttree")
if not metadatadb in trees:
raise SetConfigError(
@@ -327,7 +321,6 @@ class UnavailableSet(EverythingSet):
class UnavailableBinaries(EverythingSet):
-
_operations = (
"merge",
"unmerge",
@@ -351,7 +344,6 @@ class UnavailableBinaries(EverythingSet):
return not self._metadatadb.cpv_exists(inst_cpv)
def singleBuilder(cls, options, settings, trees):
-
metadatadb = options.get("metadata-source", "bintree")
if not metadatadb in trees:
raise SetConfigError(
@@ -460,7 +452,6 @@ class AgeSet(EverythingSet):
self._age = age
def _filter(self, atom):
-
cpv = self._db.match(atom)[0]
try:
(date,) = self._db.aux_get(cpv, self._aux_keys)
@@ -499,7 +490,6 @@ class DateSet(EverythingSet):
self._date = date
def _filter(self, atom):
-
cpv = self._db.match(atom)[0]
try:
(date,) = self._db.aux_get(cpv, self._aux_keys)
@@ -608,7 +598,6 @@ class RebuiltBinaries(EverythingSet):
class ChangedDepsSet(PackageSet):
-
_operations = ["merge", "unmerge"]
description = (
diff --git a/lib/portage/cache/anydbm.py b/lib/portage/cache/anydbm.py
index 243116081..94a270a48 100644
--- a/lib/portage/cache/anydbm.py
+++ b/lib/portage/cache/anydbm.py
@@ -18,7 +18,6 @@ from portage.cache import cache_errors
class database(fs_template.FsBased):
-
validation_chf = "md5"
chf_types = ("md5", "mtime")
diff --git a/lib/portage/cache/ebuild_xattr.py b/lib/portage/cache/ebuild_xattr.py
index f2ba1a389..86fd5dbf0 100644
--- a/lib/portage/cache/ebuild_xattr.py
+++ b/lib/portage/cache/ebuild_xattr.py
@@ -20,7 +20,6 @@ class NoValueException(Exception):
class database(fs_template.FsBased):
-
autocommits = True
def __init__(self, *args, **config):
@@ -151,7 +150,6 @@ class database(fs_template.FsBased):
return os.path.exists(self.__get_path(cpv))
def __iter__(self):
-
for root, dirs, files in os.walk(self.portdir):
for file in files:
try:
diff --git a/lib/portage/cache/flat_hash.py b/lib/portage/cache/flat_hash.py
index 992721c85..cc0536276 100644
--- a/lib/portage/cache/flat_hash.py
+++ b/lib/portage/cache/flat_hash.py
@@ -16,7 +16,6 @@ from portage.versions import _pkg_str
class database(fs_template.FsBased):
-
autocommits = True
def __init__(self, *args, **config):
@@ -148,7 +147,6 @@ class database(fs_template.FsBased):
class md5_database(database):
-
validation_chf = "md5"
store_eclass_paths = False
diff --git a/lib/portage/cache/fs_template.py b/lib/portage/cache/fs_template.py
index c399a0d13..738bb5417 100644
--- a/lib/portage/cache/fs_template.py
+++ b/lib/portage/cache/fs_template.py
@@ -21,7 +21,6 @@ class FsBased(template.database):
attempt to ensure files have the specified owners/perms"""
def __init__(self, *args, **config):
-
for x, y in (("gid", -1), ("perms", 0o644)):
if x in config:
# Since Python 3.4, chown requires int type (no proxies).
diff --git a/lib/portage/cache/index/IndexStreamIterator.py b/lib/portage/cache/index/IndexStreamIterator.py
index 78d7f0e5f..616aca0e3 100644
--- a/lib/portage/cache/index/IndexStreamIterator.py
+++ b/lib/portage/cache/index/IndexStreamIterator.py
@@ -4,20 +4,16 @@
class IndexStreamIterator:
def __init__(self, f, parser):
-
self.parser = parser
self._file = f
def close(self):
-
if self._file is not None:
self._file.close()
self._file = None
def __iter__(self):
-
try:
-
for line in self._file:
node = self.parser(line)
if node is not None:
diff --git a/lib/portage/cache/index/pkg_desc_index.py b/lib/portage/cache/index/pkg_desc_index.py
index 8e9ee47f4..9c63c2559 100644
--- a/lib/portage/cache/index/pkg_desc_index.py
+++ b/lib/portage/cache/index/pkg_desc_index.py
@@ -37,7 +37,6 @@ def pkg_desc_index_line_format(cp, pkgs, desc):
def pkg_desc_index_line_read(line, repo=None):
-
try:
pkgs, desc = line.split(":", 1)
except ValueError:
diff --git a/lib/portage/cache/mappings.py b/lib/portage/cache/mappings.py
index 00126cf44..29df7ba6e 100644
--- a/lib/portage/cache/mappings.py
+++ b/lib/portage/cache/mappings.py
@@ -146,7 +146,6 @@ class UserDict(MutableMapping):
__slots__ = ("data",)
def __init__(self, *args, **kwargs):
-
self.data = {}
if len(args) > 1:
@@ -298,13 +297,11 @@ def slot_dict_class(keys, prefix="_val_"):
if v is None:
class SlotDict:
-
allowed_keys = keys_set
_prefix = prefix
__slots__ = ("__weakref__",) + tuple(prefix + k for k in allowed_keys)
def __init__(self, *args, **kwargs):
-
if len(args) > 1:
raise TypeError(
"expected at most 1 positional argument, got " + repr(len(args))
diff --git a/lib/portage/cache/sql_template.py b/lib/portage/cache/sql_template.py
index 9e6668129..b9e92d0ce 100644
--- a/lib/portage/cache/sql_template.py
+++ b/lib/portage/cache/sql_template.py
@@ -157,7 +157,6 @@ class SQLDatabase(template.database):
self.db.close()
def _setitem(self, cpv, values):
-
try:
# insert.
try:
diff --git a/lib/portage/cache/sqlite.py b/lib/portage/cache/sqlite.py
index 26f6b811a..21ecd7ea3 100644
--- a/lib/portage/cache/sqlite.py
+++ b/lib/portage/cache/sqlite.py
@@ -14,7 +14,6 @@ from portage.localization import _
class database(fs_template.FsBased):
-
validation_chf = "md5"
chf_types = ("md5", "mtime")
diff --git a/lib/portage/cache/template.py b/lib/portage/cache/template.py
index 90c3685b2..d869df93e 100644
--- a/lib/portage/cache/template.py
+++ b/lib/portage/cache/template.py
@@ -120,7 +120,8 @@ class database:
def __setitem__(self, cpv, values):
"""set a cpv to values
- This shouldn't be overriden in derived classes since it handles the readonly checks"""
+ This shouldn't be overriden in derived classes since it handles the readonly checks
+ """
if self.readonly:
raise cache_errors.ReadOnlyRestriction()
d = None
@@ -156,7 +157,8 @@ class database:
def __delitem__(self, cpv):
"""delete a key from the cache.
- This shouldn't be overriden in derived classes since it handles the readonly checks"""
+ This shouldn't be overriden in derived classes since it handles the readonly checks
+ """
if self.readonly:
raise cache_errors.ReadOnlyRestriction()
if not self.autocommits:
diff --git a/lib/portage/cache/volatile.py b/lib/portage/cache/volatile.py
index 9ee44605c..6c0473b32 100644
--- a/lib/portage/cache/volatile.py
+++ b/lib/portage/cache/volatile.py
@@ -6,7 +6,6 @@ from portage.cache import template
class database(template.database):
-
autocommits = True
serialize_eclasses = False
store_eclass_paths = False
diff --git a/lib/portage/checksum.py b/lib/portage/checksum.py
index 352b4429b..31c4d1fc7 100644
--- a/lib/portage/checksum.py
+++ b/lib/portage/checksum.py
@@ -56,7 +56,6 @@ def _open_file(filename):
class _generate_hash_function:
-
__slots__ = ("_hashobject",)
def __init__(self, hashtype, hashobject, origin="unknown"):
diff --git a/lib/portage/data.py b/lib/portage/data.py
index 18cf50a87..4b9b74c7b 100644
--- a/lib/portage/data.py
+++ b/lib/portage/data.py
@@ -327,7 +327,6 @@ def _init(settings):
"_portage_grpname" not in _initialized_globals
and "_portage_username" not in _initialized_globals
):
-
# Prevents "TypeError: expected string" errors
# from grp.getgrnam() with PyPy
native_string = platform.python_implementation() == "PyPy"
diff --git a/lib/portage/dbapi/IndexedPortdb.py b/lib/portage/dbapi/IndexedPortdb.py
index d6a5b8aee..6f73d9d60 100644
--- a/lib/portage/dbapi/IndexedPortdb.py
+++ b/lib/portage/dbapi/IndexedPortdb.py
@@ -43,7 +43,6 @@ class IndexedPortdb:
)
def __init__(self, portdb):
-
self._portdb = portdb
for k in self._copy_attrs:
@@ -54,7 +53,6 @@ class IndexedPortdb:
self._unindexed_cp_map = None
def _init_index(self):
-
cp_map = {}
desc_cache = {}
self._desc_cache = desc_cache
@@ -118,7 +116,6 @@ class IndexedPortdb:
cp_group_iter = MultiIterGroupBy(streams, key=operator.attrgetter("cp"))
for cp_group in cp_group_iter:
-
new_cp = None
cp_list = cp_map.get(cp_group[0].cp)
if cp_list is None:
diff --git a/lib/portage/dbapi/_SyncfsProcess.py b/lib/portage/dbapi/_SyncfsProcess.py
index 6aa04fa58..6beeac8dd 100644
--- a/lib/portage/dbapi/_SyncfsProcess.py
+++ b/lib/portage/dbapi/_SyncfsProcess.py
@@ -18,7 +18,6 @@ class SyncfsProcess(ForkProcess):
@staticmethod
def _get_syncfs():
-
filename = find_library("c")
if filename is not None:
library = LoadLibrary(filename)
@@ -31,7 +30,6 @@ class SyncfsProcess(ForkProcess):
return None
def _run(self):
-
syncfs_failed = False
syncfs = self._get_syncfs()
diff --git a/lib/portage/dbapi/_VdbMetadataDelta.py b/lib/portage/dbapi/_VdbMetadataDelta.py
index 99d8cf94e..f9528fc4f 100644
--- a/lib/portage/dbapi/_VdbMetadataDelta.py
+++ b/lib/portage/dbapi/_VdbMetadataDelta.py
@@ -11,7 +11,6 @@ from portage.versions import cpv_getkey
class VdbMetadataDelta:
-
_format_version = "1"
def __init__(self, vardb):
@@ -31,7 +30,6 @@ class VdbMetadataDelta:
)
def load(self):
-
if not os.path.exists(self._vardb._aux_cache_filename):
# If the primary cache doesn't exist yet, then
# we can't record a delta against it.
@@ -96,7 +94,6 @@ class VdbMetadataDelta:
return None
def recordEvent(self, event, cpv, slot, counter):
-
self._vardb.lock()
try:
deltas_obj = self.load()
diff --git a/lib/portage/dbapi/_similar_name_search.py b/lib/portage/dbapi/_similar_name_search.py
index 0af3e8070..3ee174072 100644
--- a/lib/portage/dbapi/_similar_name_search.py
+++ b/lib/portage/dbapi/_similar_name_search.py
@@ -7,7 +7,6 @@ from portage.versions import catsplit
def similar_name_search(dbs, atom):
-
cp_lower = atom.cp.lower()
cat, pkg = catsplit(cp_lower)
if cat == "null":
diff --git a/lib/portage/dbapi/bintree.py b/lib/portage/dbapi/bintree.py
index 97c74903a..23bc41d44 100644
--- a/lib/portage/dbapi/bintree.py
+++ b/lib/portage/dbapi/bintree.py
@@ -443,7 +443,6 @@ class binarytree:
virtual=DeprecationWarning,
settings=None,
):
-
if pkgdir is None:
raise TypeError("pkgdir parameter is required")
@@ -1224,7 +1223,6 @@ class binarytree:
return pkgindex if update_pkgindex else None
def _populate_remote(self, getbinpkg_refresh=True):
-
self._remote_has_index = False
self._remotepkgs = {}
@@ -1347,7 +1345,6 @@ class binarytree:
)
if f is None:
-
path = parsed_url.path.rstrip("/") + "/Packages"
if repo.fetchcommand is None and parsed_url.scheme == "ssh":
@@ -2112,7 +2109,6 @@ class binarytree:
raise InvalidBinaryPackageFormat(binpkg_format)
def _allocate_filename_multi(self, cpv, remote_binpkg_format=None):
-
# First, get the max build_id found when _populate was
# called.
max_build_id = self._max_build_id(cpv)
@@ -2262,7 +2258,6 @@ class binarytree:
return pkgindex
def _get_digests(self, pkg):
-
try:
cpv = pkg.cpv
except AttributeError:
diff --git a/lib/portage/dbapi/porttree.py b/lib/portage/dbapi/porttree.py
index b2f07956d..3c38e99d4 100644
--- a/lib/portage/dbapi/porttree.py
+++ b/lib/portage/dbapi/porttree.py
@@ -570,7 +570,6 @@ class portdbapi(dbapi):
return (None, 0)
def _write_cache(self, cpv, repo_path, metadata, ebuild_hash):
-
try:
cache = self.auxdb[repo_path]
chf = cache.validation_chf
@@ -1729,7 +1728,6 @@ def _async_manifest_fetchlist(
def _parse_uri_map(cpv, metadata, use=None):
-
myuris = use_reduce(
metadata.get("SRC_URI", ""),
uselist=use,
diff --git a/lib/portage/dbapi/vartree.py b/lib/portage/dbapi/vartree.py
index 5b6a9ea83..a9e332a74 100644
--- a/lib/portage/dbapi/vartree.py
+++ b/lib/portage/dbapi/vartree.py
@@ -114,7 +114,6 @@ import warnings
class vardbapi(dbapi):
-
_excluded_dirs = ["CVS", "lost+found"]
_excluded_dirs = [re.escape(x) for x in _excluded_dirs]
_excluded_dirs = re.compile(
@@ -666,7 +665,6 @@ class vardbapi(dbapi):
or not os.path.exists(self._cache_delta_filename)
)
):
-
ensure_dirs(os.path.dirname(self._aux_cache_filename))
self._owners.populate() # index any unindexed contents
@@ -1529,7 +1527,6 @@ class vardbapi(dbapi):
return x
while path_iter:
-
path = path_iter.pop()
if case_insensitive:
path = path.lower()
@@ -1648,7 +1645,6 @@ class vartree:
def __init__(
self, root=None, virtual=DeprecationWarning, categories=None, settings=None
):
-
if settings is None:
settings = portage.settings
@@ -1870,7 +1866,6 @@ class dblink:
return isinstance(other, dblink) and self._hash_key == other._hash_key
def _get_protect_obj(self):
-
if self._protect_obj is None:
self._protect_obj = ConfigProtect(
self._eroot,
@@ -2568,7 +2563,6 @@ class dblink:
scheduler.run_until_complete(builddir_lock.async_unlock())
if log_path is not None:
-
if not failures and "unmerge-logs" not in self.settings.features:
try:
os.unlink(log_path)
@@ -2739,7 +2733,6 @@ class dblink:
[f"Could not chmod or unlink '{file_name}': {ose}"],
)
else:
-
# Even though the file no longer exists, we log it
# here so that _unmerge_dirs can see that we've
# removed a file from this device, and will record
@@ -2787,7 +2780,6 @@ class dblink:
infodirs_inodes.add((statobj.st_dev, statobj.st_ino))
for i, objkey in enumerate(mykeys):
-
obj = normalize_path(objkey)
if os is _os_merge:
try:
@@ -2939,7 +2931,6 @@ class dblink:
and stat.S_ISDIR(statobj.st_mode)
and obj.startswith(real_root)
):
-
relative_path = obj[real_root_len:]
try:
target_dir_contents = os.listdir(obj)
@@ -3082,7 +3073,6 @@ class dblink:
unlink,
os,
):
-
real_root = self.settings["ROOT"]
show_unmerge = self._show_unmerge
ignored_unlink_errnos = self._ignored_unlink_errnos
@@ -3172,7 +3162,6 @@ class dblink:
def _unmerge_dirs(
self, dirs, infodirs_inodes, protected_symlinks, unmerge_desc, unlink, os
):
-
show_unmerge = self._show_unmerge
infodir_cleanup = self._infodir_cleanup
ignored_unlink_errnos = self._ignored_unlink_errnos
@@ -3391,7 +3380,6 @@ class dblink:
if self.getcontents():
basename = os_filename_arg.path.basename(destfile)
if self._contents_basenames is None:
-
try:
for x in self._contents.keys():
_unicode_encode(
@@ -3431,7 +3419,6 @@ class dblink:
del e
return False
if self._contents_inodes is None:
-
if os is _os_merge:
try:
for x in self._contents.keys():
@@ -3558,7 +3545,6 @@ class dblink:
provider_nodes = set()
# Create provider nodes and add them to the graph.
for f_abs in old_contents:
-
if os is _os_merge:
try:
_unicode_encode(
@@ -3882,7 +3868,6 @@ class dblink:
self.vartree.dbapi._plib_registry.pruneNonExisting()
def _collision_protect(self, srcroot, destroot, mypkglist, file_list, symlink_list):
-
os = _os_merge
real_relative_paths = {}
@@ -4110,7 +4095,6 @@ class dblink:
inode_map = {}
real_paths = set()
for i, path in enumerate(file_paths):
-
if os is _os_merge:
try:
_unicode_encode(path, encoding=_encodings["merge"], errors="strict")
@@ -4500,7 +4484,6 @@ class dblink:
eprefix_len = len(self.settings["EPREFIX"])
while True:
-
unicode_error = False
eagain_error = False
@@ -5305,7 +5288,6 @@ class dblink:
return backup_p
def _merge_contents(self, srcroot, destroot, cfgfiledict):
-
cfgfiledict_orig = cfgfiledict.copy()
# open CONTENTS file (possibly overwriting old one) for recording
@@ -5456,7 +5438,6 @@ class dblink:
mergelist = stufftomerge[:]
while mergelist:
-
relative_path = mergelist.pop()
mysrc = join(srcroot, relative_path)
mydest = join(destroot, relative_path)
@@ -5904,7 +5885,6 @@ class dblink:
dest_md5,
dest_link,
):
-
move_me = True
protected = True
force = False
@@ -6001,7 +5981,6 @@ class dblink:
returncode = None
if platform.system() == "Linux":
-
paths = []
for path in self._device_path_map.values():
if path is not False:
@@ -6061,7 +6040,6 @@ class dblink:
# fail-clean is enabled, and the success/die hooks have
# already been called by EbuildPhase.
if os.path.isdir(self.settings["PORTAGE_BUILDDIR"]):
-
if retval == os.EX_OK:
phase = "success_hooks"
else:
@@ -6190,7 +6168,6 @@ class dblink:
return os.path.exists(os.path.join(self.dbdir, "CATEGORY"))
def _pre_merge_backup(self, backup_dblink, downgrade):
-
if "unmerge-backup" in self.settings.features or (
downgrade and "downgrade-backup" in self.settings.features
):
@@ -6199,7 +6176,6 @@ class dblink:
return os.EX_OK
def _pre_unmerge_backup(self, background):
-
if "unmerge-backup" in self.settings.features:
logfile = None
if self.settings.get("PORTAGE_BACKGROUND") != "subprocess":
@@ -6209,7 +6185,6 @@ class dblink:
return os.EX_OK
def _quickpkg_dblink(self, backup_dblink, background, logfile):
-
build_time = backup_dblink.getfile("BUILD_TIME")
try:
build_time = int(build_time.strip())
@@ -6225,7 +6200,6 @@ class dblink:
self.lockdb()
try:
-
if not backup_dblink.exists():
# It got unmerged by a concurrent process.
return os.EX_OK
diff --git a/lib/portage/dep/__init__.py b/lib/portage/dep/__init__.py
index 45ea6b571..889d98263 100644
--- a/lib/portage/dep/__init__.py
+++ b/lib/portage/dep/__init__.py
@@ -1024,7 +1024,6 @@ def flatten(mylist):
class _use_dep:
-
__slots__ = (
"_eapi_attrs",
"conditional",
@@ -1070,7 +1069,6 @@ class _use_dep:
conditional=None,
required=None,
):
-
self._eapi_attrs = eapi_attrs
if enabled_flags is not None:
@@ -1977,7 +1975,6 @@ class ExtendedAtomDict(portage.cache.mappings.MutableMapping):
return self._normal.setdefault(cp, default)
def __getitem__(self, cp):
-
if not isinstance(cp, str):
raise KeyError(cp)
@@ -2495,7 +2492,6 @@ def match_from_list(mydep, candidate_list):
mylist = []
if mydep.extended_syntax:
-
for x in candidate_list:
cp = getattr(x, "cp", None)
if cp is None:
@@ -2510,7 +2506,6 @@ def match_from_list(mydep, candidate_list):
mylist.append(x)
if mylist and mydep.operator == "=*":
-
candidate_list = mylist
mylist = []
# Currently, only \*\w+\* is supported.
@@ -2821,7 +2816,6 @@ def get_required_use_flags(required_use, eapi=None):
class _RequiredUseLeaf:
-
__slots__ = ("_satisfied", "_token")
def __init__(self, token, satisfied):
@@ -2833,7 +2827,6 @@ class _RequiredUseLeaf:
class _RequiredUseBranch:
-
__slots__ = ("_children", "_operator", "_parent", "_satisfied")
def __init__(self, operator=None, parent=None):
@@ -2846,7 +2839,6 @@ class _RequiredUseBranch:
return self._satisfied
def tounicode(self):
-
include_parens = self._parent is not None
tokens = []
if self._operator is not None:
diff --git a/lib/portage/dep/_slot_operator.py b/lib/portage/dep/_slot_operator.py
index b5ffc61eb..8ce72956f 100644
--- a/lib/portage/dep/_slot_operator.py
+++ b/lib/portage/dep/_slot_operator.py
@@ -58,7 +58,6 @@ def ignore_built_slot_operator_deps(dep_struct):
def evaluate_slot_operator_equal_deps(settings, use, trees):
-
metadata = settings.configdict["pkg"]
eapi = metadata["EAPI"]
eapi_attrs = _get_eapi_attrs(eapi)
diff --git a/lib/portage/dep/soname/SonameAtom.py b/lib/portage/dep/soname/SonameAtom.py
index 327192ba9..78129f326 100644
--- a/lib/portage/dep/soname/SonameAtom.py
+++ b/lib/portage/dep/soname/SonameAtom.py
@@ -3,7 +3,6 @@
class SonameAtom:
-
__slots__ = ("multilib_category", "soname", "_hash_key", "_hash_value")
# Distiguishes package atoms from other atom types
diff --git a/lib/portage/dep/soname/multilib_category.py b/lib/portage/dep/soname/multilib_category.py
index 57bfcb4b0..d195116fe 100644
--- a/lib/portage/dep/soname/multilib_category.py
+++ b/lib/portage/dep/soname/multilib_category.py
@@ -112,13 +112,11 @@ _mips_abi_map = {
def _compute_suffix_loong(elf_header):
-
loong_abi = elf_header.e_flags & EF_LOONGARCH_ABI_MASK
return _loong_abi_map.get(loong_abi)
def _compute_suffix_mips(elf_header):
-
name = None
mips_abi = elf_header.e_flags & EF_MIPS_ABI
@@ -179,7 +177,6 @@ def compute_multilib_category(elf_header):
"""
category = None
if elf_header.e_machine is not None:
-
prefix = _machine_prefix_map.get(elf_header.e_machine)
specialized_func = _specialized_funcs.get(prefix)
suffix = None
diff --git a/lib/portage/elog/mod_save.py b/lib/portage/elog/mod_save.py
index 0cd49afed..126aded6e 100644
--- a/lib/portage/elog/mod_save.py
+++ b/lib/portage/elog/mod_save.py
@@ -15,7 +15,6 @@ from portage.util import apply_permissions, ensure_dirs, normalize_path
def process(mysettings, key, logentries, fulltext):
-
if mysettings.get("PORTAGE_LOGDIR"):
logdir = normalize_path(mysettings["PORTAGE_LOGDIR"])
else:
diff --git a/lib/portage/emaint/main.py b/lib/portage/emaint/main.py
index 805113b78..af7420368 100644
--- a/lib/portage/emaint/main.py
+++ b/lib/portage/emaint/main.py
@@ -159,7 +159,6 @@ def print_results(results):
def emaint_main(myargv):
-
# Similar to emerge, emaint needs a default umask so that created
# files (such as the world file) have sane permissions.
os.umask(0o22)
diff --git a/lib/portage/emaint/modules/binhost/binhost.py b/lib/portage/emaint/modules/binhost/binhost.py
index e8c4e7684..ece686591 100644
--- a/lib/portage/emaint/modules/binhost/binhost.py
+++ b/lib/portage/emaint/modules/binhost/binhost.py
@@ -11,7 +11,6 @@ from portage.versions import _pkg_str
class BinhostHandler:
-
short_desc = "Generate a metadata index for binary packages"
@staticmethod
@@ -26,7 +25,6 @@ class BinhostHandler:
self._pkgindex = self._bintree._load_pkgindex()
def _need_update(self, cpv, data):
-
if "MD5" not in data:
return True
diff --git a/lib/portage/emaint/modules/config/config.py b/lib/portage/emaint/modules/config/config.py
index 8a4d66224..5239b139c 100644
--- a/lib/portage/emaint/modules/config/config.py
+++ b/lib/portage/emaint/modules/config/config.py
@@ -8,7 +8,6 @@ from portage.util import grabdict, writedict
class CleanConfig:
-
short_desc = "Discard any no longer installed configs from emerge's tracker list"
@staticmethod
diff --git a/lib/portage/emaint/modules/logs/logs.py b/lib/portage/emaint/modules/logs/logs.py
index 9bb99d530..fefbe6edb 100644
--- a/lib/portage/emaint/modules/logs/logs.py
+++ b/lib/portage/emaint/modules/logs/logs.py
@@ -15,7 +15,6 @@ ERROR_MESSAGES = {
class CleanLogs:
-
short_desc = "Clean PORTAGE_LOGDIR logs"
@staticmethod
diff --git a/lib/portage/emaint/modules/move/move.py b/lib/portage/emaint/modules/move/move.py
index a77c4a50f..5a56fca1d 100644
--- a/lib/portage/emaint/modules/move/move.py
+++ b/lib/portage/emaint/modules/move/move.py
@@ -177,7 +177,6 @@ class MoveHandler:
class MoveInstalled(MoveHandler):
-
short_desc = "Perform package move updates for installed packages"
@staticmethod
@@ -192,7 +191,6 @@ class MoveInstalled(MoveHandler):
class MoveBinary(MoveHandler):
-
short_desc = "Perform package move updates for binary packages"
@staticmethod
diff --git a/lib/portage/emaint/modules/resume/resume.py b/lib/portage/emaint/modules/resume/resume.py
index 418513334..0e3da3886 100644
--- a/lib/portage/emaint/modules/resume/resume.py
+++ b/lib/portage/emaint/modules/resume/resume.py
@@ -5,7 +5,6 @@ import portage
class CleanResume:
-
short_desc = "Discard emerge --resume merge lists"
@staticmethod
diff --git a/lib/portage/emaint/modules/sync/sync.py b/lib/portage/emaint/modules/sync/sync.py
index fe68ac995..49812b43f 100644
--- a/lib/portage/emaint/modules/sync/sync.py
+++ b/lib/portage/emaint/modules/sync/sync.py
@@ -30,7 +30,6 @@ warn = create_color_func("WARN")
class SyncRepos:
-
short_desc = "Check repos.conf settings and/or sync repositories"
@staticmethod
diff --git a/lib/portage/emaint/modules/world/world.py b/lib/portage/emaint/modules/world/world.py
index 4fd7bf8f4..57746bf3d 100644
--- a/lib/portage/emaint/modules/world/world.py
+++ b/lib/portage/emaint/modules/world/world.py
@@ -6,7 +6,6 @@ from portage import os
class WorldHandler:
-
short_desc = "Fix problems in the world file"
@staticmethod
diff --git a/lib/portage/getbinpkg.py b/lib/portage/getbinpkg.py
index 135cd1310..fca44f052 100644
--- a/lib/portage/getbinpkg.py
+++ b/lib/portage/getbinpkg.py
@@ -329,7 +329,6 @@ def make_http_request(conn, address, _params={}, headers={}, dest=None):
def match_in_array(array, prefix="", suffix="", match_both=1, allow_overlap=0):
-
warnings.warn(
"portage.getbinpkg.match_in_array() is deprecated",
DeprecationWarning,
@@ -490,7 +489,6 @@ def file_get(
URI should be in the form <proto>://[user[:pass]@]<site>[:port]<path>"""
if not fcmd:
-
warnings.warn(
"Use of portage.getbinpkg.file_get() without the fcmd "
"parameter is deprecated",
@@ -879,7 +877,6 @@ class PackageIndex:
inherited_keys=None,
translated_keys=None,
):
-
self._pkg_slot_dict = None
if allowed_pkg_keys:
self._pkg_slot_dict = slot_dict_class(allowed_pkg_keys)
diff --git a/lib/portage/gpkg.py b/lib/portage/gpkg.py
index 59339f685..7451c68c2 100644
--- a/lib/portage/gpkg.py
+++ b/lib/portage/gpkg.py
@@ -1076,7 +1076,6 @@ class gpkg:
container.extractfile(image_tarinfo),
self._get_decompression_cmd(image_comp),
) as image_tar:
-
with tarfile.open(mode="r|", fileobj=image_tar) as image:
try:
image_safe = tar_safe_extract(image, "image")
@@ -1273,7 +1272,6 @@ class gpkg:
with tarfile.open(
mode="w|", fileobj=metadata_writer, format=tarfile.USTAR_FORMAT
) as metadata_tar:
-
for m in metadata:
m_info = tarfile.TarInfo(os.path.join("metadata", m))
m_info.mtime = datetime.utcnow().timestamp()
diff --git a/lib/portage/locks.py b/lib/portage/locks.py
index 67d436ff0..539e81294 100644
--- a/lib/portage/locks.py
+++ b/lib/portage/locks.py
@@ -501,7 +501,6 @@ def _fstat_nlink(fd):
def unlockfile(mytuple):
-
# XXX: Compatability hack.
if len(mytuple) == 3:
lockfilename, myfd, unlinkfile = mytuple
diff --git a/lib/portage/mail.py b/lib/portage/mail.py
index c9afae1e6..20b139ad3 100644
--- a/lib/portage/mail.py
+++ b/lib/portage/mail.py
@@ -35,7 +35,6 @@ def TextMessage(_text):
def create_message(sender, recipient, subject, body, attachments=None):
-
from email.header import Header
from email.mime.base import MIMEBase as BaseMessage
from email.mime.multipart import MIMEMultipart as MultipartMessage
@@ -76,7 +75,6 @@ def create_message(sender, recipient, subject, body, attachments=None):
def send_mail(mysettings, message):
-
import smtplib
mymailhost = "localhost"
diff --git a/lib/portage/output.py b/lib/portage/output.py
index 64fbb97d1..880686992 100644
--- a/lib/portage/output.py
+++ b/lib/portage/output.py
@@ -969,7 +969,6 @@ def _init(config_root="/"):
class _LazyInitColorMap(portage.proxy.objectproxy.ObjectProxy):
-
__slots__ = ("_attr",)
def __init__(self, attr):
diff --git a/lib/portage/package/ebuild/_config/LicenseManager.py b/lib/portage/package/ebuild/_config/LicenseManager.py
index c28cc89bf..90f7742e3 100644
--- a/lib/portage/package/ebuild/_config/LicenseManager.py
+++ b/lib/portage/package/ebuild/_config/LicenseManager.py
@@ -15,7 +15,6 @@ from portage.package.ebuild._config.helper import ordered_by_atom_specificity
class LicenseManager:
def __init__(self, license_group_locations, abs_user_config, user_config=True):
-
self._accept_license_str = None
self._accept_license = None
self._license_groups = {}
diff --git a/lib/portage/package/ebuild/_ipc/ExitCommand.py b/lib/portage/package/ebuild/_ipc/ExitCommand.py
index be419e9b7..b7c970353 100644
--- a/lib/portage/package/ebuild/_ipc/ExitCommand.py
+++ b/lib/portage/package/ebuild/_ipc/ExitCommand.py
@@ -5,7 +5,6 @@ from portage.package.ebuild._ipc.IpcCommand import IpcCommand
class ExitCommand(IpcCommand):
-
__slots__ = (
"exitcode",
"reply_hook",
@@ -17,7 +16,6 @@ class ExitCommand(IpcCommand):
self.exitcode = None
def __call__(self, argv):
-
if self.exitcode is not None:
# Ignore all but the first call, since if die is called
# then we certainly want to honor that exitcode, even
diff --git a/lib/portage/package/ebuild/_ipc/IpcCommand.py b/lib/portage/package/ebuild/_ipc/IpcCommand.py
index 2c4b9d8be..763cdb30b 100644
--- a/lib/portage/package/ebuild/_ipc/IpcCommand.py
+++ b/lib/portage/package/ebuild/_ipc/IpcCommand.py
@@ -3,7 +3,6 @@
class IpcCommand:
-
__slots__ = ()
def __call__(self, argv):
diff --git a/lib/portage/package/ebuild/_ipc/QueryCommand.py b/lib/portage/package/ebuild/_ipc/QueryCommand.py
index 66463e194..71d608e43 100644
--- a/lib/portage/package/ebuild/_ipc/QueryCommand.py
+++ b/lib/portage/package/ebuild/_ipc/QueryCommand.py
@@ -15,7 +15,6 @@ from portage.versions import best
class QueryCommand(IpcCommand):
-
__slots__ = (
"phase",
"settings",
diff --git a/lib/portage/package/ebuild/_metadata_invalid.py b/lib/portage/package/ebuild/_metadata_invalid.py
index 426ad851f..607873cad 100644
--- a/lib/portage/package/ebuild/_metadata_invalid.py
+++ b/lib/portage/package/ebuild/_metadata_invalid.py
@@ -10,7 +10,6 @@ from portage.elog.messages import eerror
def eapi_invalid(self, cpv, repo_name, settings, eapi_var, eapi_parsed, eapi_lineno):
-
msg = []
msg.extend(
textwrap.wrap(
diff --git a/lib/portage/package/ebuild/_parallel_manifest/ManifestProcess.py b/lib/portage/package/ebuild/_parallel_manifest/ManifestProcess.py
index 68bb5dce3..467105e12 100644
--- a/lib/portage/package/ebuild/_parallel_manifest/ManifestProcess.py
+++ b/lib/portage/package/ebuild/_parallel_manifest/ManifestProcess.py
@@ -9,7 +9,6 @@ from portage.util._async.ForkProcess import ForkProcess
class ManifestProcess(ForkProcess):
-
__slots__ = ("cp", "distdir", "fetchlist_dict", "repo_config")
MODIFIED = 16
diff --git a/lib/portage/package/ebuild/_parallel_manifest/ManifestScheduler.py b/lib/portage/package/ebuild/_parallel_manifest/ManifestScheduler.py
index de5e92805..bace3c298 100644
--- a/lib/portage/package/ebuild/_parallel_manifest/ManifestScheduler.py
+++ b/lib/portage/package/ebuild/_parallel_manifest/ManifestScheduler.py
@@ -20,7 +20,6 @@ class ManifestScheduler(AsyncScheduler):
force_sign_key=None,
**kwargs
):
-
AsyncScheduler.__init__(self, **kwargs)
self._portdb = portdb
@@ -93,7 +92,6 @@ class ManifestScheduler(AsyncScheduler):
)
def _task_exit(self, task):
-
if task.returncode != os.EX_OK:
if not self._terminated_tasks:
portage.writemsg(
diff --git a/lib/portage/package/ebuild/_parallel_manifest/ManifestTask.py b/lib/portage/package/ebuild/_parallel_manifest/ManifestTask.py
index 76ed36b45..87aa46de5 100644
--- a/lib/portage/package/ebuild/_parallel_manifest/ManifestTask.py
+++ b/lib/portage/package/ebuild/_parallel_manifest/ManifestTask.py
@@ -21,7 +21,6 @@ from .ManifestProcess import ManifestProcess
class ManifestTask(CompositeTask):
-
__slots__ = (
"cp",
"distdir",
diff --git a/lib/portage/package/ebuild/config.py b/lib/portage/package/ebuild/config.py
index 9ed59eb74..91303d7ad 100644
--- a/lib/portage/package/ebuild/config.py
+++ b/lib/portage/package/ebuild/config.py
@@ -1102,7 +1102,6 @@ class config:
except OSError:
pass
else:
-
if portage.data._unprivileged_mode(eroot_or_parent, eroot_st):
unprivileged = True
@@ -1671,7 +1670,6 @@ class config:
self.regenerate()
class _lazy_vars:
-
__slots__ = ("built_use", "settings", "values")
def __init__(self, built_use, settings):
@@ -2795,10 +2793,8 @@ class config:
myflags = set()
for mykey, incremental_list in increment_lists.items():
-
myflags.clear()
for mysplit in incremental_list:
-
for x in mysplit:
if x == "-*":
# "-*" is a special "minus" var that means "unset all settings".
@@ -2898,7 +2894,6 @@ class config:
iuse = [x.lstrip("+-") for x in iuse.split()]
myflags = set()
for curdb in self.uvlist:
-
for k in use_expand_unprefixed:
v = curdb.get(k)
if v is None:
@@ -3154,7 +3149,6 @@ class config:
return ""
def _getitem(self, mykey):
-
if mykey in self._constant_keys:
# These two point to temporary values when
# portage plans to update itself.
diff --git a/lib/portage/package/ebuild/doebuild.py b/lib/portage/package/ebuild/doebuild.py
index f03b273ea..b72d61c7a 100644
--- a/lib/portage/package/ebuild/doebuild.py
+++ b/lib/portage/package/ebuild/doebuild.py
@@ -246,7 +246,6 @@ def _doebuild_spawn(phase, settings, actionmap=None, **kwargs):
def _spawn_phase(
phase, settings, actionmap=None, returnpid=False, logfile=None, **kwargs
):
-
if returnpid:
return _doebuild_spawn(
phase,
@@ -964,7 +963,6 @@ def doebuild(
return 1
if mf is not _doebuild_manifest_cache and not mf.allow_missing:
-
# Make sure that all of the ebuilds are
# actually listed in the Manifest.
for f in os.listdir(pkgdir):
@@ -1034,7 +1032,6 @@ def doebuild(
)
if mydo == "nofetch":
-
if returnpid:
writemsg(
"!!! doebuild: %s\n"
@@ -1047,7 +1044,6 @@ def doebuild(
)
if tree == "porttree":
-
if not returnpid:
# Validate dependency metadata here to ensure that ebuilds with
# invalid data are never installed via the ebuild command. Skip
@@ -1278,7 +1274,6 @@ def doebuild(
)
)
if need_distfiles:
-
src_uri = mysettings.configdict["pkg"].get("SRC_URI")
if src_uri is None:
(src_uri,) = mydbapi.aux_get(
@@ -1572,7 +1567,6 @@ def doebuild(
return retval
finally:
-
if builddir_lock is not None:
builddir_lock.scheduler.run_until_complete(builddir_lock.async_unlock())
if tmpdir:
@@ -1786,7 +1780,6 @@ def _spawn_actionmap(settings):
def _validate_deps(mysettings, myroot, mydo, mydbapi):
-
invalid_dep_exempt_phases = {"clean", "cleanrm", "help", "prerm", "postrm"}
all_keys = set(Package.metadata_keys)
all_keys.add("SRC_URI")
@@ -2136,7 +2129,6 @@ def spawnebuild(
fd_pipes=None,
returnpid=False,
):
-
if returnpid:
warnings.warn(
"portage.spawnebuild() called "
@@ -2668,7 +2660,6 @@ def _post_src_install_uid_fix(mysettings, out):
qa_desktop_file = re.compile(qa_desktop_file)
while True:
-
unicode_error = False
size = 0
counted_inodes = set()
@@ -2733,7 +2724,6 @@ def _post_src_install_uid_fix(mysettings, out):
is not None
)
):
-
desktop_validate = validate_desktop_entry(fpath)
if desktop_validate:
desktopfile_errors.extend(desktop_validate)
diff --git a/lib/portage/package/ebuild/fetch.py b/lib/portage/package/ebuild/fetch.py
index 46e44ed34..0d30cb88e 100644
--- a/lib/portage/package/ebuild/fetch.py
+++ b/lib/portage/package/ebuild/fetch.py
@@ -134,7 +134,6 @@ def _spawn_fetch(settings, args, **kwargs):
# wget pollute stderr (if portage detects a problem then it
# can send it's own message to stderr).
if "fd_pipes" not in kwargs:
-
kwargs["fd_pipes"] = {
0: portage._get_stdin().fileno(),
1: sys.__stdout__.fileno(),
@@ -1231,7 +1230,6 @@ def fetch(
if (size - mysize + vfs_stat.f_bsize) >= (
vfs_stat.f_bsize * vfs_stat.f_bavail
):
-
if (size - mysize + vfs_stat.f_bsize) >= (
vfs_stat.f_bsize * vfs_stat.f_bfree
):
@@ -1245,7 +1243,6 @@ def fetch(
has_space = False
if distdir_writable and use_locks:
-
lock_kwargs = {}
if fetchonly:
lock_kwargs["flags"] = os.O_NONBLOCK
@@ -1264,7 +1261,6 @@ def fetch(
continue
try:
if not listonly:
-
eout = EOutput()
eout.quiet = mysettings.get("PORTAGE_QUIET") == "1"
match, mystat = _check_distfile(
@@ -1748,7 +1744,6 @@ def fetch(
myret = -1
try:
-
myret = _spawn_fetch(mysettings, myfetch)
finally:
@@ -1791,7 +1786,6 @@ def fetch(
del e
fetched = 0
else:
-
if stat.S_ISDIR(mystat.st_mode):
# This can happen if FETCHCOMMAND erroneously
# contains wget's -P option where it should
diff --git a/lib/portage/package/ebuild/getmaskingstatus.py b/lib/portage/package/ebuild/getmaskingstatus.py
index 530e338e0..f4f3e91b3 100644
--- a/lib/portage/package/ebuild/getmaskingstatus.py
+++ b/lib/portage/package/ebuild/getmaskingstatus.py
@@ -12,7 +12,6 @@ from portage.versions import _pkg_str
class _UnmaskHint:
-
__slots__ = ("key", "value")
def __init__(self, key, value):
@@ -21,7 +20,6 @@ class _UnmaskHint:
class _MaskReason:
-
__slots__ = ("category", "message", "unmask_hint")
def __init__(self, category, message, unmask_hint=None):
@@ -43,7 +41,6 @@ def getmaskingstatus(mycpv, settings=None, portdb=None, myrepo=None):
def _getmaskingstatus(mycpv, settings, portdb, myrepo=None):
-
metadata = None
installed = False
if not isinstance(mycpv, str):
diff --git a/lib/portage/package/ebuild/prepare_build_dirs.py b/lib/portage/package/ebuild/prepare_build_dirs.py
index e39378109..9471179aa 100644
--- a/lib/portage/package/ebuild/prepare_build_dirs.py
+++ b/lib/portage/package/ebuild/prepare_build_dirs.py
@@ -174,7 +174,6 @@ def _adjust_perms_msg(settings, msg):
def _prepare_features_dirs(mysettings):
-
# Use default ABI libdir in accordance with bug #355283.
libdir = None
default_abi = mysettings.get("DEFAULT_ABI")
diff --git a/lib/portage/process.py b/lib/portage/process.py
index 6760f617c..94850b6e7 100644
--- a/lib/portage/process.py
+++ b/lib/portage/process.py
@@ -113,7 +113,6 @@ def sanitize_fds():
not be inherited by child processes.
"""
if _set_inheritable is not None:
-
whitelist = frozenset(
[
portage._get_stdin().fileno(),
@@ -502,7 +501,6 @@ def spawn(
# Otherwise we clean them up.
while mypids:
-
# Pull the last reader in the pipe chain. If all processes
# in the pipe are well behaved, it will die when the process
# it is reading from dies.
@@ -734,7 +732,6 @@ def _exec(
if errno_value == 0 and libc.unshare(unshare_flags) != 0:
errno_value = ctypes.get_errno()
if errno_value != 0:
-
involved_features = []
if unshare_ipc:
involved_features.append("ipc-sandbox")
@@ -1039,7 +1036,6 @@ def _setup_pipes(fd_pipes, close_fds=True, inheritable=None):
# explicitly requested for it to remain open by adding
# it to the keys of fd_pipes.
while reverse_map:
-
oldfd, newfds = reverse_map.popitem()
old_fdflags = None
@@ -1065,7 +1061,6 @@ def _setup_pipes(fd_pipes, close_fds=True, inheritable=None):
fcntl.fcntl(newfd, fcntl.F_SETFD, old_fdflags)
if _set_inheritable is not None:
-
inheritable_state = None
if not (old_fdflags is None or _FD_CLOEXEC is None):
inheritable_state = not bool(old_fdflags & _FD_CLOEXEC)
diff --git a/lib/portage/proxy/lazyimport.py b/lib/portage/proxy/lazyimport.py
index da0f98f9f..95716338a 100644
--- a/lib/portage/proxy/lazyimport.py
+++ b/lib/portage/proxy/lazyimport.py
@@ -89,7 +89,6 @@ def _unregister_module_proxy(name):
class _LazyImport(ObjectProxy):
-
__slots__ = ("_scope", "_alias", "_name", "_target")
def __init__(self, scope, alias, name):
@@ -116,7 +115,6 @@ class _LazyImport(ObjectProxy):
class _LazyImportFrom(_LazyImport):
-
__slots__ = ("_attr_name",)
def __init__(self, scope, name, attr_name, alias):
diff --git a/lib/portage/repository/config.py b/lib/portage/repository/config.py
index 5e6097eac..ace119bf4 100644
--- a/lib/portage/repository/config.py
+++ b/lib/portage/repository/config.py
@@ -760,7 +760,6 @@ class RepoConfigLoader:
prepos[repo.name] = repo
else:
-
if not portage._sync_mode:
writemsg(
_("!!! Invalid PORTDIR_OVERLAY (not a dir): '%s'\n") % ov,
@@ -1182,7 +1181,7 @@ class RepoConfigLoader:
def _check_locations(self):
"""Check if repositories location are correct and show a warning message if not"""
- for (name, r) in self.prepos.items():
+ for name, r in self.prepos.items():
if name != "DEFAULT":
if r.location is None:
writemsg(
diff --git a/lib/portage/sync/controller.py b/lib/portage/sync/controller.py
index 05ced1347..1cfbb24ba 100644
--- a/lib/portage/sync/controller.py
+++ b/lib/portage/sync/controller.py
@@ -364,7 +364,6 @@ class SyncManager:
if updatecache_flg and os.path.exists(
os.path.join(repo.location, "metadata", "md5-cache")
):
-
# Only update cache for repo.location since that's
# the only one that's been synced here.
action_metadata(
diff --git a/lib/portage/sync/modules/rsync/rsync.py b/lib/portage/sync/modules/rsync/rsync.py
index 5f2482ea1..aca51f253 100644
--- a/lib/portage/sync/modules/rsync/rsync.py
+++ b/lib/portage/sync/modules/rsync/rsync.py
@@ -272,7 +272,6 @@ class RsyncSync(NewBase):
)
if addrinfos:
-
AF_INET = socket.AF_INET
AF_INET6 = None
if socket.has_ipv6:
diff --git a/lib/portage/sync/modules/webrsync/webrsync.py b/lib/portage/sync/modules/webrsync/webrsync.py
index 183274b9c..18af5cfbb 100644
--- a/lib/portage/sync/modules/webrsync/webrsync.py
+++ b/lib/portage/sync/modules/webrsync/webrsync.py
@@ -66,7 +66,6 @@ class WebRsync(SyncBase):
if self.repo.module_specific_options.get(
"sync-webrsync-verify-signature", "false"
).lower() in ("true", "yes"):
-
if not self.repo.sync_openpgp_key_path:
writemsg_level(
"!!! sync-openpgp-key-path is not set\n",
diff --git a/lib/portage/tests/bin/test_filter_bash_env.py b/lib/portage/tests/bin/test_filter_bash_env.py
index 501420560..2b7e93565 100644
--- a/lib/portage/tests/bin/test_filter_bash_env.py
+++ b/lib/portage/tests/bin/test_filter_bash_env.py
@@ -12,7 +12,6 @@ from portage.tests import TestCase
class TestFilterBashEnv(TestCase):
def testTestFilterBashEnv(self):
-
test_cases = (
(
"RDEPEND BASH.* _EPATCH_ECLASS",
diff --git a/lib/portage/tests/dbapi/test_auxdb.py b/lib/portage/tests/dbapi/test_auxdb.py
index 5917762dc..f022e02ad 100644
--- a/lib/portage/tests/dbapi/test_auxdb.py
+++ b/lib/portage/tests/dbapi/test_auxdb.py
@@ -102,7 +102,6 @@ class AuxdbTestCase(TestCase):
async def _test_mod_async(
self, ebuilds, ebuild_inherited, eclass_defined_phases, eclass_depend, portdb
):
-
for cpv, metadata in ebuilds.items():
defined_phases, depend, eapi, inherited = await portdb.async_aux_get(
cpv, ["DEFINED_PHASES", "DEPEND", "EAPI", "INHERITED"]
diff --git a/lib/portage/tests/dbapi/test_portdb_cache.py b/lib/portage/tests/dbapi/test_portdb_cache.py
index 773b87e44..bda43643a 100644
--- a/lib/portage/tests/dbapi/test_portdb_cache.py
+++ b/lib/portage/tests/dbapi/test_portdb_cache.py
@@ -229,7 +229,6 @@ class PortdbCacheTestCase(TestCase):
stdout = subprocess.PIPE
for i, args in enumerate(test_commands):
-
if hasattr(args[0], "__call__"):
self.assertTrue(args[0](), f"callable at index {i} failed")
continue
diff --git a/lib/portage/tests/dep/testAtom.py b/lib/portage/tests/dep/testAtom.py
index 073680e9b..b7d8bee8b 100644
--- a/lib/portage/tests/dep/testAtom.py
+++ b/lib/portage/tests/dep/testAtom.py
@@ -8,7 +8,6 @@ from portage.exception import InvalidAtom
class TestAtom(TestCase):
def testAtom(self):
-
tests = (
(
"=sys-apps/portage-2.1-r1:0[doc,a=,!b=,c?,!d?,-e]",
diff --git a/lib/portage/tests/dep/testStandalone.py b/lib/portage/tests/dep/testStandalone.py
index 0140f1410..3b6cb12d7 100644
--- a/lib/portage/tests/dep/testStandalone.py
+++ b/lib/portage/tests/dep/testStandalone.py
@@ -10,7 +10,6 @@ class TestStandalone(TestCase):
"""Test some small functions portage.dep"""
def testCPVequal(self):
-
test_cases = (
("sys-apps/portage-2.1", "sys-apps/portage-2.1", True),
("sys-apps/portage-2.1", "sys-apps/portage-2.0", False),
diff --git a/lib/portage/tests/dep/test_dep_getcpv.py b/lib/portage/tests/dep/test_dep_getcpv.py
index c8e5d3231..a057b59be 100644
--- a/lib/portage/tests/dep/test_dep_getcpv.py
+++ b/lib/portage/tests/dep/test_dep_getcpv.py
@@ -10,7 +10,6 @@ class DepGetCPV(TestCase):
"""A simple testcase for isvalidatom"""
def testDepGetCPV(self):
-
prefix_ops = ["<", ">", "=", "~", "<=", ">=", "!=", "!<", "!>", "!~"]
bad_prefix_ops = [">~", "<~", "~>", "~<"]
diff --git a/lib/portage/tests/dep/test_dep_getrepo.py b/lib/portage/tests/dep/test_dep_getrepo.py
index 2acec6119..745a1d80c 100644
--- a/lib/portage/tests/dep/test_dep_getrepo.py
+++ b/lib/portage/tests/dep/test_dep_getrepo.py
@@ -9,7 +9,6 @@ class DepGetRepo(TestCase):
"""A simple testcase for isvalidatom"""
def testDepGetRepo(self):
-
repo_char = "::"
repos = ("a", "repo-name", "repo_name", "repo123", None)
cpvs = ["sys-apps/portage"]
diff --git a/lib/portage/tests/dep/test_dep_getslot.py b/lib/portage/tests/dep/test_dep_getslot.py
index 804d8880c..0a19822cd 100644
--- a/lib/portage/tests/dep/test_dep_getslot.py
+++ b/lib/portage/tests/dep/test_dep_getslot.py
@@ -10,7 +10,6 @@ class DepGetSlot(TestCase):
"""A simple testcase for isvalidatom"""
def testDepGetSlot(self):
-
slot_char = ":"
slots = ("a", "1.2", "1", "IloveVapier", None)
cpvs = ["sys-apps/portage"]
diff --git a/lib/portage/tests/dep/test_dep_getusedeps.py b/lib/portage/tests/dep/test_dep_getusedeps.py
index 804618a2b..02f654a81 100644
--- a/lib/portage/tests/dep/test_dep_getusedeps.py
+++ b/lib/portage/tests/dep/test_dep_getusedeps.py
@@ -12,7 +12,6 @@ class DepGetUseDeps(TestCase):
"""A simple testcase for dep_getusedeps"""
def testDepGetUseDeps(self):
-
for mycpv in test_cps:
for version in test_versions:
for slot in test_slots:
diff --git a/lib/portage/tests/dep/test_dnf_convert.py b/lib/portage/tests/dep/test_dnf_convert.py
index 434ee5aa0..1a1789592 100644
--- a/lib/portage/tests/dep/test_dnf_convert.py
+++ b/lib/portage/tests/dep/test_dnf_convert.py
@@ -8,7 +8,6 @@ from portage.dep._dnf import dnf_convert
class DNFConvertTestCase(TestCase):
def testDNFConvert(self):
-
test_cases = (
(
"|| ( A B ) || ( C D )",
diff --git a/lib/portage/tests/dep/test_get_operator.py b/lib/portage/tests/dep/test_get_operator.py
index 9cdf6196f..62fa2ad21 100644
--- a/lib/portage/tests/dep/test_get_operator.py
+++ b/lib/portage/tests/dep/test_get_operator.py
@@ -8,7 +8,6 @@ from portage.dep import get_operator
class GetOperator(TestCase):
def testGetOperator(self):
-
# get_operator does not validate operators
tests = [
("~", "~"),
diff --git a/lib/portage/tests/dep/test_isjustname.py b/lib/portage/tests/dep/test_isjustname.py
index 9c062f552..2b3828e00 100644
--- a/lib/portage/tests/dep/test_isjustname.py
+++ b/lib/portage/tests/dep/test_isjustname.py
@@ -8,7 +8,6 @@ from portage.dep import isjustname
class IsJustName(TestCase):
def testIsJustName(self):
-
cats = ("", "sys-apps/", "foo/", "virtual/")
pkgs = ("portage", "paludis", "pkgcore", "notARealPkg")
vers = ("", "-2.0-r3", "-1.0_pre2", "-3.1b")
diff --git a/lib/portage/tests/dep/test_isvalidatom.py b/lib/portage/tests/dep/test_isvalidatom.py
index adcf3d92f..34900dbbc 100644
--- a/lib/portage/tests/dep/test_isvalidatom.py
+++ b/lib/portage/tests/dep/test_isvalidatom.py
@@ -25,7 +25,6 @@ class IsValidAtomTestCase:
class IsValidAtom(TestCase):
def testIsValidAtom(self):
-
test_cases = (
IsValidAtomTestCase("sys-apps/portage", True),
IsValidAtomTestCase("=sys-apps/portage-2.1", True),
diff --git a/lib/portage/tests/dep/test_overlap_dnf.py b/lib/portage/tests/dep/test_overlap_dnf.py
index a468fab38..dfeded3b4 100644
--- a/lib/portage/tests/dep/test_overlap_dnf.py
+++ b/lib/portage/tests/dep/test_overlap_dnf.py
@@ -8,7 +8,6 @@ from portage.dep.dep_check import _overlap_dnf
class OverlapDNFTestCase(TestCase):
def testOverlapDNF(self):
-
test_cases = (
(
"|| ( cat/A cat/B ) cat/E || ( cat/C cat/D )",
diff --git a/lib/portage/tests/dep/test_paren_reduce.py b/lib/portage/tests/dep/test_paren_reduce.py
index b73ca6d2d..b8d780fbd 100644
--- a/lib/portage/tests/dep/test_paren_reduce.py
+++ b/lib/portage/tests/dep/test_paren_reduce.py
@@ -8,7 +8,6 @@ from portage.exception import InvalidDependString
class TestParenReduce(TestCase):
def testParenReduce(self):
-
test_cases = (
("A", ["A"]),
("( A )", ["A"]),
diff --git a/lib/portage/tests/dep/test_soname_atom_pickle.py b/lib/portage/tests/dep/test_soname_atom_pickle.py
index 086f82312..a7951755d 100644
--- a/lib/portage/tests/dep/test_soname_atom_pickle.py
+++ b/lib/portage/tests/dep/test_soname_atom_pickle.py
@@ -9,7 +9,6 @@ from portage.util.futures.executor.fork import ForkExecutor
class TestSonameAtomPickle(TestCase):
-
_ALL_PROVIDES = frozenset([SonameAtom("x86_64", "libc.so.6")])
def test_soname_atom_pickle(self):
diff --git a/lib/portage/tests/dep/test_use_reduce.py b/lib/portage/tests/dep/test_use_reduce.py
index c60e71d58..81b659a94 100644
--- a/lib/portage/tests/dep/test_use_reduce.py
+++ b/lib/portage/tests/dep/test_use_reduce.py
@@ -65,7 +65,6 @@ class UseReduce(TestCase):
return False
def testUseReduce(self):
-
EAPI_WITH_SRC_URI_ARROWS = "2"
EAPI_WITHOUT_SRC_URI_ARROWS = "0"
diff --git a/lib/portage/tests/ebuild/test_config.py b/lib/portage/tests/ebuild/test_config.py
index dcb058b35..743b30bfb 100644
--- a/lib/portage/tests/ebuild/test_config.py
+++ b/lib/portage/tests/ebuild/test_config.py
@@ -83,7 +83,6 @@ class ConfigTestCase(TestCase):
playground.cleanup()
def testLicenseManager(self):
-
user_config = {
"package.license": (
"dev-libs/* TEST",
@@ -195,7 +194,6 @@ class ConfigTestCase(TestCase):
playground.cleanup()
def testPackageMaskOrder(self):
-
ebuilds = {
"dev-libs/A-1": {},
"dev-libs/B-1": {},
@@ -262,7 +260,6 @@ class ConfigTestCase(TestCase):
playground.cleanup()
def testManifest(self):
-
distfiles = {
"B-2.tar.bz2": b"binary\0content",
"C-2.zip": b"binary\0content",
diff --git a/lib/portage/tests/ebuild/test_doebuild_fd_pipes.py b/lib/portage/tests/ebuild/test_doebuild_fd_pipes.py
index e0c75c872..536e8d864 100644
--- a/lib/portage/tests/ebuild/test_doebuild_fd_pipes.py
+++ b/lib/portage/tests/ebuild/test_doebuild_fd_pipes.py
@@ -13,7 +13,6 @@ from _emerge.PipeReader import PipeReader
class DoebuildProcess(ForkProcess):
-
__slots__ = ("doebuild_kwargs", "doebuild_pargs")
def _run(self):
@@ -125,7 +124,6 @@ class DoebuildFdPipesTestCase(TestCase):
"clean",
"merge",
):
-
pr, pw = os.pipe()
producer = DoebuildProcess(
diff --git a/lib/portage/tests/ebuild/test_doebuild_spawn.py b/lib/portage/tests/ebuild/test_doebuild_spawn.py
index d142ec41e..9fb2c7fdd 100644
--- a/lib/portage/tests/ebuild/test_doebuild_spawn.py
+++ b/lib/portage/tests/ebuild/test_doebuild_spawn.py
@@ -28,7 +28,6 @@ class DoebuildSpawnTestCase(TestCase):
"""
def testDoebuildSpawn(self):
-
ebuild_body = textwrap.dedent(
"""
pkg_nofetch() { : ; }
@@ -88,7 +87,6 @@ class DoebuildSpawnTestCase(TestCase):
scheduler = SchedulerInterface(global_event_loop())
for phase in ("_internal_test",):
-
# Test EbuildSpawnProcess by calling doebuild.spawn() with
# returnpid=False. This case is no longer used by portage
# internals since EbuildPhase is used instead and that passes
diff --git a/lib/portage/tests/ebuild/test_fetch.py b/lib/portage/tests/ebuild/test_fetch.py
index 045aab786..3be6ed9bd 100644
--- a/lib/portage/tests/ebuild/test_fetch.py
+++ b/lib/portage/tests/ebuild/test_fetch.py
@@ -36,7 +36,6 @@ from _emerge.Package import Package
class EbuildFetchTestCase(TestCase):
def testEbuildFetch(self):
-
user_config = {
"make.conf": ('GENTOO_MIRRORS="{scheme}://{host}:{port}"',),
}
@@ -71,7 +70,6 @@ class EbuildFetchTestCase(TestCase):
user_config_subst = user_config.copy()
for configname, configdata in user_config.items():
-
configdata_sub = []
for line in configdata:
configdata_sub.append(
diff --git a/lib/portage/tests/ebuild/test_ipc_daemon.py b/lib/portage/tests/ebuild/test_ipc_daemon.py
index 0ac3d3c32..d49691ccc 100644
--- a/lib/portage/tests/ebuild/test_ipc_daemon.py
+++ b/lib/portage/tests/ebuild/test_ipc_daemon.py
@@ -34,7 +34,6 @@ class SleepProcess(ForkProcess):
class IpcDaemonTestCase(TestCase):
-
_SCHEDULE_TIMEOUT = 40 # seconds
def testIpcDaemon(self):
diff --git a/lib/portage/tests/ebuild/test_shell_quote.py b/lib/portage/tests/ebuild/test_shell_quote.py
index 7c9cb6428..885ff34b9 100644
--- a/lib/portage/tests/ebuild/test_shell_quote.py
+++ b/lib/portage/tests/ebuild/test_shell_quote.py
@@ -101,6 +101,6 @@ class ShellQuoteTestCase(TestCase):
("?abcxyz?", '"?abcxyz?"'),
]
- for (data, expected_result) in test_data:
+ for data, expected_result in test_data:
result = _shell_quote(data)
self.assertEqual(result, expected_result)
diff --git a/lib/portage/tests/ebuild/test_use_expand_incremental.py b/lib/portage/tests/ebuild/test_use_expand_incremental.py
index b09a2ac72..a4d24425f 100644
--- a/lib/portage/tests/ebuild/test_use_expand_incremental.py
+++ b/lib/portage/tests/ebuild/test_use_expand_incremental.py
@@ -12,7 +12,6 @@ from portage.util import ensure_dirs
class UseExpandIncrementalTestCase(TestCase):
def testUseExpandIncremental(self):
-
profiles = (
(
"base",
diff --git a/lib/portage/tests/emerge/test_config_protect.py b/lib/portage/tests/emerge/test_config_protect.py
index 745f1e37f..399611ea1 100644
--- a/lib/portage/tests/emerge/test_config_protect.py
+++ b/lib/portage/tests/emerge/test_config_protect.py
@@ -262,7 +262,6 @@ src_install() {
stdout = subprocess.PIPE
for args in test_commands:
-
if hasattr(args, "__call__"):
args()
continue
diff --git a/lib/portage/tests/emerge/test_emerge_blocker_file_collision.py b/lib/portage/tests/emerge/test_emerge_blocker_file_collision.py
index 71f018fef..b160fe1c6 100644
--- a/lib/portage/tests/emerge/test_emerge_blocker_file_collision.py
+++ b/lib/portage/tests/emerge/test_emerge_blocker_file_collision.py
@@ -16,7 +16,6 @@ from portage.util import ensure_dirs
class BlockerFileCollisionEmergeTestCase(TestCase):
def testBlockerFileCollision(self):
-
debug = False
install_something = """
@@ -160,7 +159,6 @@ src_install() {
stdout = subprocess.PIPE
for i, args in enumerate(test_commands):
-
if hasattr(args[0], "__call__"):
self.assertTrue(args[0](), f"callable at index {i} failed")
continue
diff --git a/lib/portage/tests/emerge/test_emerge_slot_abi.py b/lib/portage/tests/emerge/test_emerge_slot_abi.py
index 4dde205eb..e38d0fcac 100644
--- a/lib/portage/tests/emerge/test_emerge_slot_abi.py
+++ b/lib/portage/tests/emerge/test_emerge_slot_abi.py
@@ -16,7 +16,6 @@ from portage.util import ensure_dirs
class SlotAbiEmergeTestCase(TestCase):
def testSlotAbiEmerge(self):
-
debug = False
ebuilds = {
@@ -162,7 +161,6 @@ class SlotAbiEmergeTestCase(TestCase):
stdout = subprocess.PIPE
for i, args in enumerate(test_commands):
-
if hasattr(args[0], "__call__"):
self.assertTrue(args[0](), f"callable at index {i} failed")
continue
diff --git a/lib/portage/tests/emerge/test_simple.py b/lib/portage/tests/emerge/test_simple.py
index 86200e35f..0e5333250 100644
--- a/lib/portage/tests/emerge/test_simple.py
+++ b/lib/portage/tests/emerge/test_simple.py
@@ -53,7 +53,6 @@ class SimpleEmergeTestCase(TestCase):
return True
def testSimple(self):
-
debug = False
install_something = """
@@ -250,7 +249,6 @@ call_has_and_best_version() {
)
async def _async_test_simple(self, playground, metadata_xml_files, loop):
-
debug = playground.debug
settings = playground.settings
eprefix = settings["EPREFIX"]
@@ -695,7 +693,6 @@ move dev-util/git dev-vcs/git
stdout = subprocess.PIPE
for args in test_commands:
-
if hasattr(args, "__call__"):
args()
continue
diff --git a/lib/portage/tests/env/config/test_PackageKeywordsFile.py b/lib/portage/tests/env/config/test_PackageKeywordsFile.py
index fb7e0d167..f1f541102 100644
--- a/lib/portage/tests/env/config/test_PackageKeywordsFile.py
+++ b/lib/portage/tests/env/config/test_PackageKeywordsFile.py
@@ -9,7 +9,6 @@ from tempfile import mkstemp
class PackageKeywordsFileTestCase(TestCase):
-
cpv = ["sys-apps/portage"]
keywords = ["~x86", "amd64", "-mips"]
diff --git a/lib/portage/tests/env/config/test_PackageUseFile.py b/lib/portage/tests/env/config/test_PackageUseFile.py
index 587ac7d04..d68397f64 100644
--- a/lib/portage/tests/env/config/test_PackageUseFile.py
+++ b/lib/portage/tests/env/config/test_PackageUseFile.py
@@ -9,7 +9,6 @@ from tempfile import mkstemp
class PackageUseFileTestCase(TestCase):
-
cpv = "sys-apps/portage"
useflags = ["cdrom", "far", "boo", "flag", "blat"]
diff --git a/lib/portage/tests/env/config/test_PortageModulesFile.py b/lib/portage/tests/env/config/test_PortageModulesFile.py
index 8033eac47..f9879df68 100644
--- a/lib/portage/tests/env/config/test_PortageModulesFile.py
+++ b/lib/portage/tests/env/config/test_PortageModulesFile.py
@@ -8,7 +8,6 @@ from tempfile import mkstemp
class PortageModulesFileTestCase(TestCase):
-
keys = ["foo.bar", "baz", "bob", "extra_key"]
invalid_keys = ["", ""]
modules = ["spanky", "zmedico", "antarus", "ricer", "5", "6"]
diff --git a/lib/portage/tests/glsa/test_security_set.py b/lib/portage/tests/glsa/test_security_set.py
index 0120e22f1..968e2bf2b 100644
--- a/lib/portage/tests/glsa/test_security_set.py
+++ b/lib/portage/tests/glsa/test_security_set.py
@@ -14,7 +14,6 @@ from portage.glsa import GlsaFormatException
class SecuritySetTestCase(TestCase):
-
glsa_template = """\
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/xsl/glsa.xsl" type="text/xsl"?>
diff --git a/lib/portage/tests/lazyimport/test_lazy_import_portage_baseline.py b/lib/portage/tests/lazyimport/test_lazy_import_portage_baseline.py
index 8cc248db9..a7cd93d4f 100644
--- a/lib/portage/tests/lazyimport/test_lazy_import_portage_baseline.py
+++ b/lib/portage/tests/lazyimport/test_lazy_import_portage_baseline.py
@@ -13,7 +13,6 @@ from _emerge.SpawnProcess import SpawnProcess
class LazyImportPortageBaselineTestCase(TestCase):
-
_module_re = re.compile(r"^(portage|_emerge)\.")
_baseline_imports = frozenset(
diff --git a/lib/portage/tests/process/test_PopenProcess.py b/lib/portage/tests/process/test_PopenProcess.py
index 0aa9ce171..164e57ff9 100644
--- a/lib/portage/tests/process/test_PopenProcess.py
+++ b/lib/portage/tests/process/test_PopenProcess.py
@@ -52,7 +52,6 @@ class PopenPipeTestCase(TestCase):
return consumer.getvalue().decode("ascii", "replace")
def _testPipeLogger(self, test_string):
-
producer = PopenProcess(
proc=subprocess.Popen(
["bash", "-c", self._echo_cmd % test_string],
@@ -64,7 +63,6 @@ class PopenPipeTestCase(TestCase):
fd, log_file_path = tempfile.mkstemp()
try:
-
consumer = PipeLogger(
background=True,
input_fd=producer.proc.stdout,
diff --git a/lib/portage/tests/process/test_PopenProcessBlockingIO.py b/lib/portage/tests/process/test_PopenProcessBlockingIO.py
index 5d29c8d0b..4409feae6 100644
--- a/lib/portage/tests/process/test_PopenProcessBlockingIO.py
+++ b/lib/portage/tests/process/test_PopenProcessBlockingIO.py
@@ -58,7 +58,6 @@ class PopenPipeBlockingIOTestCase(TestCase):
return consumer.getvalue().decode("ascii", "replace")
def testPopenPipeBlockingIO(self):
-
if threading is None:
skip_reason = "threading disabled"
self.portage_skip = "threading disabled"
diff --git a/lib/portage/tests/process/test_poll.py b/lib/portage/tests/process/test_poll.py
index e55dc3c9b..284dd168e 100644
--- a/lib/portage/tests/process/test_poll.py
+++ b/lib/portage/tests/process/test_poll.py
@@ -15,7 +15,6 @@ from _emerge.PipeReader import PipeReader
class PipeReaderTestCase(TestCase):
-
_use_array = False
_echo_cmd = "echo -n '%s'"
@@ -111,7 +110,6 @@ class PipeReaderTestCase(TestCase):
class PipeReaderArrayTestCase(PipeReaderTestCase):
-
_use_array = True
# sleep allows reliable triggering of the failure mode on fast computers
_echo_cmd = "sleep 0.1 ; echo -n '%s'"
diff --git a/lib/portage/tests/process/test_unshare_net.py b/lib/portage/tests/process/test_unshare_net.py
index 98bac69e0..6951faab6 100644
--- a/lib/portage/tests/process/test_unshare_net.py
+++ b/lib/portage/tests/process/test_unshare_net.py
@@ -22,7 +22,6 @@ ping -c 1 -W 1 fd::1 || exit 1
class UnshareNetTestCase(TestCase):
def testUnshareNet(self):
-
if platform.system() != "Linux":
self.skipTest("not Linux")
if portage.process.find_binary("ping") is None:
diff --git a/lib/portage/tests/resolver/ResolverPlayground.py b/lib/portage/tests/resolver/ResolverPlayground.py
index d96be8247..2b197ca6d 100644
--- a/lib/portage/tests/resolver/ResolverPlayground.py
+++ b/lib/portage/tests/resolver/ResolverPlayground.py
@@ -449,7 +449,6 @@ class ResolverPlayground:
def _create_profile(
self, ebuilds, eclasses, installed, profile, repo_configs, user_config, sets
):
-
user_config_dir = os.path.join(self.eroot, USER_CONFIG_PATH)
try:
@@ -678,7 +677,6 @@ class ResolverPlayground:
f.write(f"{atom}\n")
def _load_config(self):
-
create_trees_kwargs = {}
if self.target_root != os.sep:
create_trees_kwargs["target_root"] = self.target_root
@@ -728,7 +726,6 @@ class ResolverPlayground:
global_noiselimit = portage.util.noiselimit
global_emergelog_disable = _emerge.emergelog._disable
try:
-
if not self.debug:
portage.util.noiselimit = -2
_emerge.emergelog._disable = True
@@ -988,7 +985,6 @@ def _mergelist_str(x, depgraph):
class ResolverPlaygroundResult:
-
checks = (
"success",
"mergelist",
@@ -1105,7 +1101,6 @@ class ResolverPlaygroundResult:
class ResolverPlaygroundDepcleanResult:
-
checks = (
"success",
"cleanlist",
diff --git a/lib/portage/tests/resolver/binpkg_multi_instance/test_build_id_profile_format.py b/lib/portage/tests/resolver/binpkg_multi_instance/test_build_id_profile_format.py
index d1ecc078c..ccb1f5b8d 100644
--- a/lib/portage/tests/resolver/binpkg_multi_instance/test_build_id_profile_format.py
+++ b/lib/portage/tests/resolver/binpkg_multi_instance/test_build_id_profile_format.py
@@ -14,7 +14,6 @@ from portage.output import colorize
class BuildIdProfileFormatTestCase(TestCase):
def testBuildIdProfileFormat(self):
-
profile = {
"packages": ("=app-misc/A-1-2::test_repo",),
"package.mask": ("<app-misc/A-1::test_repo",),
diff --git a/lib/portage/tests/resolver/binpkg_multi_instance/test_rebuilt_binaries.py b/lib/portage/tests/resolver/binpkg_multi_instance/test_rebuilt_binaries.py
index 3c5d4f7a9..8ce10064f 100644
--- a/lib/portage/tests/resolver/binpkg_multi_instance/test_rebuilt_binaries.py
+++ b/lib/portage/tests/resolver/binpkg_multi_instance/test_rebuilt_binaries.py
@@ -14,7 +14,6 @@ from portage.output import colorize
class RebuiltBinariesCase(TestCase):
def testRebuiltBinaries(self):
-
user_config = {
"make.conf": ('FEATURES="binpkg-multi-instance"',),
}
diff --git a/lib/portage/tests/resolver/soname/test_autounmask.py b/lib/portage/tests/resolver/soname/test_autounmask.py
index d547ebcf5..42ecff31c 100644
--- a/lib/portage/tests/resolver/soname/test_autounmask.py
+++ b/lib/portage/tests/resolver/soname/test_autounmask.py
@@ -14,7 +14,6 @@ from portage.output import colorize
class SonameAutoUnmaskTestCase(TestCase):
def testSonameAutoUnmask(self):
-
binpkgs = {
"dev-libs/icu-49": {
"KEYWORDS": "x86",
diff --git a/lib/portage/tests/resolver/soname/test_depclean.py b/lib/portage/tests/resolver/soname/test_depclean.py
index 9cf1877a3..e85f4399d 100644
--- a/lib/portage/tests/resolver/soname/test_depclean.py
+++ b/lib/portage/tests/resolver/soname/test_depclean.py
@@ -10,7 +10,6 @@ from portage.tests.resolver.ResolverPlayground import (
class SonameDepcleanTestCase(TestCase):
def testSonameDepclean(self):
-
installed = {
"app-misc/A-1": {
"RDEPEND": "dev-libs/B",
diff --git a/lib/portage/tests/resolver/soname/test_downgrade.py b/lib/portage/tests/resolver/soname/test_downgrade.py
index da2d90305..13246b8dd 100644
--- a/lib/portage/tests/resolver/soname/test_downgrade.py
+++ b/lib/portage/tests/resolver/soname/test_downgrade.py
@@ -14,7 +14,6 @@ from portage.output import colorize
class SonameDowngradeTestCase(TestCase):
def testSingleSlot(self):
-
ebuilds = {
"dev-libs/icu-49": {},
"dev-libs/icu-4.8": {},
@@ -154,7 +153,6 @@ class SonameDowngradeTestCase(TestCase):
playground.cleanup()
def testTwoSlots(self):
-
ebuilds = {
"dev-libs/glib-1.2.10": {"SLOT": "1"},
"dev-libs/glib-2.30.2": {"SLOT": "2"},
diff --git a/lib/portage/tests/resolver/soname/test_or_choices.py b/lib/portage/tests/resolver/soname/test_or_choices.py
index 66b02a1b7..31b8ca94d 100644
--- a/lib/portage/tests/resolver/soname/test_or_choices.py
+++ b/lib/portage/tests/resolver/soname/test_or_choices.py
@@ -14,7 +14,6 @@ from portage.output import colorize
class SonameOrChoicesTestCase(TestCase):
def testSonameConflictMissedUpdate(self):
-
binpkgs = {
"dev-lang/ocaml-4.02.1": {
"EAPI": "5",
diff --git a/lib/portage/tests/resolver/soname/test_reinstall.py b/lib/portage/tests/resolver/soname/test_reinstall.py
index f548d619a..1637561c4 100644
--- a/lib/portage/tests/resolver/soname/test_reinstall.py
+++ b/lib/portage/tests/resolver/soname/test_reinstall.py
@@ -14,7 +14,6 @@ from portage.output import colorize
class SonameReinstallTestCase(TestCase):
def testSonameReinstall(self):
-
binpkgs = {
"app-misc/A-1": {
"RDEPEND": "dev-libs/B",
diff --git a/lib/portage/tests/resolver/soname/test_skip_update.py b/lib/portage/tests/resolver/soname/test_skip_update.py
index 8b2505e64..510020fda 100644
--- a/lib/portage/tests/resolver/soname/test_skip_update.py
+++ b/lib/portage/tests/resolver/soname/test_skip_update.py
@@ -14,7 +14,6 @@ from portage.output import colorize
class SonameSkipUpdateTestCase(TestCase):
def testSonameSkipUpdate(self):
-
binpkgs = {
"app-misc/A-1": {
"RDEPEND": "dev-libs/B",
diff --git a/lib/portage/tests/resolver/soname/test_slot_conflict_reinstall.py b/lib/portage/tests/resolver/soname/test_slot_conflict_reinstall.py
index c44bfb0bb..8d1faa0be 100644
--- a/lib/portage/tests/resolver/soname/test_slot_conflict_reinstall.py
+++ b/lib/portage/tests/resolver/soname/test_slot_conflict_reinstall.py
@@ -14,7 +14,6 @@ from portage.output import colorize
class SonameSlotConflictReinstallTestCase(TestCase):
def testSonameSlotConflictReinstall(self):
-
binpkgs = {
"app-misc/A-1": {
"PROVIDES": "x86_32: libA-1.so",
diff --git a/lib/portage/tests/resolver/soname/test_slot_conflict_update.py b/lib/portage/tests/resolver/soname/test_slot_conflict_update.py
index 07874b422..dcedfdc10 100644
--- a/lib/portage/tests/resolver/soname/test_slot_conflict_update.py
+++ b/lib/portage/tests/resolver/soname/test_slot_conflict_update.py
@@ -14,7 +14,6 @@ from portage.output import colorize
class SonameSlotConflictUpdateTestCase(TestCase):
def testSonameSlotConflictUpdate(self):
-
binpkgs = {
"app-text/podofo-0.9.2": {
"RDEPEND": "dev-util/boost-build",
diff --git a/lib/portage/tests/resolver/soname/test_soname_provided.py b/lib/portage/tests/resolver/soname/test_soname_provided.py
index 0ac605ce6..e266fff3e 100644
--- a/lib/portage/tests/resolver/soname/test_soname_provided.py
+++ b/lib/portage/tests/resolver/soname/test_soname_provided.py
@@ -14,7 +14,6 @@ from portage.output import colorize
class SonameProvidedTestCase(TestCase):
def testSonameProvided(self):
-
binpkgs = {
"app-misc/A-1": {
"EAPI": "5",
diff --git a/lib/portage/tests/resolver/soname/test_unsatisfiable.py b/lib/portage/tests/resolver/soname/test_unsatisfiable.py
index d66129324..1f47ca460 100644
--- a/lib/portage/tests/resolver/soname/test_unsatisfiable.py
+++ b/lib/portage/tests/resolver/soname/test_unsatisfiable.py
@@ -14,7 +14,6 @@ from portage.output import colorize
class SonameUnsatisfiableTestCase(TestCase):
def testSonameUnsatisfiable(self):
-
binpkgs = {
"app-misc/A-1": {
"EAPI": "5",
diff --git a/lib/portage/tests/resolver/soname/test_unsatisfied.py b/lib/portage/tests/resolver/soname/test_unsatisfied.py
index 172a22a7d..cf266c45a 100644
--- a/lib/portage/tests/resolver/soname/test_unsatisfied.py
+++ b/lib/portage/tests/resolver/soname/test_unsatisfied.py
@@ -14,7 +14,6 @@ from portage.output import colorize
class SonameUnsatisfiedTestCase(TestCase):
def testSonameUnsatisfied(self):
-
binpkgs = {
"app-misc/A-1": {
"EAPI": "5",
diff --git a/lib/portage/tests/resolver/test_aggressive_backtrack_downgrade.py b/lib/portage/tests/resolver/test_aggressive_backtrack_downgrade.py
index 5300d1b44..c0f5cda04 100644
--- a/lib/portage/tests/resolver/test_aggressive_backtrack_downgrade.py
+++ b/lib/portage/tests/resolver/test_aggressive_backtrack_downgrade.py
@@ -10,7 +10,6 @@ from portage.tests.resolver.ResolverPlayground import (
class AgressiveBacktrackDowngradeTestCase(TestCase):
def testAgressiveBacktrackDowngrade(self):
-
ebuilds = {
"www-client/firefox-69.0": {
"EAPI": "7",
diff --git a/lib/portage/tests/resolver/test_autounmask.py b/lib/portage/tests/resolver/test_autounmask.py
index 077d147d3..f3eb72fa1 100644
--- a/lib/portage/tests/resolver/test_autounmask.py
+++ b/lib/portage/tests/resolver/test_autounmask.py
@@ -10,7 +10,6 @@ from portage.tests.resolver.ResolverPlayground import (
class AutounmaskTestCase(TestCase):
def testAutounmask(self):
-
ebuilds = {
# ebuilds to test use changes
"dev-libs/A-1": {"SLOT": 1, "DEPEND": "dev-libs/B[foo]", "EAPI": 2},
@@ -451,7 +450,6 @@ class AutounmaskTestCase(TestCase):
playground.cleanup()
def testAutounmaskForLicenses(self):
-
ebuilds = {
"dev-libs/A-1": {"LICENSE": "TEST"},
"dev-libs/B-1": {"LICENSE": "TEST", "IUSE": "foo", "KEYWORDS": "~x86"},
@@ -546,7 +544,6 @@ class AutounmaskTestCase(TestCase):
playground.cleanup()
def testAutounmaskAndSets(self):
-
ebuilds = {
# ebuilds to test use changes
"dev-libs/A-1": {},
@@ -663,7 +660,6 @@ class AutounmaskTestCase(TestCase):
playground.cleanup()
def testAutounmask9999(self):
-
ebuilds = {
"dev-libs/A-1": {},
"dev-libs/A-2": {},
diff --git a/lib/portage/tests/resolver/test_autounmask_multilib_use.py b/lib/portage/tests/resolver/test_autounmask_multilib_use.py
index 6a76b0d9e..b25318343 100644
--- a/lib/portage/tests/resolver/test_autounmask_multilib_use.py
+++ b/lib/portage/tests/resolver/test_autounmask_multilib_use.py
@@ -10,7 +10,6 @@ from portage.tests.resolver.ResolverPlayground import (
class AutounmaskMultilibUseTestCase(TestCase):
def testAutounmaskMultilibUse(self):
-
self.todo = True
ebuilds = {
diff --git a/lib/portage/tests/resolver/test_autounmask_parent.py b/lib/portage/tests/resolver/test_autounmask_parent.py
index fefaaad7d..0f1d5423b 100644
--- a/lib/portage/tests/resolver/test_autounmask_parent.py
+++ b/lib/portage/tests/resolver/test_autounmask_parent.py
@@ -10,7 +10,6 @@ from portage.tests.resolver.ResolverPlayground import (
class AutounmaskParentTestCase(TestCase):
def testAutounmaskParentUse(self):
-
ebuilds = {
"dev-libs/B-1": {
"EAPI": "5",
diff --git a/lib/portage/tests/resolver/test_autounmask_use_breakage.py b/lib/portage/tests/resolver/test_autounmask_use_breakage.py
index 02c08affa..bbdac22b6 100644
--- a/lib/portage/tests/resolver/test_autounmask_use_breakage.py
+++ b/lib/portage/tests/resolver/test_autounmask_use_breakage.py
@@ -10,7 +10,6 @@ from portage.tests.resolver.ResolverPlayground import (
class AutounmaskUseBreakageTestCase(TestCase):
def testAutounmaskUseBreakage(self):
-
ebuilds = {
"app-misc/A-0": {
"EAPI": "5",
diff --git a/lib/portage/tests/resolver/test_bdeps.py b/lib/portage/tests/resolver/test_bdeps.py
index ee98c6d7e..35098457f 100644
--- a/lib/portage/tests/resolver/test_bdeps.py
+++ b/lib/portage/tests/resolver/test_bdeps.py
@@ -14,7 +14,6 @@ from portage.output import colorize
class BdepsTestCase(TestCase):
def testImageMagickUpdate(self):
-
ebuilds = {
"app-misc/A-1": {
"EAPI": "6",
diff --git a/lib/portage/tests/resolver/test_binary_pkg_ebuild_visibility.py b/lib/portage/tests/resolver/test_binary_pkg_ebuild_visibility.py
index 93f0c3f3f..ed7f4e4f9 100644
--- a/lib/portage/tests/resolver/test_binary_pkg_ebuild_visibility.py
+++ b/lib/portage/tests/resolver/test_binary_pkg_ebuild_visibility.py
@@ -14,7 +14,6 @@ from portage.output import colorize
class BinaryPkgEbuildVisibilityTestCase(TestCase):
def testBinaryPkgEbuildVisibility(self):
-
binpkgs = {
"app-misc/foo-3": {},
"app-misc/foo-2": {},
diff --git a/lib/portage/tests/resolver/test_changed_deps.py b/lib/portage/tests/resolver/test_changed_deps.py
index 6d7941326..a14f3d704 100644
--- a/lib/portage/tests/resolver/test_changed_deps.py
+++ b/lib/portage/tests/resolver/test_changed_deps.py
@@ -14,7 +14,6 @@ from portage.output import colorize
class ChangedDepsTestCase(TestCase):
def testChangedDeps(self):
-
ebuilds = {
"app-misc/A-0": {
"DEPEND": "app-misc/B",
diff --git a/lib/portage/tests/resolver/test_circular_choices.py b/lib/portage/tests/resolver/test_circular_choices.py
index 34a666d56..e25792341 100644
--- a/lib/portage/tests/resolver/test_circular_choices.py
+++ b/lib/portage/tests/resolver/test_circular_choices.py
@@ -10,7 +10,6 @@ from portage.tests.resolver.ResolverPlayground import (
class CircularJsoncppCmakeBootstrapTestCase(TestCase):
def testCircularJsoncppCmakeBootstrapOrDeps(self):
-
ebuilds = {
"dev-libs/jsoncpp-1.9.2": {
"EAPI": "7",
@@ -80,7 +79,6 @@ class CircularJsoncppCmakeBootstrapTestCase(TestCase):
playground.cleanup()
def testVirtualCmakeBootstrapUseConditional(self):
-
ebuilds = {
"dev-libs/jsoncpp-1.9.2": {"EAPI": "7", "BDEPEND": "virtual/cmake"},
"dev-util/cmake-bootstrap-3.16.2": {
@@ -122,7 +120,6 @@ class CircularJsoncppCmakeBootstrapTestCase(TestCase):
class CircularChoicesTestCase(TestCase):
def testDirectCircularDependency(self):
-
ebuilds = {
"dev-lang/gwydion-dylan-2.4.0": {
"DEPEND": "|| ( dev-lang/gwydion-dylan dev-lang/gwydion-dylan-bin )"
@@ -153,7 +150,6 @@ class CircularChoicesTestCase(TestCase):
class VirtualCircularChoicesTestCase(TestCase):
def testDirectVirtualCircularDependency(self):
-
ebuilds = {
"dev-java/icedtea-6.1.10.3": {"SLOT": "6", "DEPEND": "virtual/jdk"},
"dev-java/icedtea6-bin-1.10.3": {},
@@ -187,7 +183,6 @@ class VirtualCircularChoicesTestCase(TestCase):
class CircularPypyExeTestCase(TestCase):
def testCircularPypyExe(self):
-
ebuilds = {
"dev-python/pypy-7.3.0": {
"EAPI": "7",
diff --git a/lib/portage/tests/resolver/test_circular_choices_rust.py b/lib/portage/tests/resolver/test_circular_choices_rust.py
index 50c6e24f7..c984bd5a0 100644
--- a/lib/portage/tests/resolver/test_circular_choices_rust.py
+++ b/lib/portage/tests/resolver/test_circular_choices_rust.py
@@ -10,7 +10,6 @@ from portage.tests.resolver.ResolverPlayground import (
class CircularRustTestCase(TestCase):
def testCircularPypyExe(self):
-
ebuilds = {
"dev-lang/rust-1.47.0-r2": {
"EAPI": "7",
diff --git a/lib/portage/tests/resolver/test_circular_dependencies.py b/lib/portage/tests/resolver/test_circular_dependencies.py
index ac4c9a6f9..739721080 100644
--- a/lib/portage/tests/resolver/test_circular_dependencies.py
+++ b/lib/portage/tests/resolver/test_circular_dependencies.py
@@ -9,7 +9,6 @@ from portage.tests.resolver.ResolverPlayground import (
class CircularDependencyTestCase(TestCase):
-
# TODO:
# use config change by autounmask
# conflict on parent's parent
@@ -19,7 +18,6 @@ class CircularDependencyTestCase(TestCase):
# play with REQUIRED_USE
def testCircularDependency(self):
-
ebuilds = {
"dev-libs/Z-1": {
"DEPEND": "foo? ( !bar? ( dev-libs/Y ) )",
diff --git a/lib/portage/tests/resolver/test_complete_if_new_subslot_without_revbump.py b/lib/portage/tests/resolver/test_complete_if_new_subslot_without_revbump.py
index 54d28f7c9..4bdea55ac 100644
--- a/lib/portage/tests/resolver/test_complete_if_new_subslot_without_revbump.py
+++ b/lib/portage/tests/resolver/test_complete_if_new_subslot_without_revbump.py
@@ -14,7 +14,6 @@ from portage.output import colorize
class CompeteIfNewSubSlotWithoutRevBumpTestCase(TestCase):
def testCompeteIfNewSubSlotWithoutRevBump(self):
-
ebuilds = {
"media-libs/libpng-1.5.14": {"EAPI": "5", "SLOT": "0"},
"x11-libs/gdk-pixbuf-2.26.5": {
diff --git a/lib/portage/tests/resolver/test_depclean.py b/lib/portage/tests/resolver/test_depclean.py
index 8ff65551d..01dae5f37 100644
--- a/lib/portage/tests/resolver/test_depclean.py
+++ b/lib/portage/tests/resolver/test_depclean.py
@@ -172,7 +172,6 @@ class DepcleanInstalledKeywordMaskedSlotTestCase(TestCase):
class DepcleanWithExcludeTestCase(TestCase):
def testDepcleanWithExclude(self):
-
installed = {
"dev-libs/A-1": {},
"dev-libs/B-1": {"RDEPEND": "dev-libs/A"},
@@ -224,7 +223,6 @@ class DepcleanWithExcludeTestCase(TestCase):
class DepcleanWithExcludeAndSlotsTestCase(TestCase):
def testDepcleanWithExcludeAndSlots(self):
-
installed = {
"dev-libs/Z-1": {"SLOT": 1},
"dev-libs/Z-2": {"SLOT": 2},
@@ -267,7 +265,6 @@ class DepcleanWithExcludeAndSlotsTestCase(TestCase):
class DepcleanAndWildcardsTestCase(TestCase):
def testDepcleanAndWildcards(self):
-
installed = {
"dev-libs/A-1": {"RDEPEND": "dev-libs/B"},
"dev-libs/B-1": {},
diff --git a/lib/portage/tests/resolver/test_depclean_order.py b/lib/portage/tests/resolver/test_depclean_order.py
index a8c334304..08dd249e1 100644
--- a/lib/portage/tests/resolver/test_depclean_order.py
+++ b/lib/portage/tests/resolver/test_depclean_order.py
@@ -10,7 +10,6 @@ from portage.tests.resolver.ResolverPlayground import (
class SimpleDepcleanTestCase(TestCase):
def testSimpleDepclean(self):
-
ebuilds = {
"dev-libs/A-1": {
"EAPI": "5",
diff --git a/lib/portage/tests/resolver/test_depth.py b/lib/portage/tests/resolver/test_depth.py
index d166147a8..9c5289f7d 100644
--- a/lib/portage/tests/resolver/test_depth.py
+++ b/lib/portage/tests/resolver/test_depth.py
@@ -10,7 +10,6 @@ from portage.tests.resolver.ResolverPlayground import (
class ResolverDepthTestCase(TestCase):
def testResolverDepth(self):
-
profile = {
"package.mask": (
# Mask an installed package (for which an update is
diff --git a/lib/portage/tests/resolver/test_eapi.py b/lib/portage/tests/resolver/test_eapi.py
index 908e12f90..1d6c58633 100644
--- a/lib/portage/tests/resolver/test_eapi.py
+++ b/lib/portage/tests/resolver/test_eapi.py
@@ -10,7 +10,6 @@ from portage.tests.resolver.ResolverPlayground import (
class EAPITestCase(TestCase):
def testEAPI(self):
-
ebuilds = {
# EAPI-1: IUSE-defaults
"dev-libs/A-1.0": {"EAPI": 0, "IUSE": "+foo"},
diff --git a/lib/portage/tests/resolver/test_imagemagick_graphicsmagick.py b/lib/portage/tests/resolver/test_imagemagick_graphicsmagick.py
index 86a9cf460..bcff03b44 100644
--- a/lib/portage/tests/resolver/test_imagemagick_graphicsmagick.py
+++ b/lib/portage/tests/resolver/test_imagemagick_graphicsmagick.py
@@ -10,7 +10,6 @@ from portage.tests.resolver.ResolverPlayground import (
class ImageMagickGraphicsMagickTestCase(TestCase):
def testImageMagickUpdate(self):
-
ebuilds = {
"media-gfx/imagemagick-6.9.7.0": {
"EAPI": "6",
diff --git a/lib/portage/tests/resolver/test_or_choices.py b/lib/portage/tests/resolver/test_or_choices.py
index 922670517..9e2c0980b 100644
--- a/lib/portage/tests/resolver/test_or_choices.py
+++ b/lib/portage/tests/resolver/test_or_choices.py
@@ -75,7 +75,6 @@ class OrChoicesTestCase(TestCase):
playground.cleanup()
def testInitiallyUnsatisfied(self):
-
ebuilds = {
"app-misc/A-1": {"EAPI": "5", "SLOT": "0/1"},
"app-misc/A-2": {"EAPI": "5", "SLOT": "0/2"},
@@ -113,7 +112,6 @@ class OrChoicesTestCase(TestCase):
playground.cleanup()
def testUseMask(self):
-
profile = {
"use.mask": ("abi_ppc_32",),
}
@@ -151,7 +149,6 @@ class OrChoicesTestCase(TestCase):
playground.cleanup()
def testConflictMissedUpdate(self):
-
ebuilds = {
"dev-lang/ocaml-4.02.1": {
"EAPI": "5",
diff --git a/lib/portage/tests/resolver/test_package_tracker.py b/lib/portage/tests/resolver/test_package_tracker.py
index 93578a596..2789af5d9 100644
--- a/lib/portage/tests/resolver/test_package_tracker.py
+++ b/lib/portage/tests/resolver/test_package_tracker.py
@@ -9,7 +9,6 @@ from _emerge.resolver.package_tracker import PackageTracker, PackageTrackerDbapi
class PackageTrackerTestCase(TestCase):
-
FakePackage = collections.namedtuple(
"FakePackage", ["root", "cp", "cpv", "slot", "slot_atom", "version", "repo"]
)
diff --git a/lib/portage/tests/resolver/test_profile_default_eapi.py b/lib/portage/tests/resolver/test_profile_default_eapi.py
index f09c5e810..e3dfec47e 100644
--- a/lib/portage/tests/resolver/test_profile_default_eapi.py
+++ b/lib/portage/tests/resolver/test_profile_default_eapi.py
@@ -12,7 +12,6 @@ from portage.util import ensure_dirs
class ProfileDefaultEAPITestCase(TestCase):
def testProfileDefaultEAPI(self):
-
repo_configs = {
"test_repo": {
"layout.conf": (
diff --git a/lib/portage/tests/resolver/test_profile_package_set.py b/lib/portage/tests/resolver/test_profile_package_set.py
index 725e0808f..5f184f08d 100644
--- a/lib/portage/tests/resolver/test_profile_package_set.py
+++ b/lib/portage/tests/resolver/test_profile_package_set.py
@@ -13,7 +13,6 @@ from portage.util import ensure_dirs
class ProfilePackageSetTestCase(TestCase):
def testProfilePackageSet(self):
-
repo_configs = {
"test_repo": {
"layout.conf": ("profile-formats = profile-set",),
diff --git a/lib/portage/tests/resolver/test_regular_slot_change_without_revbump.py b/lib/portage/tests/resolver/test_regular_slot_change_without_revbump.py
index 0456e28d3..8cde38a9e 100644
--- a/lib/portage/tests/resolver/test_regular_slot_change_without_revbump.py
+++ b/lib/portage/tests/resolver/test_regular_slot_change_without_revbump.py
@@ -14,7 +14,6 @@ from portage.output import colorize
class RegularSlotChangeWithoutRevBumpTestCase(TestCase):
def testRegularSlotChangeWithoutRevBumpTestCase(self):
-
ebuilds = {
"dev-libs/boost-1.52.0": {"SLOT": "0"},
"app-office/libreoffice-4.0.0.2": {
diff --git a/lib/portage/tests/resolver/test_required_use.py b/lib/portage/tests/resolver/test_required_use.py
index 06ab64e9f..79dd0de82 100644
--- a/lib/portage/tests/resolver/test_required_use.py
+++ b/lib/portage/tests/resolver/test_required_use.py
@@ -301,7 +301,6 @@ class RequiredUSETestCase(TestCase):
playground.cleanup()
def testRequiredUseOrDeps(self):
-
ebuilds = {
"dev-libs/A-1": {
"IUSE": "+x +y",
diff --git a/lib/portage/tests/resolver/test_slot_change_without_revbump.py b/lib/portage/tests/resolver/test_slot_change_without_revbump.py
index 037550e1a..8b2f043a7 100644
--- a/lib/portage/tests/resolver/test_slot_change_without_revbump.py
+++ b/lib/portage/tests/resolver/test_slot_change_without_revbump.py
@@ -14,7 +14,6 @@ from portage.output import colorize
class SlotChangeWithoutRevBumpTestCase(TestCase):
def testSlotChangeWithoutRevBump(self):
-
ebuilds = {
"app-arch/libarchive-3.1.1": {"EAPI": "5", "SLOT": "0/13"},
"app-arch/libarchive-3.0.4-r1": {"EAPI": "5", "SLOT": "0"},
diff --git a/lib/portage/tests/resolver/test_slot_collisions.py b/lib/portage/tests/resolver/test_slot_collisions.py
index dd8b98243..47fa8dc1d 100644
--- a/lib/portage/tests/resolver/test_slot_collisions.py
+++ b/lib/portage/tests/resolver/test_slot_collisions.py
@@ -10,7 +10,6 @@ from portage.tests.resolver.ResolverPlayground import (
class SlotCollisionTestCase(TestCase):
def testSlotCollision(self):
-
ebuilds = {
"dev-libs/A-1": {"PDEPEND": "foo? ( dev-libs/B )", "IUSE": "foo"},
"dev-libs/B-1": {"IUSE": "foo"},
diff --git a/lib/portage/tests/resolver/test_slot_conflict_force_rebuild.py b/lib/portage/tests/resolver/test_slot_conflict_force_rebuild.py
index 52683f18e..bc3bae35e 100644
--- a/lib/portage/tests/resolver/test_slot_conflict_force_rebuild.py
+++ b/lib/portage/tests/resolver/test_slot_conflict_force_rebuild.py
@@ -10,7 +10,6 @@ from portage.tests.resolver.ResolverPlayground import (
class SlotConflictForceRebuildTestCase(TestCase):
def testSlotConflictForceRebuild(self):
-
ebuilds = {
"app-misc/A-1": {"EAPI": "5", "SLOT": "0/1"},
"app-misc/A-2": {"EAPI": "5", "SLOT": "0/2"},
diff --git a/lib/portage/tests/resolver/test_slot_conflict_rebuild.py b/lib/portage/tests/resolver/test_slot_conflict_rebuild.py
index 52f4aa184..d1f3b9a88 100644
--- a/lib/portage/tests/resolver/test_slot_conflict_rebuild.py
+++ b/lib/portage/tests/resolver/test_slot_conflict_rebuild.py
@@ -10,7 +10,6 @@ from portage.tests.resolver.ResolverPlayground import (
class SlotConflictRebuildTestCase(TestCase):
def testSlotConflictRebuild(self):
-
ebuilds = {
"app-misc/A-1": {"EAPI": "5", "SLOT": "0/1"},
"app-misc/A-2": {"EAPI": "5", "SLOT": "0/2"},
@@ -392,7 +391,6 @@ class SlotConflictRebuildTestCase(TestCase):
playground.cleanup()
def testSlotConflictRebuildGolang(self):
-
ebuilds = {
"dev-lang/go-1.14.7": {"EAPI": "7", "SLOT": "0/1.14.7"},
"dev-lang/go-1.15": {"EAPI": "7", "SLOT": "0/1.15"},
diff --git a/lib/portage/tests/resolver/test_slot_conflict_unsatisfied_deep_deps.py b/lib/portage/tests/resolver/test_slot_conflict_unsatisfied_deep_deps.py
index b392aaded..233a9bbf4 100644
--- a/lib/portage/tests/resolver/test_slot_conflict_unsatisfied_deep_deps.py
+++ b/lib/portage/tests/resolver/test_slot_conflict_unsatisfied_deep_deps.py
@@ -10,7 +10,6 @@ from portage.tests.resolver.ResolverPlayground import (
class SlotConflictUnsatisfiedDeepDepsTestCase(TestCase):
def testSlotConflictUnsatisfiedDeepDeps(self):
-
ebuilds = {
"dev-libs/A-1": {},
"dev-libs/A-2": {"KEYWORDS": "~x86"},
diff --git a/lib/portage/tests/resolver/test_slot_conflict_update.py b/lib/portage/tests/resolver/test_slot_conflict_update.py
index 79df55250..4bdd40416 100644
--- a/lib/portage/tests/resolver/test_slot_conflict_update.py
+++ b/lib/portage/tests/resolver/test_slot_conflict_update.py
@@ -10,7 +10,6 @@ from portage.tests.resolver.ResolverPlayground import (
class SlotConflictUpdateTestCase(TestCase):
def testSlotConflictUpdate(self):
-
ebuilds = {
"app-text/podofo-0.9.2": {"EAPI": "5", "RDEPEND": "dev-util/boost-build"},
"dev-cpp/libcmis-0.3.1": {"EAPI": "5", "RDEPEND": "dev-libs/boost:="},
diff --git a/lib/portage/tests/resolver/test_slot_conflict_update_virt.py b/lib/portage/tests/resolver/test_slot_conflict_update_virt.py
index 85d9db471..c88fccddb 100644
--- a/lib/portage/tests/resolver/test_slot_conflict_update_virt.py
+++ b/lib/portage/tests/resolver/test_slot_conflict_update_virt.py
@@ -10,7 +10,6 @@ from portage.tests.resolver.ResolverPlayground import (
class SlotConflictUpdateVirtTestCase(TestCase):
def testSlotConflictUpdateVirt(self):
-
ebuilds = {
"dev-db/mysql-connector-c-6.1.11-r2": {"EAPI": "7", "SLOT": "0/18"},
"dev-db/mysql-connector-c-8.0.17-r3": {"EAPI": "7", "SLOT": "0/21"},
diff --git a/lib/portage/tests/resolver/test_slot_operator_complete_graph.py b/lib/portage/tests/resolver/test_slot_operator_complete_graph.py
index f0b3050d9..498891cd7 100644
--- a/lib/portage/tests/resolver/test_slot_operator_complete_graph.py
+++ b/lib/portage/tests/resolver/test_slot_operator_complete_graph.py
@@ -10,7 +10,6 @@ from portage.tests.resolver.ResolverPlayground import (
class SlotOperatorCompleteGraphTestCase(TestCase):
def testSlotOperatorCompleteGraph(self):
-
ebuilds = {
"app-misc/meta-pkg-2": {
"EAPI": "6",
diff --git a/lib/portage/tests/resolver/test_slot_operator_exclusive_slots.py b/lib/portage/tests/resolver/test_slot_operator_exclusive_slots.py
index f3b7cca12..923e0f788 100644
--- a/lib/portage/tests/resolver/test_slot_operator_exclusive_slots.py
+++ b/lib/portage/tests/resolver/test_slot_operator_exclusive_slots.py
@@ -10,7 +10,6 @@ from portage.tests.resolver.ResolverPlayground import (
class SlotOperatorExclusiveSlotsTestCase(TestCase):
def testSlotOperatorExclusiveSlots(self):
-
ebuilds = {
"media-libs/mesa-17.0.1": {
"EAPI": "6",
diff --git a/lib/portage/tests/resolver/test_slot_operator_missed_update.py b/lib/portage/tests/resolver/test_slot_operator_missed_update.py
index 945fa8ea7..a45ebccc9 100644
--- a/lib/portage/tests/resolver/test_slot_operator_missed_update.py
+++ b/lib/portage/tests/resolver/test_slot_operator_missed_update.py
@@ -10,7 +10,6 @@ from portage.tests.resolver.ResolverPlayground import (
class BacktrackMissedUpdateTestCase(TestCase):
def testBacktrackMissedUpdateTestCase(self):
-
ebuilds = {
"dev-lang/python-2.7.18-r2": {
"EAPI": "7",
diff --git a/lib/portage/tests/resolver/test_slot_operator_rebuild.py b/lib/portage/tests/resolver/test_slot_operator_rebuild.py
index 4e9543747..b0a8641ae 100644
--- a/lib/portage/tests/resolver/test_slot_operator_rebuild.py
+++ b/lib/portage/tests/resolver/test_slot_operator_rebuild.py
@@ -14,7 +14,6 @@ from portage.output import colorize
class SlotOperatorRebuildTestCase(TestCase):
def testSlotOperatorRebuild(self):
-
ebuilds = {
"app-misc/A-1": {"EAPI": "5", "SLOT": "0/1"},
"app-misc/A-2": {"EAPI": "5", "SLOT": "0/2"},
diff --git a/lib/portage/tests/resolver/test_slot_operator_required_use.py b/lib/portage/tests/resolver/test_slot_operator_required_use.py
index b4fa200ee..6ccd00bc0 100644
--- a/lib/portage/tests/resolver/test_slot_operator_required_use.py
+++ b/lib/portage/tests/resolver/test_slot_operator_required_use.py
@@ -10,7 +10,6 @@ from portage.tests.resolver.ResolverPlayground import (
class SlotOperatorRequiredUseTestCase(TestCase):
def testSlotOperatorRequiredUse(self):
-
ebuilds = {
"app-misc/A-1": {"EAPI": "5", "SLOT": "0/1"},
"app-misc/A-2": {"EAPI": "5", "SLOT": "0/2"},
diff --git a/lib/portage/tests/resolver/test_slot_operator_reverse_deps.py b/lib/portage/tests/resolver/test_slot_operator_reverse_deps.py
index cfa1a1334..012fd7692 100644
--- a/lib/portage/tests/resolver/test_slot_operator_reverse_deps.py
+++ b/lib/portage/tests/resolver/test_slot_operator_reverse_deps.py
@@ -10,7 +10,6 @@ from portage.tests.resolver.ResolverPlayground import (
class SlotOperatorReverseDepsTestCase(TestCase):
def testSlotOperatorReverseDeps(self):
-
ebuilds = {
"media-libs/mesa-11.2.2": {
"EAPI": "6",
diff --git a/lib/portage/tests/resolver/test_slot_operator_runtime_pkg_mask.py b/lib/portage/tests/resolver/test_slot_operator_runtime_pkg_mask.py
index 07cc56318..5af3ff3f4 100644
--- a/lib/portage/tests/resolver/test_slot_operator_runtime_pkg_mask.py
+++ b/lib/portage/tests/resolver/test_slot_operator_runtime_pkg_mask.py
@@ -10,7 +10,6 @@ from portage.tests.resolver.ResolverPlayground import (
class SlotOperatorRuntimePkgMaskTestCase(TestCase):
def testSlotOperatorRuntimePkgMask(self):
-
ebuilds = {
"app-misc/meta-pkg-2": {
"EAPI": "6",
diff --git a/lib/portage/tests/resolver/test_slot_operator_unsatisfied.py b/lib/portage/tests/resolver/test_slot_operator_unsatisfied.py
index ea1f09099..d7a4b7e06 100644
--- a/lib/portage/tests/resolver/test_slot_operator_unsatisfied.py
+++ b/lib/portage/tests/resolver/test_slot_operator_unsatisfied.py
@@ -10,7 +10,6 @@ from portage.tests.resolver.ResolverPlayground import (
class SlotOperatorUnsatisfiedTestCase(TestCase):
def testSlotOperatorUnsatisfied(self):
-
ebuilds = {
"app-misc/A-1": {"EAPI": "5", "SLOT": "0/1"},
"app-misc/A-2": {"EAPI": "5", "SLOT": "0/2"},
diff --git a/lib/portage/tests/resolver/test_slot_operator_update_probe_parent_downgrade.py b/lib/portage/tests/resolver/test_slot_operator_update_probe_parent_downgrade.py
index 26da01a68..975814df3 100644
--- a/lib/portage/tests/resolver/test_slot_operator_update_probe_parent_downgrade.py
+++ b/lib/portage/tests/resolver/test_slot_operator_update_probe_parent_downgrade.py
@@ -10,7 +10,6 @@ from portage.tests.resolver.ResolverPlayground import (
class SlotOperatorUpdateProbeParentDowngradeTestCase(TestCase):
def testSlotOperatorUpdateProbeParentDowngrade(self):
-
ebuilds = {
"net-nds/openldap-2.4.40-r3": {
"EAPI": "5",
diff --git a/lib/portage/tests/resolver/test_solve_non_slot_operator_slot_conflicts.py b/lib/portage/tests/resolver/test_solve_non_slot_operator_slot_conflicts.py
index 8307e49ab..9bd548d19 100644
--- a/lib/portage/tests/resolver/test_solve_non_slot_operator_slot_conflicts.py
+++ b/lib/portage/tests/resolver/test_solve_non_slot_operator_slot_conflicts.py
@@ -10,7 +10,6 @@ from portage.tests.resolver.ResolverPlayground import (
class SolveNonSlotOperatorSlotConflictsTestCase(TestCase):
def testSolveNonSlotOperatorSlotConflicts(self):
-
ebuilds = {
"app-misc/A-1": {"EAPI": "5", "SLOT": "0/1", "PDEPEND": "app-misc/B"},
"app-misc/A-2": {"EAPI": "5", "SLOT": "0/2", "PDEPEND": "app-misc/B"},
diff --git a/lib/portage/tests/resolver/test_use_dep_defaults.py b/lib/portage/tests/resolver/test_use_dep_defaults.py
index 67907c3b9..845bb02b1 100644
--- a/lib/portage/tests/resolver/test_use_dep_defaults.py
+++ b/lib/portage/tests/resolver/test_use_dep_defaults.py
@@ -10,7 +10,6 @@ from portage.tests.resolver.ResolverPlayground import (
class UseDepDefaultsTestCase(TestCase):
def testUseDepDefaultse(self):
-
ebuilds = {
"dev-libs/A-1": {
"DEPEND": "dev-libs/B[foo]",
diff --git a/lib/portage/tests/resolver/test_virtual_slot.py b/lib/portage/tests/resolver/test_virtual_slot.py
index d55518fa7..19dc254dd 100644
--- a/lib/portage/tests/resolver/test_virtual_slot.py
+++ b/lib/portage/tests/resolver/test_virtual_slot.py
@@ -10,7 +10,6 @@ from portage.tests.resolver.ResolverPlayground import (
class VirtualSlotResolverTestCase(TestCase):
def testLicenseMaskedVirtualSlotUpdate(self):
-
ebuilds = {
"dev-java/oracle-jdk-bin-1.7.0": {"SLOT": "1.7", "LICENSE": "TEST"},
"dev-java/sun-jdk-1.6.0": {"SLOT": "1.6", "LICENSE": "TEST"},
@@ -60,7 +59,6 @@ class VirtualSlotResolverTestCase(TestCase):
playground.cleanup()
def testVirtualSlotUpdate(self):
-
ebuilds = {
"dev-java/oracle-jdk-bin-1.7.0": {"SLOT": "1.7", "LICENSE": "TEST"},
"dev-java/sun-jdk-1.6.0": {"SLOT": "1.6", "LICENSE": "TEST"},
@@ -118,7 +116,6 @@ class VirtualSlotResolverTestCase(TestCase):
playground.cleanup()
def testVirtualSubslotUpdate(self):
-
ebuilds = {
"virtual/pypy-2.3.1": {
"EAPI": "5",
@@ -190,7 +187,6 @@ class VirtualSlotResolverTestCase(TestCase):
playground.cleanup()
def testVirtualSlotDepclean(self):
-
ebuilds = {
"dev-java/oracle-jdk-bin-1.7.0": {"SLOT": "1.7", "LICENSE": "TEST"},
"dev-java/sun-jdk-1.6.0": {"SLOT": "1.6", "LICENSE": "TEST"},
diff --git a/lib/portage/tests/sets/shell/testShell.py b/lib/portage/tests/sets/shell/testShell.py
index 01c4831cd..f30b72a8b 100644
--- a/lib/portage/tests/sets/shell/testShell.py
+++ b/lib/portage/tests/sets/shell/testShell.py
@@ -17,7 +17,6 @@ class CommandOutputSetTestCase(TestCase):
pass
def testCommand(self):
-
params = set(test_cps)
command = find_binary("bash")
command += " -c '"
diff --git a/lib/portage/tests/sync/test_sync_local.py b/lib/portage/tests/sync/test_sync_local.py
index bb8c976b5..c400c9bba 100644
--- a/lib/portage/tests/sync/test_sync_local.py
+++ b/lib/portage/tests/sync/test_sync_local.py
@@ -458,7 +458,6 @@ class SyncLocalTestCase(TestCase):
+ sync_cmds
+ mercurial_tests
):
-
if hasattr(cmd, "__call__"):
cmd()
continue
diff --git a/lib/portage/tests/unicode/test_string_format.py b/lib/portage/tests/unicode/test_string_format.py
index 528717408..949b01558 100644
--- a/lib/portage/tests/unicode/test_string_format.py
+++ b/lib/portage/tests/unicode/test_string_format.py
@@ -21,7 +21,6 @@ class StringFormatTestCase(TestCase):
)
def testDependencyArg(self):
-
self.assertEqual(_encodings["content"], "utf_8")
for arg_unicode in self.unicode_strings:
@@ -36,7 +35,6 @@ class StringFormatTestCase(TestCase):
self.assertEqual(formatted_str, arg_unicode)
def testPortageException(self):
-
self.assertEqual(_encodings["content"], "utf_8")
for arg_unicode in self.unicode_strings:
@@ -51,7 +49,6 @@ class StringFormatTestCase(TestCase):
self.assertEqual(formatted_str, arg_unicode)
def testUseFlagDisplay(self):
-
self.assertEqual(_encodings["content"], "utf_8")
for enabled in (True, False):
diff --git a/lib/portage/tests/update/test_move_ent.py b/lib/portage/tests/update/test_move_ent.py
index 31b1ff4ea..562d7b107 100644
--- a/lib/portage/tests/update/test_move_ent.py
+++ b/lib/portage/tests/update/test_move_ent.py
@@ -16,7 +16,6 @@ from portage.output import colorize
class MoveEntTestCase(TestCase):
def testMoveEnt(self):
-
ebuilds = {
"dev-libs/A-2::dont_apply_updates": {
"EAPI": "4",
diff --git a/lib/portage/tests/update/test_move_slot_ent.py b/lib/portage/tests/update/test_move_slot_ent.py
index a66497d37..88d9802cf 100644
--- a/lib/portage/tests/update/test_move_slot_ent.py
+++ b/lib/portage/tests/update/test_move_slot_ent.py
@@ -16,7 +16,6 @@ from portage.output import colorize
class MoveSlotEntTestCase(TestCase):
def testMoveSlotEnt(self):
-
ebuilds = {
"dev-libs/A-2::dont_apply_updates": {
"EAPI": "5",
diff --git a/lib/portage/tests/update/test_update_dbentry.py b/lib/portage/tests/update/test_update_dbentry.py
index ae9d0d66b..a473cd937 100644
--- a/lib/portage/tests/update/test_update_dbentry.py
+++ b/lib/portage/tests/update/test_update_dbentry.py
@@ -163,7 +163,6 @@ class UpdateDbentryTestCase(TestCase):
self.assertEqual(result, output_str)
def testUpdateDbentryDbapiTestCase(self):
-
ebuilds = {
"dev-libs/A-2::dont_apply_updates": {
"RDEPEND": "dev-libs/M dev-libs/N dev-libs/P",
diff --git a/lib/portage/tests/util/eventloop/test_call_soon_fifo.py b/lib/portage/tests/util/eventloop/test_call_soon_fifo.py
index 9e715559a..f1bd2b545 100644
--- a/lib/portage/tests/util/eventloop/test_call_soon_fifo.py
+++ b/lib/portage/tests/util/eventloop/test_call_soon_fifo.py
@@ -10,7 +10,6 @@ from portage.util._eventloop.global_event_loop import global_event_loop
class CallSoonFifoTestCase(TestCase):
def testCallSoonFifo(self):
-
event_loop = global_event_loop()
inputs = [random.random() for index in range(10)]
outputs = []
diff --git a/lib/portage/tests/util/file_copy/test_copyfile.py b/lib/portage/tests/util/file_copy/test_copyfile.py
index 68e689792..55bdeec66 100644
--- a/lib/portage/tests/util/file_copy/test_copyfile.py
+++ b/lib/portage/tests/util/file_copy/test_copyfile.py
@@ -12,7 +12,6 @@ from portage.util.file_copy import copyfile
class CopyFileTestCase(TestCase):
def testCopyFile(self):
-
tempdir = tempfile.mkdtemp()
try:
src_path = os.path.join(tempdir, "src")
@@ -31,7 +30,6 @@ class CopyFileTestCase(TestCase):
class CopyFileSparseTestCase(TestCase):
def testCopyFileSparse(self):
-
tempdir = tempfile.mkdtemp()
try:
src_path = os.path.join(tempdir, "src")
diff --git a/lib/portage/tests/util/futures/asyncio/test_child_watcher.py b/lib/portage/tests/util/futures/asyncio/test_child_watcher.py
index fc536c92c..cd100598b 100644
--- a/lib/portage/tests/util/futures/asyncio/test_child_watcher.py
+++ b/lib/portage/tests/util/futures/asyncio/test_child_watcher.py
@@ -37,7 +37,6 @@ class ChildWatcherTestCase(TestCase):
future.set_result((pid, returncode, args))
async def watch_pid():
-
with asyncio.get_child_watcher() as watcher:
pids = spawn([true_binary], returnpid=True)
watcher.add_child_handler(pids[0], callback, *args_tuple)
diff --git a/lib/portage/tests/util/futures/asyncio/test_subprocess_exec.py b/lib/portage/tests/util/futures/asyncio/test_subprocess_exec.py
index d9fcd8a5a..607a1f741 100644
--- a/lib/portage/tests/util/futures/asyncio/test_subprocess_exec.py
+++ b/lib/portage/tests/util/futures/asyncio/test_subprocess_exec.py
@@ -35,7 +35,6 @@ class SubprocessExecTestCase(TestCase):
def test(loop):
async def test_coroutine():
-
proc = await create_subprocess_exec(
echo_binary,
*args_tuple,
@@ -110,7 +109,6 @@ class SubprocessExecTestCase(TestCase):
echo_binary = echo_binary.encode()
def test(loop):
-
pr, pw = os.pipe()
cat_proc = loop.run_until_complete(
diff --git a/lib/portage/tests/util/futures/test_compat_coroutine.py b/lib/portage/tests/util/futures/test_compat_coroutine.py
index f5ae34397..b25708886 100644
--- a/lib/portage/tests/util/futures/test_compat_coroutine.py
+++ b/lib/portage/tests/util/futures/test_compat_coroutine.py
@@ -129,7 +129,6 @@ class CompatCoroutineTestCase(TestCase):
def test_method_coroutine(self):
class Cubby:
-
_empty = object()
def __init__(self, loop):
diff --git a/lib/portage/tests/util/futures/test_done_callback.py b/lib/portage/tests/util/futures/test_done_callback.py
index 40c9ae95c..395256932 100644
--- a/lib/portage/tests/util/futures/test_done_callback.py
+++ b/lib/portage/tests/util/futures/test_done_callback.py
@@ -7,7 +7,6 @@ from portage.util._eventloop.global_event_loop import global_event_loop
class FutureDoneCallbackTestCase(TestCase):
def testFutureDoneCallback(self):
-
event_loop = global_event_loop()
def done_callback(finished):
diff --git a/lib/portage/tests/util/futures/test_iter_completed.py b/lib/portage/tests/util/futures/test_iter_completed.py
index 4b0241c61..8955546ee 100644
--- a/lib/portage/tests/util/futures/test_iter_completed.py
+++ b/lib/portage/tests/util/futures/test_iter_completed.py
@@ -29,7 +29,6 @@ class SleepProcess(ForkProcess):
class IterCompletedTestCase(TestCase):
def testIterCompleted(self):
-
# Mark this as todo, since we don't want to fail if heavy system
# load causes the tasks to finish in an unexpected order.
self.todo = True
@@ -57,7 +56,6 @@ class IterCompletedTestCase(TestCase):
self.assertEqual(seconds, future.result())
def testAsyncCancel(self):
-
loop = global_event_loop()
input_futures = set()
future_count = 3
diff --git a/lib/portage/tests/util/test_file_copier.py b/lib/portage/tests/util/test_file_copier.py
index d2109e1f5..62db37001 100644
--- a/lib/portage/tests/util/test_file_copier.py
+++ b/lib/portage/tests/util/test_file_copier.py
@@ -17,7 +17,6 @@ class FileCopierTestCase(TestCase):
loop = global_event_loop()
tempdir = tempfile.mkdtemp()
try:
-
# regular successful copy
src_path = os.path.join(tempdir, "src")
dest_path = os.path.join(tempdir, "dest")
diff --git a/lib/portage/tests/util/test_normalizedPath.py b/lib/portage/tests/util/test_normalizedPath.py
index 6609e5756..563294050 100644
--- a/lib/portage/tests/util/test_normalizedPath.py
+++ b/lib/portage/tests/util/test_normalizedPath.py
@@ -7,7 +7,6 @@ from portage.tests import TestCase
class NormalizePathTestCase(TestCase):
def testNormalizePath(self):
-
from portage.util import normalize_path
path = "///foo/bar/baz"
diff --git a/lib/portage/tests/util/test_shelve.py b/lib/portage/tests/util/test_shelve.py
index b68e9a043..1e532db77 100644
--- a/lib/portage/tests/util/test_shelve.py
+++ b/lib/portage/tests/util/test_shelve.py
@@ -12,7 +12,6 @@ from portage.util.shelve import dump, open_shelve, restore
class ShelveUtilsTestCase(TestCase):
-
TEST_DATA = (
# distfiles_db
{
diff --git a/lib/portage/tests/util/test_socks5.py b/lib/portage/tests/util/test_socks5.py
index fcbc1f6b5..987b41af2 100644
--- a/lib/portage/tests/util/test_socks5.py
+++ b/lib/portage/tests/util/test_socks5.py
@@ -177,7 +177,6 @@ class Socks5ServerTestCase(TestCase):
return f.read()
def test_socks5_proxy(self):
-
loop = global_event_loop()
host = "127.0.0.1"
@@ -188,7 +187,6 @@ class Socks5ServerTestCase(TestCase):
try:
with AsyncHTTPServer(host, {path: content}, loop) as server:
-
settings = {
"PORTAGE_TMPDIR": tempdir,
"PORTAGE_BIN_PATH": PORTAGE_BIN_PATH,
diff --git a/lib/portage/tests/util/test_stackDicts.py b/lib/portage/tests/util/test_stackDicts.py
index fda5d5844..98d2fadfd 100644
--- a/lib/portage/tests/util/test_stackDicts.py
+++ b/lib/portage/tests/util/test_stackDicts.py
@@ -8,7 +8,6 @@ from portage.util import stack_dicts
class StackDictsTestCase(TestCase):
def testStackDictsPass(self):
-
tests = [
([{"a": "b"}, {"b": "c"}], {"a": "b", "b": "c"}, False, [], False),
([{"a": "b"}, {"a": "c"}], {"a": "b c"}, True, [], False),
@@ -22,7 +21,6 @@ class StackDictsTestCase(TestCase):
self.assertEqual(result, test[1])
def testStackDictsFail(self):
-
tests = [
([None, {}], None, False, [], True),
([{"a": "b"}, {"a": "c"}], {"a": "b c"}, False, [], False),
diff --git a/lib/portage/tests/util/test_stackLists.py b/lib/portage/tests/util/test_stackLists.py
index 288685d09..1457c828c 100644
--- a/lib/portage/tests/util/test_stackLists.py
+++ b/lib/portage/tests/util/test_stackLists.py
@@ -8,7 +8,6 @@ from portage.util import stack_lists
class StackListsTestCase(TestCase):
def testStackLists(self):
-
tests = [
([["a", "b", "c"], ["d", "e", "f"]], ["a", "c", "b", "e", "d", "f"], False),
([["a", "x"], ["b", "x"]], ["a", "x", "b"], False),
diff --git a/lib/portage/tests/util/test_varExpand.py b/lib/portage/tests/util/test_varExpand.py
index 94b656acc..5d68a75af 100644
--- a/lib/portage/tests/util/test_varExpand.py
+++ b/lib/portage/tests/util/test_varExpand.py
@@ -8,7 +8,6 @@ from portage.util import varexpand
class VarExpandTestCase(TestCase):
def testVarExpandPass(self):
-
varDict = {"a": "5", "b": "7", "c": "-5"}
for key in varDict:
result = varexpand(f"${key}", varDict)
@@ -60,7 +59,6 @@ class VarExpandTestCase(TestCase):
)
def testVarExpandDoubleQuotes(self):
-
varDict = {"a": "5"}
tests = [('"${a}"', '"5"')]
for test in tests:
@@ -71,7 +69,6 @@ class VarExpandTestCase(TestCase):
)
def testVarExpandSingleQuotes(self):
-
varDict = {"a": "5"}
tests = [("'${a}'", "'${a}'")]
for test in tests:
@@ -82,7 +79,6 @@ class VarExpandTestCase(TestCase):
)
def testVarExpandFail(self):
-
varDict = {"a": "5", "b": "7", "c": "15"}
testVars = ["fail"]
diff --git a/lib/portage/tests/versions/test_cpv_sort_key.py b/lib/portage/tests/versions/test_cpv_sort_key.py
index f0995b1cb..7271f2e3e 100644
--- a/lib/portage/tests/versions/test_cpv_sort_key.py
+++ b/lib/portage/tests/versions/test_cpv_sort_key.py
@@ -7,7 +7,6 @@ from portage.versions import cpv_sort_key
class CpvSortKeyTestCase(TestCase):
def testCpvSortKey(self):
-
tests = [
(
("a/b-2_alpha", "a", "b", "a/b-2", "a/a-1", "a/b-1"),
diff --git a/lib/portage/tests/versions/test_vercmp.py b/lib/portage/tests/versions/test_vercmp.py
index 45777efd9..6aaf1fa5f 100644
--- a/lib/portage/tests/versions/test_vercmp.py
+++ b/lib/portage/tests/versions/test_vercmp.py
@@ -10,7 +10,6 @@ class VerCmpTestCase(TestCase):
"""A simple testCase for portage.versions.vercmp()"""
def testVerCmpGreater(self):
-
tests = [
("6.0", "5.0"),
("5.0", "5"),
@@ -61,7 +60,6 @@ class VerCmpTestCase(TestCase):
)
def testVerCmpEqual(self):
-
tests = [
("4.0", "4.0"),
("1.0", "1.0"),
@@ -77,7 +75,6 @@ class VerCmpTestCase(TestCase):
)
def testVerNotEqual(self):
-
tests = [
("1", "2"),
("1.0_alpha", "1.0_pre"),
diff --git a/lib/portage/tests/xpak/test_decodeint.py b/lib/portage/tests/xpak/test_decodeint.py
index 2d4df5f16..4d2324191 100644
--- a/lib/portage/tests/xpak/test_decodeint.py
+++ b/lib/portage/tests/xpak/test_decodeint.py
@@ -8,7 +8,6 @@ from portage.xpak import decodeint, encodeint
class testDecodeIntTestCase(TestCase):
def testDecodeInt(self):
-
for n in range(1000):
self.assertEqual(decodeint(encodeint(n)), n)
diff --git a/lib/portage/update.py b/lib/portage/update.py
index 0810361f8..0abb92094 100644
--- a/lib/portage/update.py
+++ b/lib/portage/update.py
@@ -31,7 +31,6 @@ ignored_dbentries = ("CONTENTS", "environment.bz2")
def update_dbentry(update_cmd, mycontent, eapi=None, parent=None):
-
if parent is not None:
eapi = parent.eapi
diff --git a/lib/portage/util/__init__.py b/lib/portage/util/__init__.py
index 285bf6659..59db742d7 100644
--- a/lib/portage/util/__init__.py
+++ b/lib/portage/util/__init__.py
@@ -573,7 +573,6 @@ def grabfile_package(
eapi=None,
eapi_default="0",
):
-
pkgs = grabfile(
myfilename, compatlevel, recursive=recursive, remember_source_file=True
)
@@ -758,7 +757,6 @@ _invalid_var_name_re = re.compile(r"^\d|\W")
def getconfig(
mycfg, tolerant=False, allow_sourcing=False, expand=True, recursive=False
):
-
if isinstance(expand, dict):
# Some existing variable definitions have been
# passed in, for use in substitutions.
@@ -1409,7 +1407,6 @@ def apply_secpass_permissions(
# Avoid accessing portage.data.secpass when possible, since
# it triggers config loading (undesirable for chmod-lite).
if (uid != -1 or gid != -1) and portage.data.secpass < 2:
-
if uid != -1 and uid != stat_cached.st_uid:
all_applied = False
uid = -1
@@ -1622,7 +1619,6 @@ class LazyItemsDict(UserDict):
__slots__ = ("lazy_items",)
def __init__(self, *args, **kwargs):
-
self.lazy_items = {}
UserDict.__init__(self, *args, **kwargs)
@@ -1724,11 +1720,9 @@ class LazyItemsDict(UserDict):
return result
class _LazyItem:
-
__slots__ = ("func", "pargs", "kwargs", "singleton")
def __init__(self, func, pargs, kwargs, singleton):
-
if not pargs:
pargs = None
if not kwargs:
diff --git a/lib/portage/util/_async/FileDigester.py b/lib/portage/util/_async/FileDigester.py
index 0d250ec99..ce334ee95 100644
--- a/lib/portage/util/_async/FileDigester.py
+++ b/lib/portage/util/_async/FileDigester.py
@@ -47,7 +47,6 @@ class FileDigester(ForkProcess):
return os.EX_OK
def _parse_digests(self, data):
-
digests = {}
for line in data.decode("utf_8").splitlines():
parts = line.split("=", 1)
diff --git a/lib/portage/util/_async/ForkProcess.py b/lib/portage/util/_async/ForkProcess.py
index ea8ea3a5b..22a0e0cd8 100644
--- a/lib/portage/util/_async/ForkProcess.py
+++ b/lib/portage/util/_async/ForkProcess.py
@@ -14,7 +14,6 @@ from _emerge.SpawnProcess import SpawnProcess
class ForkProcess(SpawnProcess):
-
__slots__ = ("_proc", "_proc_join_task")
# Number of seconds between poll attempts for process exit status
diff --git a/lib/portage/util/_async/PipeLogger.py b/lib/portage/util/_async/PipeLogger.py
index 006f915ef..cedd4b9f4 100644
--- a/lib/portage/util/_async/PipeLogger.py
+++ b/lib/portage/util/_async/PipeLogger.py
@@ -31,7 +31,6 @@ class PipeLogger(AbstractPollTask):
)
def _start(self):
-
log_file_path = self.log_file_path
if hasattr(log_file_path, "write"):
self._log_file_nb = True
diff --git a/lib/portage/util/_async/PopenProcess.py b/lib/portage/util/_async/PopenProcess.py
index 25afad0f4..c9bca1c52 100644
--- a/lib/portage/util/_async/PopenProcess.py
+++ b/lib/portage/util/_async/PopenProcess.py
@@ -5,14 +5,12 @@ from _emerge.SubProcess import SubProcess
class PopenProcess(SubProcess):
-
__slots__ = (
"pipe_reader",
"proc",
)
def _start(self):
-
self.pid = self.proc.pid
self._registered = True
diff --git a/lib/portage/util/_async/SchedulerInterface.py b/lib/portage/util/_async/SchedulerInterface.py
index c397fa1b2..43a42adff 100644
--- a/lib/portage/util/_async/SchedulerInterface.py
+++ b/lib/portage/util/_async/SchedulerInterface.py
@@ -12,7 +12,6 @@ from ..SlotObject import SlotObject
class SchedulerInterface(SlotObject):
-
_event_loop_attrs = (
"add_reader",
"add_writer",
@@ -118,7 +117,6 @@ class SchedulerInterface(SlotObject):
if not msg_shown:
writemsg_level(msg, level=level, noiselevel=noiselevel)
else:
-
if log_path.endswith(".gz"):
# NOTE: The empty filename argument prevents us from
# triggering a bug in python3 which causes GzipFile
diff --git a/lib/portage/util/_dyn_libs/LinkageMapELF.py b/lib/portage/util/_dyn_libs/LinkageMapELF.py
index 12300281f..76feadcac 100644
--- a/lib/portage/util/_dyn_libs/LinkageMapELF.py
+++ b/lib/portage/util/_dyn_libs/LinkageMapELF.py
@@ -59,7 +59,6 @@ class LinkageMapELF:
_soname_map_class = slot_dict_class(("consumers", "providers"), prefix="")
class _obj_properties_class:
-
__slots__ = (
"arch",
"needed",
diff --git a/lib/portage/util/_dyn_libs/display_preserved_libs.py b/lib/portage/util/_dyn_libs/display_preserved_libs.py
index 37772df4f..32dcc9428 100644
--- a/lib/portage/util/_dyn_libs/display_preserved_libs.py
+++ b/lib/portage/util/_dyn_libs/display_preserved_libs.py
@@ -8,7 +8,6 @@ from portage.output import colorize
def display_preserved_libs(vardb, verbose=False):
-
MAX_DISPLAY = 3
plibdata = vardb._plib_registry.getPreservedLibs()
diff --git a/lib/portage/util/_get_vm_info.py b/lib/portage/util/_get_vm_info.py
index 9fb7e4ba8..5f82c84ea 100644
--- a/lib/portage/util/_get_vm_info.py
+++ b/lib/portage/util/_get_vm_info.py
@@ -9,7 +9,6 @@ from portage import _unicode_decode
def get_vm_info():
-
vm_info = {}
env = os.environ.copy()
@@ -51,7 +50,6 @@ def get_vm_info():
pass
else:
-
try:
proc = subprocess.Popen(
["sysctl", "-a"],
diff --git a/lib/portage/util/_info_files.py b/lib/portage/util/_info_files.py
index 99d2bdce7..45d674b9b 100644
--- a/lib/portage/util/_info_files.py
+++ b/lib/portage/util/_info_files.py
@@ -12,7 +12,6 @@ from portage import os
def chk_updated_info_files(root, infodirs, prev_mtimes):
-
if os.path.exists("/usr/bin/install-info"):
out = portage.output.EOutput()
regen_infodirs = []
diff --git a/lib/portage/util/compression_probe.py b/lib/portage/util/compression_probe.py
index 312f2d368..0879754b2 100644
--- a/lib/portage/util/compression_probe.py
+++ b/lib/portage/util/compression_probe.py
@@ -111,7 +111,6 @@ def compression_probe(f):
def _compression_probe_file(f):
-
m = _compression_re.match(f.read(_max_compression_re_len))
if m is not None:
for k, v in m.groupdict().items():
--git a/lib/portage/util/elf/header.py b/lib/portage/util/elf/header.py
index c307fab28..3a01d47f4 100644
--- a/lib/portage/util/elf/header.py
+++ b/lib/portage/util/elf/header.py
@@ -20,7 +20,6 @@ from portage.util.elf.constants import (
class ELFHeader:
-
__slots__ = ("e_flags", "e_machine", "e_type", "ei_class", "ei_data")
@classmethod
diff --git a/lib/portage/util/futures/_sync_decorator.py b/lib/portage/util/futures/_sync_decorator.py
index d4df26a9b..772983bc8 100644
--- a/lib/portage/util/futures/_sync_decorator.py
+++ b/lib/portage/util/futures/_sync_decorator.py
@@ -46,7 +46,6 @@ def _sync_methods(obj, loop=None):
class _ObjectAttrWrapper(portage.proxy.objectproxy.ObjectProxy):
-
__slots__ = ("_obj", "_attr_wrapper")
def __init__(self, obj, attr_wrapper):
diff --git a/lib/portage/util/futures/compat_coroutine.py b/lib/portage/util/futures/compat_coroutine.py
index c7e436343..afb850040 100644
--- a/lib/portage/util/futures/compat_coroutine.py
+++ b/lib/portage/util/futures/compat_coroutine.py
@@ -41,6 +41,7 @@ def coroutine(generator_func):
@return: A function which calls the given generator function and
returns a Future that is done when the generator is exhausted.
"""
+
# Note that functools.partial does not work for decoration of
# methods, since it doesn't implement the descriptor protocol.
# This problem is solve by defining a wrapper function.
diff --git a/lib/portage/util/iterators/MultiIterGroupBy.py b/lib/portage/util/iterators/MultiIterGroupBy.py
index 241b98d57..509cbf44c 100644
--- a/lib/portage/util/iterators/MultiIterGroupBy.py
+++ b/lib/portage/util/iterators/MultiIterGroupBy.py
@@ -20,7 +20,6 @@ class MultiIterGroupBy:
self._key = key
def __iter__(self):
-
trackers = []
for iterator in self._iterators:
trackers.append(_IteratorTracker(iterator))
@@ -34,9 +33,7 @@ class MultiIterGroupBy:
min_progress = None
while trackers:
-
for tracker in trackers:
-
if tracker.current is not None and tracker.current != min_progress:
# The trackers are sorted by progress, so the
# remaining trackers are guaranteed to have
@@ -80,11 +77,9 @@ class MultiIterGroupBy:
class _IteratorTracker:
-
__slots__ = ("current", "iterator")
def __init__(self, iterator):
-
self.iterator = iterator
self.current = None
diff --git a/lib/portage/util/movefile.py b/lib/portage/util/movefile.py
index 3eb0568e8..d46c56ade 100644
--- a/lib/portage/util/movefile.py
+++ b/lib/portage/util/movefile.py
@@ -38,7 +38,6 @@ _xattr_excluder_cache = {}
def _get_xattr_excluder(pattern):
-
try:
value = _xattr_excluder_cache[pattern]
except KeyError:
@@ -49,11 +48,9 @@ def _get_xattr_excluder(pattern):
class _xattr_excluder:
-
__slots__ = ("_pattern_split",)
def __init__(self, pattern):
-
if pattern is None:
self._pattern_split = None
else:
@@ -65,7 +62,6 @@ class _xattr_excluder:
self._pattern_split = tuple(pattern)
def __call__(self, attr):
-
if self._pattern_split is None:
return False
diff --git a/lib/portage/versions.py b/lib/portage/versions.py
index 787dc3442..f3a224eec 100644
--- a/lib/portage/versions.py
+++ b/lib/portage/versions.py
@@ -563,7 +563,6 @@ def cpv_sort_key(eapi=None):
split_cache = {}
def cmp_cpv(cpv1, cpv2):
-
split1 = split_cache.get(cpv1, False)
if split1 is False:
split1 = None
diff --git a/lib/portage/xpak.py b/lib/portage/xpak.py
index e2bb862fe..9eedf2ecd 100644
--- a/lib/portage/xpak.py
+++ b/lib/portage/xpak.py
@@ -55,7 +55,6 @@ def addtolist(mylist, curdir):
_unicode_decode(curdir, encoding=_encodings["fs"], errors="strict")
)
for parent, dirs, files in os.walk(curdir):
-
parent = _unicode_decode(parent, encoding=_encodings["fs"], errors="strict")
if parent != curdir:
mylist.append(parent[len(curdir) + 1 :] + os.sep)
diff --git a/setup.py b/setup.py
index 373d4bf1e..e59689008 100755
--- a/setup.py
+++ b/setup.py
@@ -788,7 +788,6 @@ def venv_data_files(locations):
abs_source_path = os.path.abspath(source_path)
for root, dirs, files in os.walk(abs_source_path):
-
root_offset = root[len(abs_source_path) :].lstrip("/")
dest_path = os.path.join(dest_prefix, root_offset)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-02-03 13:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-03 13:00 [gentoo-commits] proj/portage:master commit in: lib/portage/tests/resolver/binpkg_multi_instance/, lib/portage/util/elf/, Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox