commit:     a007849af9be0a1fd0797fc2b4adbf1f4718ed40
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 18 20:17:52 2025 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Thu Dec 18 20:17:52 2025 +0000
URL:        
https://gitweb.gentoo.org/proj/pkgcore/pkgcore.git/commit/?id=a007849a

rename snakeoil.bash.{iter_read_bash -> read_bash}

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 examples/report_pkg_changes.py  |  4 ++--
 src/pkgcore/ebuild/domain.py    |  4 ++--
 src/pkgcore/ebuild/profiles.py  |  4 ++--
 src/pkgcore/ebuild/repo_objs.py | 14 ++++++--------
 src/pkgcore/merge/triggers.py   |  4 ++--
 5 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/examples/report_pkg_changes.py b/examples/report_pkg_changes.py
index ace27062..6b459ddb 100755
--- a/examples/report_pkg_changes.py
+++ b/examples/report_pkg_changes.py
@@ -3,7 +3,7 @@
 import os
 import sys
 
-from snakeoil.bash import iter_read_bash
+from snakeoil.bash import read_bash
 from snakeoil.osutils import listdir_files
 
 from pkgcore.config import load_config
@@ -79,7 +79,7 @@ def parse_moves(location):
 
     moves = {}
     for update_file in sorted(listdir_files(location), key=get_key):
-        for line in iter_read_bash(pjoin(location, update_file)):
+        for line in read_bash(pjoin(location, update_file)):
             line = line.split()
             if line[0] != "move":
                 continue

diff --git a/src/pkgcore/ebuild/domain.py b/src/pkgcore/ebuild/domain.py
index 0fe1765d..10fb15dd 100644
--- a/src/pkgcore/ebuild/domain.py
+++ b/src/pkgcore/ebuild/domain.py
@@ -17,7 +17,7 @@ from multiprocessing import cpu_count
 from operator import itemgetter
 
 from snakeoil import klass
-from snakeoil.bash import iter_read_bash, read_bash_dict
+from snakeoil.bash import read_bash, read_bash_dict
 from snakeoil.cli.exceptions import find_user_exception
 from snakeoil.data_source import local_source
 from snakeoil.log import suppress_logging
@@ -190,7 +190,7 @@ def _read_config_file(path):
         for fs_obj in sorted(iter_scan(path, follow_symlinks=True)):
             if not fs_obj.is_reg or "/." in fs_obj.location:
                 continue
-            for lineno, line in iter_read_bash(
+            for lineno, line in read_bash(
                 fs_obj.location, allow_line_cont=True, enum_line=True
             ):
                 yield line, lineno, fs_obj.location

diff --git a/src/pkgcore/ebuild/profiles.py b/src/pkgcore/ebuild/profiles.py
index c3b84b3d..511f5fba 100644
--- a/src/pkgcore/ebuild/profiles.py
+++ b/src/pkgcore/ebuild/profiles.py
@@ -12,7 +12,7 @@ from functools import partial
 from itertools import chain
 
 from snakeoil import caching, klass
-from snakeoil.bash import iter_read_bash, read_bash_dict
+from snakeoil.bash import read_bash, read_bash_dict
 from snakeoil.data_source import local_source
 from snakeoil.fileutils import readlines_utf8
 from snakeoil.mappings import ImmutableDict
@@ -73,7 +73,7 @@ def _read_profile_files(files, allow_line_cont=False):
             # profiles base path
             relpath = os.path.basename(path)
 
-        for lineno, line in iter_read_bash(
+        for lineno, line in read_bash(
             path, allow_line_cont=allow_line_cont, enum_line=True
         ):
             yield line, lineno, relpath

diff --git a/src/pkgcore/ebuild/repo_objs.py b/src/pkgcore/ebuild/repo_objs.py
index 1eb72148..439a0fff 100644
--- a/src/pkgcore/ebuild/repo_objs.py
+++ b/src/pkgcore/ebuild/repo_objs.py
@@ -27,7 +27,7 @@ from sys import intern
 
 from lxml import etree
 from snakeoil import klass, mappings
-from snakeoil.bash import BashParseError, iter_read_bash, read_dict
+from snakeoil.bash import BashParseError, read_bash, read_dict
 from snakeoil.caching import WeakInstMeta
 from snakeoil.currying import post_curry
 from snakeoil.fileutils import readfile, readlines
@@ -629,7 +629,7 @@ class Profiles(klass.ImmutableInstance):
         l = []
         fp = pjoin(profiles_base, "profiles.desc")
         try:
-            for lineno, line in iter_read_bash(fp, enum_line=True):
+            for lineno, line in read_bash(fp, enum_line=True):
                 try:
                     arch, profile, status = line.split()
                 except ValueError:
@@ -780,9 +780,7 @@ class RepoConfig(syncable.tree, klass.ImmutableInstance, 
metaclass=WeakInstMeta)
         """Load data from the repo's metadata/layout.conf file."""
         path = pjoin(self.location, self.layout_offset)
         data = read_dict(
-            iter_read_bash(
-                readlines(path, strip_whitespace=True, swallow_missing=True)
-            ),
+            read_bash(readlines(path, strip_whitespace=True, 
swallow_missing=True)),
             source_isiter=True,
             strip=True,
             filename=path,
@@ -911,7 +909,7 @@ class RepoConfig(syncable.tree, klass.ImmutableInstance, 
metaclass=WeakInstMeta)
     def known_arches(self):
         """All valid KEYWORDS for the repo."""
         try:
-            return frozenset(iter_read_bash(pjoin(self.profiles_base, 
"arch.list")))
+            return frozenset(read_bash(pjoin(self.profiles_base, "arch.list")))
         except FileNotFoundError:
             return frozenset()
 
@@ -924,7 +922,7 @@ class RepoConfig(syncable.tree, klass.ImmutableInstance, 
metaclass=WeakInstMeta)
         fp = pjoin(self.profiles_base, "arches.desc")
         d = {"stable": set(), "transitional": set(), "testing": set()}
         try:
-            for lineno, line in iter_read_bash(fp, enum_line=True):
+            for lineno, line in read_bash(fp, enum_line=True):
                 try:
                     arch, status = line.split()
                 except ValueError:
@@ -1020,7 +1018,7 @@ class RepoConfig(syncable.tree, klass.ImmutableInstance, 
metaclass=WeakInstMeta)
         line = None
         fp = pjoin(self.profiles_base, name)
         try:
-            for line in iter_read_bash(fp):
+            for line in read_bash(fp):
                 try:
                     key, val = line.split(None, 1)
                     key = converter(key)

diff --git a/src/pkgcore/merge/triggers.py b/src/pkgcore/merge/triggers.py
index 25e88ac5..c18b3162 100644
--- a/src/pkgcore/merge/triggers.py
+++ b/src/pkgcore/merge/triggers.py
@@ -29,7 +29,7 @@ import time
 from math import floor
 
 from snakeoil import process
-from snakeoil.bash import iter_read_bash
+from snakeoil.bash import read_bash
 from snakeoil.compatibility import IGNORED_EXCEPTIONS
 from snakeoil.fileutils import touch
 from snakeoil.osutils import ensure_dirs, listdir_files, normpath, pjoin
@@ -294,7 +294,7 @@ class ldconfig(base):
         fp = self.ld_so_path(offset)
 
         try:
-            l = [x.lstrip(os.path.sep) for x in iter_read_bash(fp)]
+            l = [x.lstrip(os.path.sep) for x in read_bash(fp)]
         except FileNotFoundError:
             self._mk_ld_so_conf(fp)
             # fall back to an educated guess.

Reply via email to