Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Restoring deleted /var/db/repos/gentoo
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Kiril kovachev
n00b
n00b


Joined: 11 Jun 2025
Posts: 3

PostPosted: Wed Jun 11, 2025 7:53 pm    Post subject: [SOLVED] Restoring deleted /var/db/repos/gentoo Reply with quote

Hello, I had tried to follow the "Chroot" method from the Steam page on the wiki (https://wiki.gentoo.org/index.php?title=Steam&oldid=1397394) to install Steam, which has us run the following commands to enter a chroot environment:

Code:

mount -t proc /proc proc
mount -R /sys sys
mount -R /dev dev
mount -R /run run
mount -R /var/db/repos/gentoo var/db/repos/gentoo


(Specifically, I think the last line is most pertinent here.) I tried using the Chroot route, but it didn't seem to work for me, and I decided to install Flatpak and install Steam that way. Once I realized that the Flatpak route was working for me, I went to delete the stage 3 tarball and the corresponding directory tree that I'd set up for the chroot. However, I did not unmount the directories first. Hence, it went ahead and started deleting all the mounted directories, as well as presumably their counterparts on my actual live system. Firstly, this suddenly make my stomach lurch deep into the earth when my system suddenly started to break down and report errors upon executing even elementary shell commands; and I was very distraught seeing that even the reboot command seemed to require a fallback mode to work properly. But, nevertheless, when I rebooted, everything seemed fine, and I assume that the only thing I did was delete the /proc, /sys, /dev, and /run filesystems, which, if I'm not mistaken, although not desirable, shouldn't have left any long-term damage. The command I ran was (while in /usr/local):
Code:
rm -rf steam64


However, after taking a day's break from hacking on Gentoo, I noticed today a horrific sequence of error messages pop up concerning every single package I had installed from the Gentoo repo, and this appeared every time I tried to run `emerge`. `emaint sync --auto` also doesn't work due to the same errors.

Based on the above realization, it would seem that I'd also partially deleted `/var/db/repos/gentoo`. I can't sync it back, as that gives all the same errors related to ebuild classes. Would it be possible to get another stage 3 tarball and dump its Gentoo repo's contents into `/var/db/repos/gentoo`, and then perhaps `emaint sync`? It seems like it'd work, but I didn't want to be rash and rush to do it without seeking counsel first :)

Here is an excerpt from the log of trying to emerge Portage itself (first instinct trying to fix the situation, before considering that may not be the solution):

Quote:

Messages for package sys-apps/portage-3.0.65-r1::gentoo:
* ERROR: sys-apps/portage-3.0.65-r1::gentoo failed (depend phase):
* meson.eclass could not be found by inherit()
*
* Call stack:
* ebuild.sh, line 625: Called source '/var/db/repos/gentoo/sys-apps/portage/portage-3.0.65-r1.ebuild'
* portage-3.0.65-r1.ebuild, line 10: Called inherit 'meson' 'linux-info' 'python-r1' 'tmpfiles'
* ebuild.sh, line 275: Called die
* The specific snippet of code:
* [[ -z ${location} ]] && die "${1}.eclass could not be found by inherit()"
*
* If you need support, post the output of `emerge --info '=sys-apps/portage-3.0.65-r1::gentoo'`,
* the complete build log and the output of `emerge -pqv '=sys-apps/portage-3.0.65-r1::gentoo'`.
* Working directory: '/usr/lib/python3.13/site-packages'
* S: '/var/tmp/portage/sys-apps/portage-3.0.65-r1/work/portage-3.0.65'

!!! All ebuilds that could satisfy "sys-apps/portage" have been masked.
!!! One of the following masked packages is required to complete your request:
- sys-apps/portage-9999::gentoo (masked by: corruption)
- sys-apps/portage-3.0.68::gentoo (masked by: corruption)
- sys-apps/portage-3.0.67-r1::gentoo (masked by: corruption)
- sys-apps/portage-3.0.67::gentoo (masked by: corruption)
- sys-apps/portage-3.0.66.1-r1::gentoo (masked by: corruption)
- sys-apps/portage-3.0.65-r1::gentoo (masked by: corruption)

For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.


I can post the full log if required, however I was only able to capture the output with a number of hideous escape sequences, so I figured I would spare everyone the reading.

Part of the directory structure is still present in the Gentoo repo, but the eclass directory is completely gone, which seems to explain why there are errors in inheriting eclasses as mentioned above. There are numerous such eclass errors throughout the error log.

Thank you kindly for your help,
_________________
- Kiril kovachev


Last edited by Kiril kovachev on Wed Jun 11, 2025 8:11 pm; edited 1 time in total
Back to top
View user's profile Send private message
zen_desu
Guru
Guru


Joined: 25 Oct 2024
Posts: 300

PostPosted: Wed Jun 11, 2025 7:55 pm    Post subject: Reply with quote

can you "emerge --sync" or "emerge-webrsync"

the repos aren't really anything that unique, they just need to be present for portage to portage.
_________________
µgRD dev
Wiki writer
Back to top
View user's profile Send private message
Kiril kovachev
n00b
n00b


Joined: 11 Jun 2025
Posts: 3

PostPosted: Wed Jun 11, 2025 8:11 pm    Post subject: Fixed Reply with quote

zen_desu wrote:
can you "emerge --sync" or "emerge-webrsync"

the repos aren't really anything that unique, they just need to be present for portage to portage.


Wow, thanks a lot :D I had tried emerge --sync, which errored, but emerge-webrsync worked after switching repos.conf to use rsync. Thank you!
_________________
- Kiril kovachev
Back to top
View user's profile Send private message
zen_desu
Guru
Guru


Joined: 25 Oct 2024
Posts: 300

PostPosted: Wed Jun 11, 2025 8:13 pm    Post subject: Re: Fixed Reply with quote

Kiril kovachev wrote:
zen_desu wrote:
can you "emerge --sync" or "emerge-webrsync"

the repos aren't really anything that unique, they just need to be present for portage to portage.


Wow, thanks a lot :D I had tried emerge --sync, which errored, but emerge-webrsync worked after switching repos.conf to use rsync. Thank you!


You're welcome, emerge-webrsync is a good basic method to try if others are not working.
_________________
µgRD dev
Wiki writer
Back to top
View user's profile Send private message
Kiril kovachev
n00b
n00b


Joined: 11 Jun 2025
Posts: 3

PostPosted: Wed Jun 11, 2025 8:14 pm    Post subject: Re: Fixed Reply with quote

zen_desu wrote:
Kiril kovachev wrote:
zen_desu wrote:
can you "emerge --sync" or "emerge-webrsync"

the repos aren't really anything that unique, they just need to be present for portage to portage.


Wow, thanks a lot :D I had tried emerge --sync, which errored, but emerge-webrsync worked after switching repos.conf to use rsync. Thank you!


You're welcome, emerge-webrsync is a good basic method to try if others are not working.


Thanks, that's good to know. :)
_________________
- Kiril kovachev
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



OSZAR »