• 8 Posts
  • 9 Comments
Joined 1 year ago
cake
Cake day: December 28th, 2023

help-circle


  • Yeah apt tends to shit itself very often. I don’t like how it’s actually two different programs (dpkg and apt) glued together with perl and python. It all feels too fragile. A friend once tried updating a package, and it failed because… he was issuing the apt command from with a python virtual environment. Can’t say for pacman because I’ve never used arch, but xbps is just one set of self-contained binaries, which feels much more robust. Alpine’s APK fits that bill as well, lovely little package manager. Tho I guess apt predates both of those, so it’s not a fair comparison. Someone had to make those mistakes for the first time.

    I also really dislike the Debian/Ubuntu culture of fucking around with the sources file to add other people’s repositories on top of the distro-default ones (ubuntu calls this PPA). It’s a good idea in theory, but in practice those third party repos always fuck up in some way and brick your package manager. Just search for “apt Failed to fetch” in your favourite internet search engine, and you will see hundreds of people confused about it. You can do it with almost any package manager, but for some reason it’s mainly the debian/ubuntu people who like shooting themselves in the foot like this.



  • This is a good practice tho. The HTTP code describes the status of the HTTP operation. Did the server handle it? No? Was the url not found? Did it time out? Was the payload too large? And the JSON describes the result of the backend operation. So 200 OK with error: true means that your HTTP request was all good, but the actual operation bugged out for whatever reason. If you try to indicate errors in the backend with a HTTP error code, you quickly get confused about which codes can happen for what reason.








  • Huh, TIL

    ~ $ /bin/true --help
    Usage: /bin/true [ignored command line arguments]
      or:  /bin/true OPTION
    Exit with a status code indicating success.
    
          --help        display this help and exit
          --version     output version information and exit
    
    NOTE: your shell may have its own version of true, which usually supersedes
    the version described here.  Please refer to your shell's documentation
    for details about the options it supports.
    
    GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
    Full documentation <https://www.gnu.org/software/coreutils/true>
    or available locally via: info '(coreutils) true invocation'
    

    I honestly don’t know what I prefer more, the overengineered GNU true, or the true that shipped with some older system that was literally just an empty file with the executable bit set.