Summary: | eselect news has problems with ROOT | ||
---|---|---|---|
Product: | Gentoo Hosted Projects | Reporter: | Dennis Schridde <dschridde+gentoobugs> |
Component: | eselect | Assignee: | Gentoo eselect Team <eselect> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | dev-portage |
Priority: | Normal | Keywords: | InVCS |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Dennis Schridde
2011-03-10 09:20:07 UTC
Version used: app-admin/eselect-1.2.11 P.S: More info: * $ROOT contains no portage tree * /etc/portage is bind-mounted What does "portageq get_repo_path ${ROOT} gentoo" output for your ROOT? # ROOT=/vz/private/123/ portageq get_repo_path /vz/private/123/ gentoo /var/cache/portage/gentoo The problem is reproducible (i.e. no one-shot): --- # ROOT=/vz/private/123/ eselect news unread all # ROOT=/vz/private/123/ eselect news read new 2010-02-28-layman-storage-path-change !!! Warning: News item "2010-02-28-layman-storage-path-change" no longer exists [...] --- The read-states are stored correctly, too: --- # ROOT=/vz/private/123/ eselect news read new No news is good news. --- P.S: It works on /, too: --- # ROOT=/ eselect news unread all # ROOT=/ eselect news read new [...expected output...] --- (In reply to comment #4) > # ROOT=/vz/private/123/ portageq get_repo_path /vz/private/123/ gentoo > /var/cache/portage/gentoo Did I get it right that there is _no_ portage tree in /vz/private/123/var/cache/portage/gentoo ? But directory /vz/private/123/var/lib/gentoo/news exists and contains some files (like news-gentoo.unread)? (In reply to comment #4) > !!! Warning: News item "2010-02-28-layman-storage-path-change" no longer exists Just checked, the directory exists: /var/cache/portage/gentoo/metadata/news/2010-02-28-layman-storage-path-change (In reply to comment #6) > (In reply to comment #4) > > # ROOT=/vz/private/123/ portageq get_repo_path /vz/private/123/ gentoo > > /var/cache/portage/gentoo > > Did I get it right that there is _no_ portage tree in > /vz/private/123/var/cache/portage/gentoo ? Correct: # ls /vz/private/123/var/cache/portage/gentoo ls: cannot access /vz/private/123/var/cache/portage/gentoo: No such file or directory > But directory /vz/private/123/var/lib/gentoo/news exists and contains some > files (like news-gentoo.unread)? Correct. # ll /vz/private/123/var/lib/gentoo/news total 8 -rw-rw-r-- 1 root portage 222 Mar 10 11:07 news-gentoo.read -rw-rw-r-- 1 root portage 222 Mar 10 10:16 news-gentoo.skip -rw-rw-r-- 1 root portage 0 Mar 10 11:07 news-gentoo.unread Some more output (maybe interesting): # ROOT=/vz/private/123/ eselect news list News items: [1] read 2010-02-28 (2010-02-28-layman-storage-path-change - removed?) [2] read 2010-03-25 (2010-03-25-python-3.1 - removed?) [3] read 2010-08-01 (2010-08-01-as-needed-default - removed?) [4] read 2010-10-22 (2010-10-22-perl-5.12-upgrade-procedure - removed?) [5] read 2010-11-13 (2010-11-13-hardened-profiles - removed?) [6] read 2009-04-18 (2009-04-18-java-config-wrapper-0.16 - removed?) [7] read 2011-02-19 (2011-02-19-ia64-java-removal - removed?) Ok, theory: * The files in /vz/private/123/var/lib/gentoo/news/ were remaining from an older setup where there *was* a portage tree in /vz/private/123/var/cache/portage/gentoo. * eselect still decided to update the mtime of these status files even though they were not backed up by any real files in metadata/news anymore. * This made me think that "ROOT=... eselect news" would work the way I assumed: List news that apply to the specified ROOT instead of /. I just did this: # rm /vz/private/123/var/lib/gentoo/news/* # ROOT=/vz/private/123/ eselect news unread all # ROOT=/vz/private/123/ eselect news list News items: (none found) Suggestion: Either mark as RESOLVED/INVALID and make me open a new bug for ROOT support in eselect-news, or just change the topic/importance into a feature request: "eselect news should support listing items which apply to a different ROOT". Another request would be enhanced diagnostics: eselect should notice that the whole portage tree is missing and notify me about that problem. (In reply to comment #6) > (In reply to comment #4) > > # ROOT=/vz/private/123/ portageq get_repo_path /vz/private/123/ gentoo > > /var/cache/portage/gentoo > > Did I get it right that there is _no_ portage tree in > /vz/private/123/var/cache/portage/gentoo ? portageq get_repo_path is supposed to return an absolute path, so eselect shouldn't join that path with $ROOT. This is because people typically don't put things like the portage tree inside $ROOT. They can if they want to, but if they do then they need to configure PORTDIR to point at the directory inside $ROOT. Should be fixed in SVN r808: <http://sources.gentoo.org/cgi-bin/viewvc.cgi/eselect?view=revision&revision=808> (In reply to comment #11) > Should be fixed in SVN r808: > <http://sources.gentoo.org/cgi-bin/viewvc.cgi/eselect?view=revision&revision=808> Does this implement my feature request? I.e. "eselect news should support listing items which apply to a different ROOT" or "'ROOT=... eselect news ...' should only list news items that apply to the specified ROOT". (In reply to comment #12) > Does this implement my feature request? I.e. "eselect news should support > listing items which apply to a different ROOT" or "'ROOT=... eselect news ...' > should only list news items that apply to the specified ROOT". eselect will take the list of news items from ${ROOT}/var/lib/gentoo/news/, so I believe the answer is yes. (In reply to comment #8) > Ok, theory: > * The files in /vz/private/123/var/lib/gentoo/news/ were remaining from an > older setup where there *was* a portage tree in > /vz/private/123/var/cache/portage/gentoo. The files in this directory are updated by portage. Note the timestamp of news-gentoo.skip (which is never touched by eselect): (In reply to comment #7) > # ll /vz/private/123/var/lib/gentoo/news > total 8 > -rw-rw-r-- 1 root portage 222 Mar 10 11:07 news-gentoo.read > -rw-rw-r-- 1 root portage 222 Mar 10 10:16 news-gentoo.skip > -rw-rw-r-- 1 root portage 0 Mar 10 11:07 news-gentoo.unread (In reply to comment #13) > (In reply to comment #8) > > * The files in /vz/private/123/var/lib/gentoo/news/ were remaining from an > > older setup where there *was* a portage tree in > > /vz/private/123/var/cache/portage/gentoo. > > The files in this directory are updated by portage. Note the timestamp of > news-gentoo.skip (which is never touched by eselect): So the files will be regenerated after deletion once I run "emerge <something>"? Yes, $ROOT/var/lib/gentoo/news/ will be updated after --sync, after --pretend, and before emerge <target>, when it displays news notifications. It's part of the spec: http://www.gentoo.org/proj/en/glep/glep-0042.html#client-side Fixed in eselect-1.2.15. Thank you for reporting this bug. |