commit:     e322a78cbfd6d51aefe26425dff1cb99c3d307bc
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 21 19:09:05 2023 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Fri Apr 21 19:09:05 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=e322a78c

libq/tree: add commetns on file checks (research for bug #898194)

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 libq/tree.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/libq/tree.c b/libq/tree.c
index f308c8d..1922b7d 100644
--- a/libq/tree.c
+++ b/libq/tree.c
@@ -1109,8 +1109,17 @@ tree_pkg_read(tree_pkg_ctx *pkg_ctx)
 
        if (ctx->cachetype == CACHE_METADATA_MD5) {
                ret = tree_read_file_md5(pkg_ctx);
+               /* md5-cache, is sort of documented in egencache man-page
+                * key-points are that an md5 is provided for the ebuild itself,
+                * and if it includes eclasses, the md5s for each eclass.  These
+                * are available as _md5_ and _eclasses_ keys.  The latter uses
+                * tab-separation of form <eclass-name>\t<md5>\t... */
        } else if (ctx->cachetype == CACHE_METADATA_PMS) {
                ret = tree_read_file_pms(pkg_ctx);
+               /* PMS implies to do an mtime and existence check (the cache may
+                * contain extra stuff) but since this form of metadata in fact
+                * is extinct, because these checks are insufficient and
+                * impossible on e.g. a git-based tree. */
        } else if (ctx->cachetype == CACHE_EBUILD) {
                ret = tree_read_file_ebuild(pkg_ctx);
        } else if (ctx->cachetype == CACHE_BINPKGS) {

Reply via email to