Post AuS2rtLnvOLxchdRAm by inawhilecrocodile@mastodon.social
(DIR) More posts by inawhilecrocodile@mastodon.social
(DIR) Post #AuRqFmQo0Gqli22EEK by XaetaCore@mastodon.xaetacore.net
2025-05-25T09:23:08Z
1 likes, 1 repeats
Need to simplify your update procedure on #gentoo #linux ?Try my bash alias :)```alias update='flatpak update && emerge --sync -a ; emerge --ask --verbose --update --deep --changed-use --keep-going --with-bdeps=y --backtrack=500 @world ; emerge --depclean ; eclean-dist -d'```What it does: - Updates flatpak and sync's overlays - Does deep update with changed use flags on @world set - Cleans up old dependencies and packages no longer being used - Cleans old tar balls and source archives
(DIR) Post #AuS2rtLnvOLxchdRAm by inawhilecrocodile@mastodon.social
2025-05-25T11:44:24Z
0 likes, 0 repeats
@xaetacore Consider replacing the semicolon's (;) with && so that the next command is only executed if the one preceding it had an exit code of 0 (success).Another improvement is to use script to log all output to a file for review later:<code>alias update="script system-update.log -c 'bash -c \"flatpak update && emerge --sync -a && emerge --ask --verbose --update --deep --changed-use --keep-going --with-bdeps=y --backtrack=500 @world && emerge --depclean && eclean-dist -d\"'"</code>
(DIR) Post #AuS4X76VnKtA6bhasa by XaetaCore@mastodon.xaetacore.net
2025-05-25T12:03:08Z
0 likes, 0 repeats
`;` was a conscious decision, i have used `&&` exactly like that in this command before, but then realized that i always want to --depclean and always want to dist clean regardless if the previous commands failed or not.And i also always want to try to recompile changed use regardless if sync fails or not.Some times a overlay will return a 1 and t hen that would break the entire process if i used &&
(DIR) Post #AuS4g5PBTqBrRWiMAy by XaetaCore@mastodon.xaetacore.net
2025-05-25T12:04:45Z
0 likes, 0 repeats
@inawhilecrocodile @world On the logging part, Portage should do that already on its own, i also have automated btrfs snapshots configured so if anything goes wrong i usually see it.the update alias usually gets ran at night and then at day i run it again to make sure i did not miss anything.This would also show me any failed jobs.But if t hats not your cup of tea then a log file would suffice