getting the code

$ bzr branch lp:oneconf
$ vim oneconf/misc/com.ubuntu.OneConf.service
-> edit to point to your oneconf-service file
$ sudo cp oneconf/misc/com.ubuntu.OneConf.service /usr/share/dbus-1/services/

testing and listing

first update

in your oneconf directory:

$ ./oneconf-query -u

this will update the list of installed package on your host (and register your host in oneconf too)

check apps and codec

get the list of registered and apps/codec in couchdb

$ ./oneconf-query
(this is equivalent to: ./oneconf-query -ls)

This should list packages that you care about. The selection is done: * package that is manually installed, not auto installed. * on package which ships something in /{,s}bin /usr/{,s}bin, or a desktop file * packages that aren't -dev package * packages that aren't in the default installation of one installed metapackage (like ubuntu-desktop, ubuntu-netbook, and so on…) * it adds some packages in the white list like well known codec * important metapackage (ubuntu-desktop/ubuntu-netbook…) are listed too

Note that this commands takes package which are recored in couchdb, if you install/uninstall package, to see it the list, you should use ./oneconf-query -u before again

There are some heuristic (for instance, we take all deps/recommends of ubuntu-desktop and other installed metapackage to tell "this is default"). But we can't handle aaa | bbb (both aaa and bbb will be considered as default). So, a false positive default list has been settled.

Do not hesitate to open a bug against oneconf (https://bugs.launchpad.net/oneconf) for all false positives or all missing apps/codec you think people want to see on the list.

check all packages

$ ./oneconf-query -la

This will list all installed and removed packages (since first update) with the date of the action.

registering another host

Just run:

$ ./oneconf-query -u

there too Smile :)

hosts management

To get a comparison with other hosts, you have first to ensure that the "foreign" host is available on your local desktopcouch:

$ ./oneconf-query -l --hosts

You will get the list of all available hosts and their hostid (unique identifier). You can then use all previous commands with --hostname <hostname> or --hostid <hostid>.

In case of more than one host having the same hostname (so, two different hostid corresponding to a hostname), --hostname will fail and will ask for an explicit --hostid

To know which is the current host:

$ ./oneconf-query -l --host

comparing the list of application between two hosts

Automated list of relevant packages

Here are things that will be interesting, once your are ensure that hostname is synchronized locally:

$ ./oneconf-query -d --hostname <hostname>
(This is equivalent to ./oneconf-query -ds --hostname <hostname>

This will first compute the list of installed packages (to not enforce ./oneconf-query -u before comparison).

Then, this will print the list of all installed applications/codec/metapackage (as defined before) that are not installed locally, and those that Here is an example of the output:

$ ./oneconf-query -d --hostid AAAAA
Additional packages: (package to install)
  mencoder: added on Fri, 28 May 2010 22:02:37
  kiki: added on Fri, 28 May 2010 22:08:05
  gstreamer0.10-plugins-bad: added on Fri, 28 May 2010 22:02:37
Missing packages: (package to remove)
  gnome-network-admin: Removed on Fri, 28 May 2010 21:45:29
  dh-autoreconf: has never been present remotely

The "Additional packages" are packages that are installed locally and not on AAAAA. The <added on> means that those package have been installed locally on… The "Missing packages" are packages that are installed on AAAAA and not locally. The reason can be either "has never been present remotely" or "removed on…"

Note that the compute list of locally installed package are kept in cache, so if you install one and relaunch (using the dbus service) immediately the request, you won't have it. Use either --nocache or wait for one minute before relaunching the request.

The case where packages became autoinstalled (aptitude/apt-mark) or are no more part of the default is also handled.

List of all applications

You can get a list of all non autoinstalled packages diff by spawning instead:

$ ./oneconf-query -da --hostname <hostname>

Well, the list here can be not relevant at all Smile :)


general info

oneconf-query use the dbus interface which launch oneconf-service to answer to dbus requests.

This service turns into a desktop daemon and will stop after at least 30s of inactivity (each commands will give it back 30s of grace period). It enables also caching some info to make consequent call faster (just try ./oneconf-query -diff --hostname <...> twice). If you want to avoid the cache, (because you just installed a new package and want to relaunch in less than one minute), you can use --nocache.

If no oneconf-service daemon is running, you can launch it manually:

$ ./oneconf-query

and even add --debug to get more info. This daemon will have the same timelife rule that the one activated by Dbus. You will just get directly the output.

avoid using the dbus interface

In case of trouble, it's possible to not use the oneconf-service daemon and make direct call. For that, add:


to all your commands.

Note that using --debug with ./oneconf-query will implicitely use --direct to get all the debug trace.


oneconf-query help:

$ ./oneconf-query --help
Usage: oneconf-query [options]

  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -d, --diff            Current diff between this machine and another provided
                        by hostname/hostid
  -l, --list            List stored package or host lists (default)
  -u, --update          update the package list in couchdb
  --debug               enable debug mode (use --direct)
  --direct              don't use dbus for the request
  --nocache             ignore cache (for diff command)

  Scope of actions::
    This define the scope to consider for list and diff command.

    -s, --selection     apps and codec manually installed, not present by
                        default (default)
    -a, --all           get all relevant packages from storage
    --hosts             all available hosts from storage (only with list)
    --host              This host (only with list)

  Host management::
    Thoses options can't be used together and only concerns diff and list
    actions. List hosts to get registered strings.

                        specify target host
    --hostid=HOSTID     specify target host

oneconf-service help:

$ ./oneconf-service --help
Usage: oneconf-service [options]

  --version   show program's version number and exit
  -h, --help  show this help message and exit
  --debug     enable debug mode

OneConf/Testing (last edited 2010-06-08 18:11:12 by pool-71-174-55-121)