git clone git://people.freedesktop.org/~hughsient/PackageKit
Patches accepted. Thanks.
edit: Now git clone git://anongit.freedesktop.org/git/packagekit
git clone git://people.freedesktop.org/~hughsient/PackageKit
Patches accepted. Thanks.
edit: Now git clone git://anongit.freedesktop.org/git/packagekit
Work on PackageKit continues. The new manager application has lots of human-unfriendly options now, but allows people to experiment with all the features and more importantly allow people to look at the code and work out how to port their app to support PackageKit.
There's quite a few API additions now also, with different search modes and also error codes and descriptions. The API will grow some more soon also, to get the extended description of a package along with a URL and any further information not contained in the summary. Then I think it's complete.
I've now split the dummy and yum backends, so in theory the yum backend could be soon complete. I'm adding the yum scripts as skvidal is kindly writing them, and hopefully everything should soon be in place for the other backends.
So, answering some FAQ's (I've had hundreds of emails about PK in the last 2 weeks):
So, good things.
PackageKit now has an update applet and application installer. This demo-application will win no awards for UI design, but the idea is to show how easy it is to make an async frontend for the provided dbus interface.
Also, the trivial update icon runs once per active session, and communicates with a single system instance of PackageKit. When the service is needed it is activated using dbus system activation, and when it's doing nothing the system daemon quits.
This means we can queue multi-session updates and installs. For instance I can start an update in my user session, switch to my girlfriends session, and then search for pidgin, and queue the install. The install will start when my update has completed. Maybe a more useful situation would be for the gdm login to start doing the daily updates before a user even logs in. OpenOffice could install language packs in the background as soon as you start typing in a new language. Lots of fun stuff.
Of course very little of this actually works properly. The dummy backend does mostly the right thing, and the apt and yum backends can search, but I still need to do the rest of the actions. The PolicyKit bit is still to be done.
So, good things.
What I've done:
What's left to do:
So basically the idea works. Or at least I've not come up against any insurmountable problems so far. Expect the code to hit fd.o in the next week or so when I've polished up the hacks and got rid of a few FIXME's.
I'm away from an Internet connection for the next few days, so if you send me mail it will take me a few days to reply.
PackageKit is the name of the system package abstraction. Why PackageKit? Well, I was getting jealous of all the other cool stuff happening with daemons ending in Kit and wanted my own. And, if I type the word “manager” once again I'm going to have to rip my hands from my arms. :-)
There is a wiki page with all the use cases so far and some UI designs. Feel free to add comments or suggestions at the end of the page.
I've spent most of today working out a asynchronous DBUS API that can work with all of the use-cases, and starting a system activated daemon that can manage the sequential jobs. The daemon now 80% works, and I'm just writing a “dummy” backend with a “do nothing but take time doing it” role for testing. The other backends (yum/apt) are in the source tree but are currently empty files.
I only know a little about APT, so now I need your help. I need a way of searching for installed and not-installed software. I think I need either:
The output would ideally be one line per entry:
gnome-power-manager<tab>GNOME Power Manager<tab>GNOME Power Manager is a system daemon that eats lots of power
power-pacman<tab>Power Pacman<tab>Power Pacman is a cool game where a dot eats other dots
The same thing for YUM would also be great as well, although I'm focusing on the apt backend first as I think it's the easier target for now. Thanks!
How about these as UI designs? Click for a bigger image. I'm no UI design guru (and I was advised not to do art for GSCE…), so please complain loudly if you don't agree or have better suggestions. When we've got a simple GUI fleshed out we can work towards user interactions and how to use an API. Thanks.
Before we talk about API and system requirements we should talk about use cases and system interactions. I think this is where update systems have gone wrong in the past, closely integrating with the existing package system rather than studying the complete ideal user interactions.
Feel free to disagree and correct the interactions – either email me or preferably leave a comment.
Boot Time Security Update
Toby logs into his GNOME desktop. A notification area icon with a critical icon appears in the top right and a libnotify popup tells him there are 3 three critical security updates. The libnotify popup has three buttons:
Toby clicks the first button and the update completes in the background. When completed, after a few minutes, another libnotify popup appears telling Toby that the update was completed and after a few seconds the status icon disappears.
Downloading an Unknown Application
Suzanne wants to open a word file. She opens the software finder tool and types “office file” into the search box. A list of software appears, with OpenOffice being the top entry. She clicks the OpenOffice entry to highlight it, and clicks “Install now”. Suzanne is not an administrator, but because she is locally logged in and the package is from the “distro core signed repository” the root password is not required. A notification area icon appears with a downloading icon and the package manager is closed. When OpenOffice is installed, a libnotify popup tells Suzanne that the software has been downloaded and is now ready to use.
Installing debuginfo files automatically
Simon wants to borrow the computer while Suzanne waits for OpenOffice to download. He uses fast-user switching to switch to a new login. He notices the same downloading icon in his session which indicates Suzannes' download is still in progress. He starts Pidgin which then crashes. The bug-buddy window appears which prompts him to install the debuginfo so a valid backtrace can be detected. He clicks yes, and a libnotify windows appears telling Simon that the request has been queued and that he will be notified when the debuginfo has been installed. When installed, the bug-buddy helper continues and submits a valid bug.
Installing new features
Suzanne switches back to her session and wants to add some clipart to the word file she has just opened. She clicks “Insert” and then “Clipart” and then a windows pops up telling her that clipart is not installed. She clicks “Install” and a progress bar appears and moves across as the clipart is downloaded and then installs. When finished, the dialog disappears and she chooses a picture of a cat.
Installing and updating software is a really crap experience in most of the Linux distributions that I've used. Problems:
Don't get me wrong, apt is fantastic, yum is still pretty good, but the user experience is utter crap. Ubuntu are the clear winners so far, but still fail on many issues outlines above. The first thing I do when installing fedora is uninstall pup and yum-updatesd, as they are just too broken for me to use. So rant over. What should we do about it? Package management as a system service. Yes, per system. When you install packages you do it as a the root user, usually for all users so it makes sense to do this in the system context. Using the new system activation stuff also allows us to start the service only when it is actually needed, i.e. when someone is trying to install something, or there is a logged in user who wants updates. APT, yum, portage etc as backends Yes, so users can still drop to a root shell and use the full command set of the native tool, but common stuff is abstracted over nice abstract interfaces. DBUS API? Sure, then we can lock it down per user or per group on interface type, so for instance let all users in the admin group install and remove packages, but only let students query packages. Common tools? YES!! We choose best of breed. We have one GNOME upstream update watcher (the ubuntu one is very good) we have one GNOME software install tool for power users (synaptic is very, very good) and also a GNOME tool for end users. The ubuntu simple application chooser is also very good. Details? Remember this is just designed for common stuff, rather than abstract every little detail of the underlying backend. These are my ramblings so far:
org.freedesktop.PackageManagement.Query as=FindPackages(s) throws NotFound() i=GetInstalledVersion (s) throws NotInstalled() as=GetOptionalDependencies(s) throws NotFound() as=GetSuggestedDependencies(s) throws NotFound() as=GetForcedDependencies(s) throws NotFound() org.freedesktop.PackageManagement.Manage b=RemovePackages (as) throws OtherPackagesDepend(as), NotFound() bas=RemovePackagesWithDependencies (as), NotFound(as) b=InstallPackages(as) throws NotFound(as), DependenciesNotSatisfied(as) bas=InstallPackagesWithDependencies(as) throws NotFound(as) ::RemovedPackages(as) ::InstalledPackages(as) org.freedesktop.PackageManagement.Update b=IsThereUpdates(i) a(sis)=GetUpdates() throws NoUpdates() b=UpdateSystem() throws NoUpdates() ::NewUpdates(a(sis))
Where to go from here? I don't know. One thing I don't know how to fix is the callbacks for percentage completeness. Do we have to make the API asynchronous? Is there interest in fixing this stuff? Am I the only person who thinks the current bodges are insufficient for the Linux Desktop of the future? Please, leave comments (or email me) with any suggestions, corrections, or insults. Thanks.
I've just pushed 27 patches into DBUS head for system activation. Design document here. As usual, rpm's will be in my repo. Various people now owe me beers.
I'm soon moving out and don't want to lug around my 15″ TV. I've got a 17″ widescreen laptop, so I figure I can use that for TV and Xbox. I need a USB dongle that does digital TV, and that I can connect to composite video and phono stereo audio (for the XBox). Any ideas of something that will work with Linux? Thanks.