commit:     1f32750bda6e485683cd3fe80aebdd4cb1ef1947
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 13 18:41:08 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Sep 14 00:15:06 2025 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=1f32750b

bintree: Add comments to break statements

Make the code a bit more comprehensible by adding code comments.

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>
Part-of: https://github.com/gentoo/portage/pull/1465
Closes: https://github.com/gentoo/portage/pull/1465
Signed-off-by: Sam James <sam <AT> gentoo.org>

 lib/portage/dbapi/bintree.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/portage/dbapi/bintree.py b/lib/portage/dbapi/bintree.py
index 9d695059d6..9d0178bd7e 100644
--- a/lib/portage/dbapi/bintree.py
+++ b/lib/portage/dbapi/bintree.py
@@ -1644,6 +1644,8 @@ class binarytree:
                                 ),
                                 noiselevel=-1,
                             )
+                    # We successfully fetched the remote index, break
+                    # out of the ("Packages.gz", "Packages") loop.
                     break
                 except UseCachedCopyOfRemoteIndex:
                     changed = False
@@ -1670,6 +1672,8 @@ class binarytree:
                             )
                             + "\n"
                         )
+                    # We are using the cached index, break out of the
+                    # ("Packages.gz", "Packages") loop.
                     break
                 except OSError as e:
                     if (

Reply via email to