How is this not a built-in function of pacman?

  • hendrik ( hendrik@palaver.p3x.de ) 
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    2 hours ago

    I think other packet managers don’t, either.

    As an upside you won’t run into situations like a big Windows update blocking the entire computer 20mins before your meeting and you’d really need to close the lid, throw it in the backpack and walk to the meeting room. Or you spontaneously talk to someone and return to a laptop with a drained battery. Probably more of an issue with automatic-upgrades, though.

  • Cousin Mose ( undefined@lemmy.hogru.ch ) 
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    4 hours ago

    I don’t remember what the Linux equivalent is but in macOS I just prefix commands with caffeinate. It’s super helpful when I want to do things like restore a large database then walk away. I can’t imagine it doesn’t exist on Linux.

  • Why should it?

    Downloads are interrupted by sleep, but they can be safely interrupted.

    Installing packages or other core changes are not interrupted by entering sleep mode. Although, they would be interrupted by shutdown/rebooting, sometimes to catastrophic consequences.

    Other distros are a bit more resilient, with things like installing and managing multiple kernels, that way even if one breaks (like via a borked/interrupted update), you can still boot.

    But pacman/Arch Linux is designed with a certain philosphy in mind. You are supposed to be reading the pacman output, that way you can respond if anything needs to be done. If you don’t respond accordingly when certain manual changes are needed, then bad things can happen. For example, if the grub package gets updated, then you might need to manually generate a new grub config file. If the grub config file and grub itself are out of sync, your system could be rendered unbootable.

    https://wiki.archlinux.org/title/Arch_Linux#User_centrality