Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 928142 - env-update complains about missing "/var/db/repos/gentoo"
Summary: env-update complains about missing "/var/db/repos/gentoo"
Status: UNCONFIRMED
Alias: None
Product: Gentoo Release Media
Classification: Unclassified
Component: Stages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Release Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-29 20:35 UTC by David Sardari
Modified: 2024-03-29 21:16 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Sardari 2024-03-29 20:35:35 UTC
"env-update" complains about missing "/var/db/repos/gentoo":

[root@sysrescue ~]# chroot /mnt/gentoo /bin/bash
sysrescue / # source /etc/profile
sysrescue / # su -
sysrescue ~ # env-update && source /etc/profile && export PS1="(chroot) $PS1"
!!! Section 'gentoo' in repos.conf has location attribute set to nonexistent directory: '/var/db/repos/gentoo'
!!! Invalid Repository Location (not a dir): '/var/db/repos/gentoo'
>>> Regenerating /etc/ld.so.cache...
(chroot) sysrescue ~ #

Thus, it's good to have it included in stage3 tarballs with portage:portage ownership:

[root@sysrescue ~]# chroot /mnt/gentoo /bin/bash
sysrescue / # source /etc/profile
sysrescue / # su -
sysrescue ~ # env-update && source /etc/profile && export PS1="(chroot) $PS1"
>>> Regenerating /etc/ld.so.cache...
(chroot) sysrescue ~ # ls -la /var/db/repos/gentoo/
total 0
drwxr-xr-x 1 portage portage  0 29. Mär 19:32 .
drwxr-xr-x 1 root    root    24 29. Mär 19:49 ..
(chroot) sysrescue ~ #

Having "/var/db/repos/gentoo" owned by portage:porage will enforce running the "sync" operation of, for example, "emerge --sync" as "portage" user.

Reproducible: Always
Comment 1 Mike Gilbert gentoo-dev 2024-03-29 20:42:57 UTC
There should be no need to run env-update before initially syncing the gentoo repo. Why are you doing that?
Comment 2 David Sardari 2024-03-29 20:46:43 UTC
ah, OK. I didn't know that. Nevertheless, wouldn't it be good to have the folder predelivered with "portage:portage" ownership in order to avoid running the sync as root by accident?
Comment 3 Mike Gilbert gentoo-dev 2024-03-29 21:08:20 UTC
I think it would make more sense to have Portage handle setting the owner on the initial sync if the directory does not exist.
Comment 4 David Sardari 2024-03-29 21:16:55 UTC
yeah, that would be better :)