cross-posted from: https://lemmy.blahaj.zone/post/32298676
Having seen no context or posts, this is where I assume @[email protected] currently is.
cross-posted from: https://lemmy.blahaj.zone/post/32298676
Having seen no context or posts, this is where I assume @[email protected] currently is.
If it’s something outside packages, like say the filesystem, it should be similar to fix to what you did in the initial setup. You already have to know how to partition your system, so at worst you’d have to relearn that if you installed a very long time ago.
If you mean break some regular file, you can reinstall the package it belongs to or everything if you have the time.
Gentoo has a proper package manager (portage), so most things you can rebuild. If you fuck some config, you can probably rebuild and get the default files back.
If you break portage config somehow, you’ll probably have to start from scratch in essence. Though there too once you start to redo your setup you’ll likely run into the same issue and have to figure it out.
Because all distro-problems will be caused by you, the only escape is to understand the issue.
Any “rebuild” would just be you copying in all your old stuff and repeating all the settings, you could just as easily revert your settings till it works again and pinpoint what is causing it.
I have no specific automation for setting up a system from scratch (did it 2 more times on different systems but manual copy was good enough), but automating it wouldn’t be hard. Just dump all the commands I run during setup into a script, and add a few scp to pull in my own stuff (or I could even put it in an official gentoo repo and pull it in with one portage config file).
But why would I? I don’t regularly set up copies of my system, and this is the same as just looking at my system. It can’t break itself past what those config files and setup commands do. The system won’t diverge from your commands so there is no need to force reset it to your commands.
I suppose the fact I comment my package set (the config file that contains all the packages I have installed) with install reasons is the same as starting from scratch. I simply reevaluated all my installed packages when I wrote it.
In a way I did once “fuck my system”. I switched to wayland (end of '22, before it was cool) and wanted to remove all X flags from all packages (a global flag unset). So I endlessly figured out what packages really needed that flag, added exceptions, and after months still ran into occasional issues, instability, or the weirdest dependencies. Whenever I had any problem I started considering if it was somehow caused by that.
I knew it was stupid, I knew plenty issues it had caused, everyone was telling me it was in fact stupid. Basically I was test-running 200 packages at once under settings noone had ever intended. So my “rebuild” was just to remove that -x from my make.conf and rebuild all affected packages. (I may have even rebuilt the entire system just in case).
The only way I see you actually starting from scratch is if you
The most “I’m fucked, rebuild everything” moment in my memory was me doing an update after half a year when kde6 was released. What happened was I had manually specified a bunch of kde system components (instead of stripping down the kde meta package via flags) and some were removed in kde6, so portage tried building a kde6 system with kde5 and failed in enough ways to generate like 5k lines of error.
I was unable to read that error, and while someone in the gentoo irc was able to, I would have had to “rebuild” my package selection otherwise.
Meaning leave the system running as is, remove stuff from the installed packages config until the update finds a valid config, add back stuff while it keeps working, and be left with in this case the packages that were removed, where I would have then checked them and seen they were removed in kde6.
This would have essentially been me “rebuilding my installed packages”, so “rebuilding the system”, but while still using that same system and with the final “apply” being a regular update using my fixed config. No need to throw everything away in the mean time, it may destroy my valid package state but the system doesn’t mind (it just stays outdated). I could have even updated only specific important packages and delayed the package rebuild for more months.
The main flaws here are me (adding stupid dependencies) and portage producing unreadable errors (to be fair there are so many ways to fuck up package configs it’s gotta be really hard to make every case readable and traceable to some sane cause).
Without fixing it I ofc could not have gone to a different system and copied over my stuff (automated or not) since that would also have refused to build all my selected packages.