4 ms·
Yes, by design, it's a package manager. Rather than bundle dependencies such as libraries, they're pulled in system-wide and dynamically linked. This preserves
by paavoova 8y ago
Yes, by design, it's a package manager. Rather than bundle dependencies such as libraries, they're pulled in system-wide and dynamically linked. This preserves both flash and memory space on embedded systems, which with consumer routers are fairly constrained. My router has 16MiB of flash and 128MiB of RAM, and that is more or less typical for consumer non-x86 routers.
Likewise, uninstalling via a package manager handles orphaned dependencies automatically for you.
> How often do you want to go messing with your router
That's the thing when you're running what is essentially Linux (in the case of OpenWRT): it's not a router, it's an OS and you can manage just like you do any other OS. Your description of "apps" as containers seems to abstract away the OS level and leave you with just some frontend (which is probably running Linux/*BSD underneath) and no control.
- IgorPartola 7y ago> Likewise, uninstalling via a package manager handles orphaned dependencies automatically for you. Yes, and fairies are real, and so is Santa. I wish things were this way, but the reality is that most package managers aren't 100% perfect when it comes to install/uninstall and cleaning up of stuff. opkg is especially bad at it. If you look at how it actually works, the core files of the package are handled by the package manager, which usually (though not always works). But most packages aren't just binary blobs to be moved around. Take something like mysql-server for example. Not only will it install the MySQL binaries, it will also create /var/lib/mysql for all the data, and a few cache dirs as well. It'll also add files to /etc/, /etc/defaults/ and so on. Oh, and after it is installed, it will start the mysqld process. When you try to uninstall this stuff, but default the /var/lib/mysql directory won't be removed. Who knows, you might want the data that's there. Oh and that config file? That's staying too. So if you uninstall and reinstall mysql-server because something went bad, you'll just get the same config and data. Is that what you really wanted? You can of course do something like `apt autoremove --purge mysql-server` and that'll mostly work, assuming that mysqld isn't frozen, at which point the pre-remove script fails to kill it and you suddenly are left with a system with an inconsistent state. Last I checked, opkg didn't even have a purge option. And it doesn't stop there. The pre/post install/uninstall scripts can do whatever they want, and if they error out, you again are left with a mess you will be cleaning up by hand. I have done this on many distros many times and it is always a mess. apt/dpkg are one of the better systems out there. The rest? They will make you want to nuke whatever device you are working on from orbit. I am not on the "containers for everything" bandwagon, but the idea that opkg is somehow comparable in this case is laughable.