3 ms·
Oh yeah, Debian's package management is certainly not the example i'd use of a bulletproof system. On the other hand: upgradepkg --install-new /dir/*.tgz Wo
by peterwwillis 13y ago
Oh yeah, Debian's package management is certainly not the example i'd use of a bulletproof system. On the other hand:
upgradepkg --install-new /dir/*.tgz
Works pretty much infallibly. Nobody wants to admit it, but the most reliable package management system is 'tar' (or cpio, really). Everything else just introduces new points of failure. If you just want to get something installed, there is nothing that works more effectively than completely ignoring dependencies and metadata.
- turrini 13y agoThat's simple not true. apt-get ensure that application will get the right version of a library for its execution. 'Untaring' doesn't mean the application will work OK with their dependencies (since there's no verification). So anyone could do a dpkg -i --force-all *.deb. Its the same thing.
- peterwwillis 13y agoActually I believe it's more like dpkg -i -E -G -B --force-overwrite --force-breaks --force-conflicts --force-depends --force-depends-version *.deb with one or two extra things, like installpkg/upgradepkg will prompt you for what you want to do with config files, and adds one or two extra heuristics. But, yes, dpkg could totally be used in a similar way as upgradepkg. It's just more complicated so it doesn't work as well ;)
- icebraining 13y agoYou're not solving the problem, you're just pushing it out to the steps that get the right tgz files to /dir and claiming it's magically solved. If that step fails, how is upgradepkg going to work?
- peterwwillis 13y agoAll apt-get does is download the right .deb files from /dir and attempt to install them. They can be just as messed up or incorrect as a tgz file, in which case if the .deb files are messed up, installation fails. So both cases are identical in respect to the steps required before install. The difference is, upgradepkg will virtually never fail on install, while apt-get has about a hundred things that can fail on install. Apt-get gives you some insurance in that it (mostly) won't screw up your system if you try to do something wrong. But it also adds levels of complexity that can make it very difficult to get anything done, even if you know what you're doing. Both systems will work, but only one is more likely to do what you want it to do without extra effort. And just besides maintenance woes, it's much more difficult to recover a broken apt system than it is to recover an installpkg system. If you ask an admin "What's more likely to succeed: rsync and upgradepkg, or apt-get", the answer is the former, because the level of complexity of the operations is so much smaller. As long as your packages are correct, everything else is determined to succeed. With apt-get, you have many more conditions to pass before you get success.
- icebraining 13y agoWhat are the hundreds of things that apt-get (or actually, dpkg, which is the software that actually installs debs) does that can fail? Dpkg isn't that complicated.
- __david__ 13y ago> The difference is, upgradepkg will virtually never fail on install, while apt-get has about a hundred things that can fail on install. That's because dpkg does more. It's designed to ask you questions interactively when configs change and get you to look at things. If you ignore config files and just blindly install new binaries (even yum/rpm do this!) then you end up with an upgrade that "worked" except that the new binaries won't run at all because the config files are now invalid. Failing silently like that is hardly better. I would say it's objectively worse.