This is a very, very thorough look at developing a package manager, laying out all of the different options one can take.