pkcon list-install foo.package-list

In newer versions of gnome-packagekit there’s a tool called gpk-service-pack:

Service Pack Creator
Service Pack Creator

This tool I’ve explained in the past, and there is now lots of information and diagrams in the help file about how it all works and what the point of the tool is. Anyway, the point of this blog post isn’t to promote service packs; it’s to scratch an itch that I see coming up when Fedora 10 is released.

The tool exposed one detail to the user: a package list.

This is a simple text file such as hughsie-laptop-f9.package-list. This file allows tools to operate on other similar computers with different packages installed. It’s really just a simple list of all the packages installed. It’s contents and format are unimportant for now as it lets you do some cool stuff.

My personal situation, right now: I’m running a F9/F10/rawhide-ish laptop that I’ve been running for a few months, installing packages using yum, rpm and PackageKit, and have now got all the packages I need for building all my stuff, and all the programs I need on a day-to-day basis.
When F10 comes out, I normally nuke / and reinstall from the live CD as I’ve got so much cruft and brokenness from the months of a rawhide development cycle. On the first boot, I run:

yum -Y install <paste long list of packages from a tomboy note that's got bigger over the years>

Now, what I need is an admin tools that says:

  1. Capture all the package names on my old system
  2. Show me all the differences between what I had then, and what I have now
  3. Use the old package list to install all my normal stuff, not specifying versions

So, two hours of hacking later:

  1. pkcon list-create hughsie-laptop-f9.package-list
  2. pkcon list-diff hughsie-laptop-f9.package-list
  3. pkcon list-install hughsie-laptop-f9.package-list

I know I can do some of step 3 using a custom kickstart if I wanted, but I normally don’t know what I install manually. Maybe it’s only me that’ll find this useful. Code is in git. itch2scratch–;