As part of GSoC 2008, Shishir Goel added Service Pack functionality to PackageKit. To explain what a service pack is, it’s best to show a few use-cases.
- You have seven desktops you’ve just installed with Fedora 9. Each one needs to have 204Mb of updates installed.
- You have a laptop that needs network drivers before it can download updates, and you have a similar up to date laptop with internet access nearby. The network drivers require a ton of dependencies, and other packages to be upgraded before they will install.
- You frequently install Linux on other peoples computers. You carry around a live-cd and a pendrive with a single 204Mb file “Fedora-updates-SP1.servicepack” which contains all the updates since last week.
Now, you may or may not know, that you have been able to install .servicepack files since PackageKit 0.3.2 — but creating them has always been tricky. Yesterday I spent a few hours rewriting some of the client code, and making the pkgenpack command line options more sane.
The pkgenpack is a command line tool for creating service pack files. You can find out more information about how it works by reading the man page.
Yes, I know the man page formatting sucks, suggestions on how to fix (and patches!) welcome.
Internally, the pack file is just an uncompressed tarball, with the packages and a single metadata.conf file inside. The metadata file is just the distro_id (name, version, arch, etc) and the time of creation. This ensures you don’t try installing a fedora-9-i386 service pack on a ubuntu-intrepid-ppc machine. In this case you also get a nice error message telling you what you did wrong.
Now, command line tools are all the rage these days, but what about a GUI? I mocked this up in glade yesterday, and wouldn’t take too long to turn into an actual program.