Tuesday, June 02, 2009

Screen shots in the package manager

I’ve been doing some thinking about what would make Mandriva stand out and also what could help Linux distributions in general.   I think that although rpmdrake is pretty good, it has room for improvement.   Two features I am thinking of are screenshots of packages that are graphical and ways for end users to provide feedback about packages.

Here, I want to talk about my ideas for screenshots:

Requirements I’ve thought of:

  • Stored in srpms and owned by the package maintainer
  • Available from the mirrors for the package manager application like rpmdrake
  • Ability to be shared by other distributions
  • Everyday users able to submit screen shots to package maintainers
  • Easy to add to packages
  • Multiple screen shots per package, including where multiple packages are created from a single srpm.
  • Min/Max resolutions

To meet these, I see that this should be done starting from the bottom, which is how to store screenshots.  I’d like suggestions on the best way go about storing them is adding a “Screenshot0: filename.png” field to rpm, so that spec files can list screenshots, which would be included in the SOURCES directory the same as Sources and Patchs are.   The Screenshot[num]: fields should be able to be in multiple %package sections.

I’d invision that these screenshots should then be packaged and included in the generated src.rpm when the rpm is built.   I don’t see the need to include the screenshot in binary packages, as see this as un-necceary because users don’t need screenshot of installed packages, and including them would make packages bigger than they need to be.

So, these steps would involve changes to rpm,  rpmbuild and rpm-lint.  So far, these changes could be used for any rpm based distro.  I think that Fedora, OpenSuse and others will eventually also want screenshots for applications.  Advantages of the Screenshot field in the spec files is that automated tools can understand this and extract/update screenshots as needed.

The next stage I would see is the ability to get these screenshots onto the repositories.  To achieve this, I see that whatever tool is used to generate meta data for the package management tool would need to be updated to support generating a directory full of screenshots at different sizes, extracted from srpms.  In Mandriva’s case, modifications to genhdlist2.  I would expect it to extract full size screenshots from a directory of SRPMS and create a directory structure with screenshots for each package at various resolutions.  These would then be mirrored to repositories along with the hdlists.

The last piece of this puzzle would be to update rpmdrake to check for available screenshots and display them when a package is selected.  It would need to download them in the background from the same mirror as package and only if the a working internet connection.

This leaves a few features I’d like to see, but is the basic infrastrucre I’ve been thinking of.  With these in place, I’d then provide a way for users to submit screenshots to maintainers via a web based interface linked to from rpmdrake.  A maintainer could then see the associated screenshot and if it’s ok, have the tool automatically update the spec file and commit it to SVN in Mandriva’s repository.

I’d also invisiage distributions like Mandriva would probally have a web based package browser that would include these screenshots and a simple way for a user to trigger the installation from the web page.  The web based version may also include other ways for the user to provide feedback about packages, which I’ll discuss in a later post.

6 comments:

Anonymous said...

Debian's Synaptic already has that... but it is useless AMHO :

- too small to see anything
- it doesn't replace the real test of an application.

But you are right that rpmdrake is THE thing to improve : it is where most of my users need help.

rdalverny said...

Nice idea.

We've been scratching the surface about this when we worked on Kiosk a few years ago.

Actually, for this, as well as for a comment/review system, a full web-based solution would be a better solution:
- lighter to setup and release (without having to change repositories infrastructure)
- easier to integrate with social behaviours (comments & reviews of course, but submissions and fixes as well as translations),
- easier to integrate with 3rd parties web apps.

I'm pretty confident that rpmdrake successor ought to be a mashup of local web services (as a urpmi interface) and remote web services (as for screenshots, reviews, comments, usage, etc.).

Unknown said...

RPMDrake not only needs an overhaul, it needs replaced. Simply put, it's too simplistic to be truly useful to those of us that know our way around, and almost a slap in the face to new users because it dumbs them down so much. Also, URMPI, which is the backend of RPMDrake, is not only a PITA to add repositories, it's ridiculously slow.

Synaptic is far better. It's a Swiss Army knife, yet it's very simple to use. This is why PCLinuxOS has adopted it. Also, with the popularity of Ubuntu, it and it's backend Apt are familiar to those venturing out from Ubuntu.

In the end, I'm betting on most major distros moving to PackageKit and its Gnome and KDE front ends Gnome-Packagekit and KPackagekit, respectively. It seems to be very promising. Fedora and Kubuntu have already adopted it.

Unknown said...

This is a great idea. I am only a user but think this would have been very useful when I started using linux. Also, why not "screenshots" of text based programs? Many of them are what gives linux an advantage over windows. Just because they are not point and click doesn't mean they shouldn't be made easy to learn about.

Glen said...

In feedback to comments so far:

1. Screenshots of text based applications.. Sure.

2. Debian screen shots: Interesting, I was not aware they did this. Screen shots in debian work by using a central website: http://screenshots.debian.net/

Synaptic then tries to download the screen shot and thumbnail from a central server.

I prefer a decentralized approach having screenshots on mirrors, and even possibly other media.

I also see these as part of a package, so should be able to be maintained by the package maintainer.

Romain: yes, I agree that the successor to rpmdrake will be a mashup of components.

I am sure the is lots of people wanting to use synaptic, smart and other package management tools. I am interested in the infrastructure behind these tools and making incremental improvements, so don't want to get into a debate as to which one is better.

Anonymous said...

Screenshots should definitely not be in the SRPM files. They don't have anything to do with building the package, so it makes no sense to bloat the SRPMs with screenshots.

Instead, they should be in the Mandriva subversion repository. From there, some automatic script, can publish them on a web server.