I am looking for a guide on one of Linux Package manager architectures. For example apt-get (dpkg), or yum (rpm). I want to know how they manage the package list, file list, package versions and so on.
2 Answers
Well yum is rpm based - http://en.wikipedia.org/wiki/RPM_Package_Manager
And apt is (typically) deb based - http://en.wikipedia.org/wiki/Deb_%28file_format%29
There are links from both of those pages that explain more
-
That in no way answers what Ako was asking. What he was interested was a set of UML diagrams or ADL or anything that describe how the package managers are laid out, they Physical view, logical view ....– chutsuMar 16, 2012 at 10:10
-
-
"I am looking for a guide on one of Linux Package manager architectures", I'm not sure how else you would represent the architecture other than using UML or ADLs...– chutsuMay 12, 2012 at 15:33
-
Well, those diagrams don't exist, so the only option is to look at the package format & manager documentation & source code.– jamespoMay 16, 2012 at 9:57
Yum is RPM based and is completely written in Python.
Yum or RPM maintains a database (Berkley DB) usually in "/var/lib/rpm".
The database path is "/var/lib/rpm/Packages".
See below:
[root@ec092 rpm]# pwd
/var/lib/rpm
[root@ec092 rpm]# file Packages
Packages: Berkeley DB (Hash, version 8, native byte-order)
when you use the commands like rpm -qa
it queries the Packages DB and it maintains all the attributes like package list, file list, package versions and so on.
Ubuntu's apt-get is written in C++ and is somewhat complex.
pacman
determines differences between version numbers, I know that you could get a really complicated answer just asking that (a full page of text at least). I'd personally prefer it if you split this question up and ask more specifically what you want on each package manager, and were more specific about what exactly you want to know.