AptFirefoxFileHandler

Revision 4 as of 2007-05-10 12:57:57

Clear message

Please check the status of this specification in Launchpad before editing it. If it is Approved, contact the Assignee or another knowledgeable person before making changes.

Implementation

* First at all, Firefox (or default browser) must be tweaked to recognize a new (invented) apt:// protocol. * When an apt:// url is clicked a piece of software must be triggered. Browser will pass the url to this application. * The application will call synaptic with a few parameters to download and install the package, including dependencies (/usr/sbin/synaptic --hide-main-window --non-interactive --set-selections-file /tmp/apt-packagename.tmp)

In Guadalinex, we have modified /usr/lib/firefox/firefox.cfg, and added a dirty perl script to parse the url, and call synaptic.

Move the changes into /usr/share/firefox/defaults/prefs/apt-archive-handler.js as an additional configuration file. The whole thing should be a new package with some python clue code (maybe a modification of gdebi???)that will display information about the package and offer a dialog to install it. For installing synaptic will used as a backend.

Outstanding Issues

- If a user is using a distribution, Debian for example, and the web points to a package that exists in ubuntu but not in debian, the script will fail. It has to notify the users that something went wrong. - Action suggestions:

  • Install Packages (apt://vim) or (apt://vim:install)

  • Install specific versions of package (apt://install:vim=1.2.3)

  • Add a new repository, i.e., PPA (apt://repository:deb http://ppa.launchpad.net/cprov/ubuntu main restricted universe multiverse)

  • How do you control "evil" uses of this? It's the same thing if anybody tells an newbye to execute "rm -rf", we cannot control that. But the user is not executing this, it's been automatically written in /etc/apt/sources.list. Well, the user must give his authorization to every change, and also his password.Ok
  • Update package list: apt://update

  • Upgrade and dist-upgrade distro: apt://upgrade apt://dist-upgrade

  • Remove a package: apt://emacs:remove

  • very important that we keep backward compatibility with the schema from guadalinex
  • the primary target is the package, the first argument is always the package name, then more commands can be added after the
    • first ";"

BoF agenda and discussion

Guadalinex svn:

svn co http://forja.guadalinex.org/guadalinexv4/apps/xapi


CategorySpec