If you have installed a program in Windows, you know it's hard. You need the .NET framework, the C++ redistributable from a certain year, maybe even an external framework.
Well, a similar thing happens when you try to install something in Linux without a package manager. At least if you have one, sometimes you can use --fix-missing or equivalent.
But what if you were to create a package manager?
The dependency hell starts, and it hits hard.
I was doing pat (Package Assistant Tool) for my distro, but I didn't knew how to start; All I knew was how package managers worked, to the end user .
- Check if a package exists
- Check dependencies
- Check if they exist
- Check their dependencies
- Check if they exist
- Repeat 3, 4 and 5 until everything satisfies
- Install the package
Seems reasonable enough, untill you realise how hard it actually is. Because you can't just do step 6 infinitely, the dependencies have to stop, right?
Well, there is this thing called "Circular Dependencies" where a program has a dependency of another, and that other has a dependency of the first. Or, you know, some loop of unkown size.
That was just the beggining of an endless program.
Comments
No comments yet. Be the first to react!