aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/aptd.154
-rw-r--r--doc/aptdcon.195
-rw-r--r--doc/examples/chained.py47
-rw-r--r--doc/org.debian.apt.7238
-rw-r--r--doc/org.debian.apt.transaction.7220
-rw-r--r--doc/source/_ext/signals.py20
-rw-r--r--doc/source/aptdaemon.client.rst134
-rw-r--r--doc/source/aptdaemon.enums.rst5
-rw-r--r--doc/source/aptdaemon.gtk3widgets.rst5
-rw-r--r--doc/source/conf.py199
-rw-r--r--doc/source/dbus.rst410
-rw-r--r--doc/source/index.rst22
-rw-r--r--doc/source/plugins.rst68
13 files changed, 1517 insertions, 0 deletions
diff --git a/doc/aptd.1 b/doc/aptd.1
new file mode 100644
index 0000000..438cdfb
--- /dev/null
+++ b/doc/aptd.1
@@ -0,0 +1,54 @@
+.\" groff -man -Tascii foo.1
+.TH APTD 1 "December 2009" aptdaemon "User manual"
+.SH NAME
+aptd \- package managing daemon proving a D-Bus interface
+.SH SYNOPSIS
+.B aptd
+.RI [ OPTIONS ]
+.SH DESCRIPTION
+.B aptd
+allows to perform package management tasks, e.g. installing or removing
+software, using a D-Bus interface. The privileges are handled by PolicyKit
+so the client application doesn't need to run as root. Furthermore aptd is
+started by D-Bus activation only when an user calls a method.
+.SH OPTIONS
+.IP "-d, --debug"
+Show additional information on the command line.
+.IP "-h, --help"
+Show information about the usage of the command.
+.IP "-r, --replace"
+Replace another aptd instance if it is running.
+.IP "-p PROFILE_FILE"
+Write profiling data to
+.I PROFILE_FILE
+using Python's profiler. This is only of use to developers.
+.IP "-t, --disable-timeout"
+Do not shutdown the daemon after an idle time.
+.IP "--dummy"
+Instead of applying the changes to the system only show a progress. This option is only usable for developers to locate problems in client applications.
+.SH FILES
+.TP
+.I /etc/apt/apt.conf.d/20dbus
+Adds a small post update hook which will emit the org.debian.apt.CacheChanged signal on the system D-Bus to indicate that the cache has been changed and a possible running aptd instance should reloade its internal cache.
+.TP
+.I /usr/share/polkit-1/actions/org.debian.apt.policy
+The PolicyKit definitions of the privileges used by aptdaemon, e.g. to install packages. To change the privileges please have a look at
+.BR PolicyKit.conf (1).
+.TP
+.I /etc/dbus-1/system.d/org.debian.apt.conf
+The D-Bus configuration of the org.debian.apt name space.
+.SH DIAGNOSTICS
+By default aptdaemon logs to the syslog facility AptDaemon. Furthermore you
+can use the -d option to get additional information on the command line.
+.SH HOMEPAGE
+https://launchpad.net/aptdaemon
+.SH BUGS
+You can report bugs at the Launchpad site of aptdaemon:
+https://bugs.launchpad.net/aptdaemon/+filebug
+.SH AUTHOR
+Sebastian Heinlein <devel at glatzor dot de>
+.SH SEE ALSO
+.BR aptdcon (1),
+.BR org.debian.apt (7),
+.BR org.debian.apt.transaction (7),
+.BR PolicyKit.conf (7)
diff --git a/doc/aptdcon.1 b/doc/aptdcon.1
new file mode 100644
index 0000000..77fa8a0
--- /dev/null
+++ b/doc/aptdcon.1
@@ -0,0 +1,95 @@
+.\" groff -man -Tascii foo.1
+.TH APTDCON 1 "December 2009" aptdaemon "User manual"
+.SH NAME
+aptdcon \- command line client for aptdaemon
+.SH SYNOPSIS
+.B aptdcon
+.RI [ OPTIONS ]
+.SH DESCRIPTION
+.B aptdcon
+allows to perform package management tasks, e.g. installing or removing
+software, using aptdaemon. There isn't any need to be root to run this
+programme.
+.SH OPTIONS
+.IP "-v, --version"
+Show the version number of the aptdcon.
+.IP "-h, --help"
+Show information about the usage of the command.
+.IP "-d, --debug"
+Show additional information on the command line.
+.IP "-i, --install PACKAGES"
+Install the list of PACKAGES. If you want to install more than one package you have to put the package names into quotation marks.
+.IP "--reinstall PACKAGES"
+Reinstall the list of PACKAGES. If you want to reinstall more than one package you have to put the package names into quotation marks.
+.IP "-r, --remove PACKAGES"
+Remove the list of PACKAGES. If you want to remove more than one package you have to put the package names into quotation marks.
+.IP "-p, --purge PACKAGES"
+Purge the list of PACKAGES. If you want to purge more than one package you have to put the package names into quotation marks.
+.IP "-u, --upgrade PACKAGES"
+Upgrade the list of PACKAGES. If you want to upgrade more than one package you have to put the package names into quotation marks.
+.IP --upgrade-system
+Upgrade the whole system.
+.IP --fix-install
+Try to complete a previously cancelled installation by calling "dpkg --configure -a".
+.IP --fix-depends
+Try to resolve unsatisified dependencies. Attention: Currently you don't get a confirmation of the changes, which makes this method quite dangerous since it could remove a lot of packages.
+.IP "--add-vendor-key PUBLIC_KEY_FILE"
+Install the PUBLIC_KEY_FILE to authenticate and trust packages singed by the
+vendor.
+.IP "--add-vendor-key-from-keyserver PUBLIC_KEY_ID"
+Download and install the PUBLIC_KEY_ID to authenticate and trust packages
+singed by the vendor. Requires the --keyserver to be set.
+.IP "--key-server KEYSERVER"
+Download vendor keys from the given KEYSERVER.
+.IP "--remove-vendor-key FINGERPRINT"
+Remove the vendor key of the given FINGERPRINT to no longer trust packages
+from this vendor.
+.IP "--add-repository \'DEB_LINE\'"
+Allow to install software from the repository specified by the given
+DEB_LINE. You have to put quotation marks around the DEB_LINE since it
+normally contains spaces:
+.I \'deb http://ftp.de.debian.org/debian unstable main\'
+.IP "--sources-file SOURCES_FILE"
+Specify an alternative sources file to which the new repository should be
+written. SOURCES_FILE should be only the basename:
+.I backports.list
+.IP --list-trusted-vendors
+Show all trusted software vendors and theirs keys.
+.IP --hide-terminal
+Do not attach to the interactive terminal of the underlying dpkg call.
+.IP --allow-unauthenticated
+Allow to install packages which are not from a trusted vendor.
+.SH EXAMPLES
+The following command will install the package xterm and remove the package eterm in the same run:
+.RS
+$ aptdcon --install "xterm" --remove "eterm"
+.RE
+.PP
+To handle more than one package the names have to be put into quotation marks. The following command will install xterm and eterm:
+.RS
+$ aptdcon --install "xterm eterm"
+.RE
+.PP
+The following command will add the backport repository to the sources.list in
+a separate file
+.I /etc/apt/sources.list.d/backports.list
+:
+.RS
+$ aptdcon --sources-file backports.list \\
+.br
+ --add-repostiry "deb http://archive.backports.org/debian stable main"
+.RE
+.SH DIAGNOSTICS
+By default aptdaemon logs to the syslog facility AptDaemon. Furthermore you
+can use the -d option to get additional information on the command line.
+.SH HOMEPAGE
+https://launchpad.net/aptdaemon
+.SH BUGS
+You can report bugs at the Launchpad site of aptdaemon:
+https://bugs.launchpad.net/aptdaemon/+filebug
+.SH AUTHOR
+Sebastian Heinlein <devel at glatzor dot de>
+.SH SEE ALSO
+.BR aptd (1),
+.BR org.debian.apt (7),
+.BR org.debian.apt.transaction (7)
diff --git a/doc/examples/chained.py b/doc/examples/chained.py
new file mode 100644
index 0000000..3418844
--- /dev/null
+++ b/doc/examples/chained.py
@@ -0,0 +1,47 @@
+#!/usr/bin/python
+
+import dbus
+
+from gi.repository import GLib
+
+from aptdaemon.client import AptClient
+from aptdaemon.defer import inline_callbacks
+from aptdaemon import policykit1
+
+loop = GLib.MainLoop()
+
+def on_finished(trans, exit):
+ loop.quit()
+ print exit
+
+@inline_callbacks
+def main():
+ repo = ["deb", "http://packages.glatzor.de/silly-packages", "sid", ["main"],
+ "Silly packages", "silly.list"]
+ aptclient = AptClient()
+ bus = dbus.SystemBus()
+ name = bus.get_unique_name()
+ # high level auth
+ try:
+ # Preauthentication
+ action = policykit1.PK_ACTION_INSTALL_PURCHASED_PACKAGES
+ flags = policykit1.CHECK_AUTH_ALLOW_USER_INTERACTION
+ yield policykit1.check_authorization_by_name(name, action, flags=flags)
+ # Setting up transactions
+ trans_add = yield aptclient.add_repository(*repo)
+ trans_update = yield aptclient.update_cache("silly.list")
+ trans_inst = yield aptclient.install_packages(["silly-base"])
+ yield trans_inst.set_allow_unauthenticated(True)
+ # Check when the last transaction was done
+ trans_inst.connect("finished", on_finished)
+ # Chaining transactions
+ yield trans_update.run_after(trans_add)
+ yield trans_inst.run_after(trans_update)
+ yield trans_add.run()
+ except Exception as error:
+ print error
+ loop.quit()
+
+if __name__ == "__main__":
+ main()
+ loop.run()
diff --git a/doc/org.debian.apt.7 b/doc/org.debian.apt.7
new file mode 100644
index 0000000..b3bcaf5
--- /dev/null
+++ b/doc/org.debian.apt.7
@@ -0,0 +1,238 @@
+.\" groff -man -Tascii foo.1
+.TH org.debian.apt 7 "December 2009" "aptdaemon" "D-Bus Interface"
+.SH NAME
+org.debian.apt \- the main interface of aptdaemon
+.SH SYNOPSIS
+The daemon is accessed through the D-Bus object at
+.IR /org/debian/apt .
+Which provides the following interface.
+.SH DESCRIPTION
+.SS METHODS
+.TP
+.B AddRepository
+.BI "AddRepository\t(in 's' " type ","
+.br
+.BI "\t\tin 's' " uri ","
+.br
+.BI "\t\tin 's' " dist ","
+.br
+.BI "\t\tin 'as' " comps ","
+.br
+.BI "\t\tin 's' " comment ","
+.br
+.BI "\t\tin 's' " sourcesfile ")"
+.RS
+.PP
+Add a new repository to the sources list file. The repository has to define the type (e.g. deb or deb-src), uri (e.g. http://archive.debian.org/debian), the distribution (e.g. stable) and a list of components (e.g. main).
+.PP
+Optionally a comment and an alternative sources.list file can be specified.
+.RE
+.TP
+.B EnableDistroComponent
+.BI "EnableDistroComponent\t(in 's' " comp ")"
+.RS
+.PP
+Enable a component for all distro repositories, e.g. main or universe.
+.RE
+.TP
+.B GetTrustedVendorKeys
+.BI "GetTrustedVendorKeys\t(out 'as' " keys )
+.RS
+.PP
+Return the GnuPG keys which are used to authenticate packages.
+.RE
+.TP
+.B GetAtiveTransactions
+.BI "GetActiveTransactions\t(out 'as' " tids )
+.RS
+.PP
+Return an array of the currently queued transactions.
+.RE
+.TP
+.B Quit
+.br
+.BI "Quit\t()"
+.RS
+.PP
+Request the shutdown of the daemon. The daemon will finish a currently running transaction before.
+.RE
+.SS TRANSACTION BASED METHODS
+The following methods are handled by transactions. By calling the methods a new transaction will be created for the task. The return value of the method is the D-Bus object path of the corresponding transaction. The transaction can be modified, to use an http proxy or to run in a specific language by setting the corresponding properties on the
+.BR org.debian.apt.transaction (7)
+interface. Afterwards the transaction has to be queued for processing by calling its Run method on the
+.BR org.debian.apt.transaction (7)
+interface.
+.TP
+.B UpdateCache
+.BI "UpdateCache\t(out 's' " tid )
+.RS
+.PP
+Return the id of a newly created transaction which will fetch the latest meta data from the repositories and rebuild the cache of available and installed packages.
+.RE
+.TP
+.B UpdateCachePartially
+.BI "UpdateCachePartially\t(in 's' " sources_list ,
+.br
+.BI "\t\tout 's' " tid )
+.RS
+.PP
+Return the id of a newly created transaction which will fetch the latest meta data from the repositories specified in the given sources.list snippet only and rebuild the cache of available and installed packages.
+.RE
+.TP
+.B InstallPackages
+.BI "InstallPackages\t(in 'as' " package_names ,
+.br
+.BI "\t\tout 's' " tid )
+.RS
+.PP
+Return the id of a newly created transaction which will install the packages
+of the given names.
+.PP
+Optionally the to be installed version can be specified by
+appending a "=" and the version to the package name, e.g. "xterm=256-1".
+.RE
+.TP
+.B InstallFile
+.BI "InstallFile\t(in 's' " path ,
+.br
+.BI "\t\tout 's' " tid )
+.RS
+.PP
+Return the id of a newly create transaction which will install a local *.deb
+package file at the given
+.IR path .
+.RE
+.TP
+.B UpgradePackages
+.BI "UpgradePackages\t(in 'as' " package_names ,
+.br
+.BI "\t\t\tout 's' " tid )
+.RS
+.PP
+Return the id of a newly created transaction which will upgrade the packages of the given names to their latest version.
+.PP
+Optionally the to be installed version can be specified by
+appending a "=" and the version to the package name, e.g. "xterm=256-1".
+.RE
+.TP
+.B RemovePackages
+.BI "RemovePackages\t(in 'as' " package_names ,
+.br
+.BI "\t\t\tout 's' " tid )
+.RS
+.PP
+Return the id of a newly created transaction which will remove the packages of the given names.
+.PP
+Optionally the version of the to be removed packages can be specified by
+appending a "=" and the version to the package name, e.g. "xterm=256-1".
+.RE
+.TP
+.B UpgradeSystem
+.BI "UpgradeSystem\t(in 'b' " safe_mode ,
+.br
+.BI "\t\tout 's' " tid )
+.RS
+.PP
+Return the id of a newly created transaction which will upgrade the whole system.
+.PP
+If in safe mode only already installed packages will be updated. Updates which require to remove installed packages or to install additional packages will be skipped.
+.RE
+.TP
+.B CommitPackages
+.BI "CommitPackages\t(in 'as' " install ,
+.br
+.BI "\t\t\tin 'as' " reinstall,
+.br
+.BI "\t\t\tin 'as' " remove,
+.br
+.BI "\t\t\tin 'as' " purge,
+.br
+.BI "\t\t\tin 'as' " upgrade ,
+.br
+.BI "\t\t\tin 'as' " downgrade ,
+.br
+.BI "\t\t\tout 's' " tid )
+.RS
+.PP
+Return the id of a newly created transaction which will perform a complex install/removal task at once.
+.IR Install ", " reinstall ", " remove ", " purge " and " upgrade
+are lists of package names.
+.PP
+Optionally the version of the to be removed packages or the version of the
+package which should be installed can be specified by
+appending a "=" and the version to the package name, e.g. "xterm=256-1".
+.RE
+.TP
+.B AddVendorKeyFromFile
+.BI "AddVendorKeyFromFile\t(in 's' " path ,
+.br
+.BI "\t\t\tout 's' " tid )
+.RS
+.PP
+Return the id of a newly created transaction which will install the public GnuPG key at the given
+.I path
+to the list of trusted software vendors. The list will be used to authenticate packages.
+.RE
+.TP
+.B AddVendorKeyFromKeyserver
+.BI "AddVendorKeyFromKeyserver\t(in 's' " keyid ,
+.br
+.BI "\t\t\tin 's' " keyserver,
+.br
+.BI "\t\t\tout 's' " tid )
+.RS
+.PP
+Return the id of a newly created transaction which will download and install the public GnuPG key of the
+.I keyid
+from the given
+.I keyserver
+to the list of trusted software vendors. The list will be used to authenticate packages.
+.RE
+.TP
+.B RemoveVendorKey
+.BI "RemoveVendorKey\t(in 's' " fingerprint ,
+.br
+.BI "\t\t\tout 's' " tid )
+.RS
+.PP
+Return the id of a newly created transaction which will remove the public GnuPG key with the given
+.I fingerprint
+from the list of trusted software vendors. The list will be used to authenticate packages.
+.RE
+.TP
+.B FixBrokenDepends
+.BI "FixBrokenDepends\t(out 's' " tid )
+.RS
+.PP
+Return the id of a newly created transaction which will try to resolve unsatisfied dependencies by installing required packages or removing conflicting ones.
+.RE
+.TP
+.B FixIncompleteInstall
+.BI "FixIncompleteInstall\t(out 's' " tid )
+.RS
+.PP
+Return the id of a newly created transaction which will try to complete previously failed installations by calling "dpkg --configure -a".
+.RE
+.SS SIGNALS
+.TP
+.B ActiveTransactionsChanged
+.BI "ActiveTransactionsChanged\t('s' " active ,
+.br
+.BI "\t\t\t\t'as' " queued )
+.RS
+.PP
+The signal is used to report changes of the currently running or queued
+transactions. If there's any active transaction active will be an empty
+string.
+.RE
+.SH HOMEPAGE
+https://launchpad.net/aptdaemon
+.SH BUGS
+You can report bugs at the Launchpad site of aptdaemon:
+https://bugs.launchpad.net/aptdaemon/+filebug
+.SH AUTHOR
+Sebastian Heinlein <devel at glatzor dot de>
+.SH SEE ALSO
+.BR org.debian.apt.transaction (7),
+.BR aptd (2),
+.BR aptdcon (2)
diff --git a/doc/org.debian.apt.transaction.7 b/doc/org.debian.apt.transaction.7
new file mode 100644
index 0000000..b2b56f6
--- /dev/null
+++ b/doc/org.debian.apt.transaction.7
@@ -0,0 +1,220 @@
+.\" groff -man -Tascii foo.1
+.TH org.debian.apt.transaction 7 "December 2009" "aptdaemon" "D-Bus Interface"
+.SH NAME
+org.debian.apt.transaction \- the main interface of an aptdaemon transaction
+.SH SYNOPSIS
+Each transaction is represented as an unique D-Bus object, e.g. at the D-Bus path
+.IR /or/debian/apt/transaction/12123-123-123213 .
+Which provides the following interface.
+.SH DESCRIPTION
+.SS METHODS
+.TP
+.B ProvideMedium
+.BI "ProvideMedium\t(in 's' " medium )
+.RS
+.PP
+Continue a paused transaction which is waiting for the given
+.IR medium .
+.PP
+If a media change is required to e.g. install packages from a CD/DVD
+the transaction will be paused and the RequiredMedium property changed
+to an array of the
+.IR "medium label" " and its " "mount point" .
+Furthermore the MediumRequired signal will be emitted.
+.RE
+.TP
+.B ResolveConfigFileConflict
+.BI "ResolveConfigFilePrompt\t(in 's' " config ,
+.br
+.BI "\t\t\t\tin 's' " answer )
+.RS
+.PP
+Continue a paused transaction which is waiting for an answer to handle
+a configuration file conflict.
+.I Config
+is the path to the current configuration file and
+.I answer
+can be either "replace" or "keep".
+.PP
+If a later config file is shipped in a package which overrides some
+user modifications the transaction will be paused and the ConfigFileConflict
+property of the transaction will be set to an array of the old and new
+configuration file path. The later one is supposed to replace the former one.
+Furthermore the ConfigFileConflict signal will be emitted.
+.RE
+.TP
+.B Simulate
+.BI "Simulate\t()"
+.RS
+.PP
+Simulate the transaction and calculate dependencies, required disk space and
+download size. If a transaction would fail the corresponding error will be
+raised.
+.RE
+.TP
+.B Run
+.BI "Run\t()"
+.RS
+.PP
+Queue the transaction for processing. Afterwards there cannot be made any further changes to the transaction, e.g. modifing the http proxy.
+.RE
+.TP
+.B Cancel
+.BI "Cancel\t()"
+.RS
+.PP
+Cancel the transaction if possible.
+.RE
+.SS SIGNALS
+.TP
+.B Finished
+.BI "Finished\t('s' " exit_state )
+.RS
+.PP
+The signal will be emitted when the transaction has been processed. The
+.I exit_state
+indicates if the transaction was completed, cancelled or failed.
+.RE
+.TP
+.B MediumRequired
+.BI "MediumRequired\t('s' " label ,
+.br
+.BI "\t\t\t's' " mount_point )
+.RS
+.PP
+The signal will be emitted if the transaction has been paused and waits for a media change to install packages.
+.RE
+.TP
+.B ConfigFileConflict
+.BI "ConfigFileConflict\t('s' " old ,
+.br
+.BI "\t\t\t's' " new )
+.RS
+.PP
+The signal will be emitted if the transaction has been paused because a
+.I new
+configuration file is shipped in a package which would override changes by the
+user in the
+.I old
+configuration file.
+.RE
+.TP
+.B PropertyChanged
+.BI PropertyChanged\t('s' " property_name ,
+.br
+.BI "\t\t\t'v' " value )
+.RS
+.PP
+The signal will be emitted if one of the following properties has changed.
+.RE
+.SS PROPERTIES
+The properties of the transaction are available through the Get And GetAll
+methods of the D-Bus properties interface and can be changed using the
+Set method.
+.TP
+.BR Role " read 's'"
+The role enum of the transaction, e.g. update-cache.
+.TP
+.BR Status " read 's'"
+The current status enum of the transaction, e.g. downloading
+.TP
+.BR StatusDetails " read 's'"
+A clear text message describing the current status.
+.TP
+.BR Progress " read 'i'"
+The progress of the transaction in percent.
+.TP
+.BR ProgressDownload " read 'sssiis'"
+The last download progress information recieved from APT. It is an array
+of the URI, status enum, short description, full size, already downloaded
+size and an error or status message.
+.TP
+.BR Space " read 'i'"
+The additional disk space in Bytes which will be required by the transaction.
+The
+.B Simulate
+method has to be called to calculate the download size.
+.TP
+.BR Download " read 'i'"
+The required download size in Bytes of the transaction.
+The
+.B Simulate
+method has to be called to calculate the download size.
+.TP
+.BR Packages " read 'a(a(s)a(s)a(s)a(s)a(s)a(s)a(s))'"
+The lists of packages which are initially queued to be installed,
+reinstalled, removed, purged, upgraded, downgraded or skipped from upgrading.
+.TP
+.BR Dependenciens " read 'a(a(s)a(s)a(s)a(s)a(s)a(s)a(s))'"
+The lists of packages which are additionally required to be installed,
+reinstalled, removed, purged, upgraded, downgraded or skipped from upgrading.
+The
+.B Simulate
+method has to be called to calculate the dependencies.
+.TP
+.BR Cancellable " read 'b'"
+If the transaction can be cancelled.
+.TP
+.BR TerminalAttached " read 'b'"
+If the master pty which has to be set using the Terminal property is attached as controlling terminal to the underlying dpkg call.
+.TP
+.BR RequiredMedium " read 'a(ss)'"
+The transaction will be stopped if a media change is required to install packages. This property provides the
+.I label
+and the
+.I mount point
+of the requested medium.
+.TP
+.BR ConfigFileConflict " read 'a(ss)'"
+The transaction will be stopped if a configuration file shipped in the package overrides changes of the user. This property provides the path to
+.I current
+and the path to the
+.I new
+configuration file.
+.TP
+.BR ExitState " read 's'"
+The exit state enum of the transaction.
+.TP
+.BR Error " read 'a(ss)'"
+If an error occured this property provides the
+.I error enum
+and the
+.I error message.
+.TP
+.BR Locale " read-write 's'"
+This is the locale which will be used for translating status and error messages of apt, e.g. de_DE@utf-8.
+.TP
+.BR Terminal " read-write 's'"
+The path to the master pty which will be the controlling terminal of the underlying dpkg call. This allows to have an interactive terminal session.
+.TP
+.BR DebconfSocket " read-write 's'"
+The path to the socket which will be used by the debconf passthrough backend to forward the debconf communication to the user session.
+.TP
+.BR Paused " read 'b'"
+If the transaction is paused, e.g. waiting for a conflict file resolution or media change.
+.TP
+.BR Unauthenticated " read 'as'"
+List of unauthenticated packages which are going to be installed.
+.TP
+.BR RemoveObsoletedDepends " read-write 'b'"
+If obsoleted dependencies of to be removed packages which have been installed
+automatically should be removed too.
+.TP
+.BR AllowUnauthenticated " read-write 'b'"
+If it is allowed to install not authenticated software packages.
+.TP
+.BR HttpProxy " read-write 's'"
+The URL of an http proxy which should be used to download repository meta data and package files, e.g. http://myproxy.athome:8080. You should set the system wide proxy if you use this feature regularly.
+.BR MetaData " read-write 'a{ss}'"
+A dictonary which allows client application to store additional data in the transaction. The key name has to include an identifier of the client application separated by an unterscore from the key name, e.g. sc_icon for the application icon name stored by software-center. The property cannot be changed anymore after the transaction has been queued.
+.SH HOMEPAGE
+https://launchpad.net/aptdaemon
+.SH BUGS
+You can report bugs at the Launchpad site of aptdaemon:
+https://bugs.launchpad.net/aptdaemon/+filebug
+.SH AUTHOR
+Sebastian Heinlein <devel at glatzor dot de>
+.SH SEE ALSO
+.BR org.debian.apt.transaction (7),
+.BR aptd (2),
+.BR aptdcon (2)
diff --git a/doc/source/_ext/signals.py b/doc/source/_ext/signals.py
new file mode 100644
index 0000000..0e7cbee
--- /dev/null
+++ b/doc/source/_ext/signals.py
@@ -0,0 +1,20 @@
+"""Adds a new directive signal for GObject signals"""
+
+import re
+
+from sphinx import addnodes
+
+signal_re = re.compile(r"([a-zA-Z-]+)\s->(.*)")
+
+def parse_signal(env, sig, signode):
+ match = signal_re.match(sig)
+ if not match:
+ signode += addnodes.desc_name(sig, sig)
+ return sig
+ name, args = match.groups()
+ signode += addnodes.desc_name(name, name)
+ signode += addnodes.desc_returns(args.strip(), args.strip())
+ return name
+
+def setup(app):
+ app.add_description_unit("signal", "sig", "pair: %s; signal", parse_signal)
diff --git a/doc/source/aptdaemon.client.rst b/doc/source/aptdaemon.client.rst
new file mode 100644
index 0000000..5cd04eb
--- /dev/null
+++ b/doc/source/aptdaemon.client.rst
@@ -0,0 +1,134 @@
+:mod:`aptdaemon.client` --- The client module
+=============================================
+
+Introduction
+------------
+
+Aptdaemon comes with a client module which provides a smoother interface on top
+of the D-Bus interface. It provides GObjects of the daemon and each transaction.
+
+
+.. _life_cycle:
+
+Life cycle of a transaction based action
+----------------------------------------
+
+At first you initialize an AptClient instance.
+
+ >>> from aptdaemon import client
+ >>>
+ >>> apt_client = client.AptClient()
+
+Secondly you call the whished action, e.g. updating the package cache. It will
+give you a new transaction instance.
+
+ >>> transaction = apt_client.update()
+
+The transaction has not been started yet. So you can make some further
+adjustements to it, e.g. setting a different language:
+
+ >>> transaction.set_locale("de_DE")
+
+... or setup the monitoring of the transaction:
+
+ >>> transaction.connect("finished", on_transaction_finished)
+
+You can then put the transaction on the queue by calling its :meth:`run()`
+method:
+
+ >>> transaction.run()
+
+If you don't need the underlying transcation instance of an action, you can
+alternatively set the wait argument to True. The AptClient method will return
+after the transaction is done:
+
+ >>> apt_client.update_cache(wait=True)
+
+This can also be used with asynchronous programming, see below.
+
+
+Asynchronous programming
+------------------------
+
+In the above examples simple synchronous calls have been made to the D-Bus.
+Until these calls return your whole application is blocked/frozen.
+In the case of password prompts this can be quite long. So aptdaemon supports
+the following asynchronous styles:
+
+D-Bus style callbacks
+^^^^^^^^^^^^^^^^^^^^^
+
+Since the client module is basically a wrapper around D-Bus calls, it provides
+a pair of reply_handler and error_handler for each method. You are perhaps
+already familiar with those if you have written a Python D-Bus client before:
+
+ >>> def run(trans):
+ ... trans.run(reply_handler=trans_has_started, error_handler=on_error)
+ ...
+ >>> def trans_has_started():
+ ... pass
+ ...
+ >>> def on_error(error):
+ ... raise error
+ ...
+ >>> client = AptClient()
+ >>> client.update(reply_handler=run, error_handler=on_error)
+
+
+Deferred callbacks
+^^^^^^^^^^^^^^^^^^
+
+Aptdaemon uses a simplified version of Twisted deferreds internally, called
+python-defer. But you can also make use of them in your application.
+
+The inline_callbacks decorator of python-defer allows to write asynchronous
+code in a synchronous way:
+
+ >>> @defer.inline_callbacks
+ ... def update_cache():
+ ... apt_client = client.AptClient()
+ ... try:
+ ... transaction = yield apt_client.update()
+ ... except errors.NotAuthorizedError:
+ ... print "You are not allowed to update the cache!"
+ ... return
+ ... yield transaction.set_locale("de_DE")
+ ... yield transaction.run()
+ ... print "Transaction has started"
+
+
+.. _chaining:
+
+Chaining Transactions
+---------------------
+
+It is possible to chain transactions. This allows to add a simple
+dependency relation, e.g. you want to add a new repository, update
+the cache and finally install a new package.
+
+ >>> client = aptdaemon.client.AptClient()
+ >>> trans1 = client.add_repository("deb", [...])
+ >>> trans2 = client.update_cache()
+ >>> trans3 = client.install_packages(["new-package"])
+ >>> trans2.run_after(trans1)
+ >>> trans3.run_after(trans2)
+ >>> trans1.run()
+
+If a transaction in a chain fails all other ones which follow will
+fail too with the :data:`enums.EXIT_PREVIOUS_FAILED` exit state.
+
+Class Reference
+---------------
+
+.. autoclass:: aptdaemon.client.AptClient
+ :members:
+
+.. autoclass:: aptdaemon.client.AptTransaction
+ :members:
+
+Function Reference
+------------------
+
+.. autofunction:: aptdaemon.client.get_transaction
+
+.. autofunction:: aptdaemon.client.get_aptdaemon
diff --git a/doc/source/aptdaemon.enums.rst b/doc/source/aptdaemon.enums.rst
new file mode 100644
index 0000000..5644820
--- /dev/null
+++ b/doc/source/aptdaemon.enums.rst
@@ -0,0 +1,5 @@
+:mod:`aptdaemon.enums` --- The enums module
+===========================================
+
+.. automodule:: aptdaemon.enums
+ :members:
diff --git a/doc/source/aptdaemon.gtk3widgets.rst b/doc/source/aptdaemon.gtk3widgets.rst
new file mode 100644
index 0000000..d54955a
--- /dev/null
+++ b/doc/source/aptdaemon.gtk3widgets.rst
@@ -0,0 +1,5 @@
+:mod:`aptdaemon.gtk3widgets` --- The gtk3widgets module
+=====================================================
+
+.. automodule:: aptdaemon.gtk3widgets
+ :members:
diff --git a/doc/source/conf.py b/doc/source/conf.py
new file mode 100644
index 0000000..37b4882
--- /dev/null
+++ b/doc/source/conf.py
@@ -0,0 +1,199 @@
+# -*- coding: utf-8 -*-
+#
+# aptdaemon documentation build configuration file, created by
+# sphinx-quickstart on Thu Aug 26 06:52:32 2010.
+#
+# This file is execfile()d with the current directory set to its containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys, os
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+sys.path.insert(0, os.path.abspath('../../'))
+sys.path.insert(0, os.path.abspath('_ext/'))
+
+# -- General configuration -----------------------------------------------------
+
+# Add any Sphinx extension module names here, as strings. They can be extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.coverage', 'sphinx.ext.ifconfig', 'signals']
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+#source_encoding = 'utf-8'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'aptdaemon'
+copyright = u'2010, Sebastian Heinlein'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = '0.4'
+# The full version, including alpha/beta/rc tags.
+release = '0.4.0'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of documents that shouldn't be included in the build.
+#unused_docs = []
+
+# List of directories, relative to source directory, that shouldn't be searched
+# for source files.
+exclude_trees = []
+
+# The reST default role (used for this markup: `text`) to use for all documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+
+# -- Options for HTML output ---------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. Major themes that come with
+# Sphinx are currently 'default' and 'sphinxdoc'.
+html_theme = 'default'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further. For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents. If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar. Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_use_modindex = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it. The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = ''
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'aptdaemondoc'
+
+
+# -- Options for LaTeX output --------------------------------------------------
+
+# The paper size ('letter' or 'a4').
+#latex_paper_size = 'letter'
+
+# The font size ('10pt', '11pt' or '12pt').
+#latex_font_size = '10pt'
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, documentclass [howto/manual]).
+latex_documents = [
+ ('index', 'aptdaemon.tex', u'aptdaemon Documentation',
+ u'Sebastian Heinlein', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# Additional stuff for the LaTeX preamble.
+#latex_preamble = ''
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_use_modindex = True
+
+
+# Example configuration for intersphinx: refer to the Python standard library.
+intersphinx_mapping = {'http://docs.python.org/': None}
diff --git a/doc/source/dbus.rst b/doc/source/dbus.rst
new file mode 100644
index 0000000..7d4f71a
--- /dev/null
+++ b/doc/source/dbus.rst
@@ -0,0 +1,410 @@
+The D-Bus API of the aptdaemon
+==============================
+
+Aptdaemon provides two D-Bus interfaces on the system bus.
+
+org.debian.apt --- The aptdaemon interface
+------------------------------------------
+
+This is the main interface which allows you to perform package managing tasks.
+It is proivded by the aptdaemon object at ``/org/debian/apt``.
+
+There are two kind of tasks: ones which are performed immediately and ones
+which are queued up in transaction and performed in a sequence.
+
+Non-transaction based methods
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. automethod:: aptdaemon.core.AptDaemon.GetTrustedVendorKeys() -> array(string)
+
+.. automethod:: aptdaemon.core.AptDaemon.Quit()
+
+
+Transaction based methos
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+Instead of performing the task immediately, a new transaction will be created
+and the method will return the D-Bus path of it. Afterwards you can simulate
+the transaction or put it on the queue.
+
+:ref:`life_cycle` and :ref:`chaining` are described in the Python client
+documentation with code examples.
+
+.. automethod:: aptdaemon.core.AptDaemon.UpdateCache() -> string
+
+.. automethod:: aptdaemon.core.AptDaemon.UpdateCachePartially(sources_list : string) -> string
+
+.. automethod:: aptdaemon.core.AptDaemon.AddRepository(src_type : string, uri : string, dist : string, comps : array(string), comment : string, sourcesfile : string) -> string
+
+.. automethod:: aptdaemon.core.AptDaemon.EnableDistroComponent(component : string) -> string
+
+.. automethod:: aptdaemon.core.AptDaemon.InstallFile(path : string, force : boolean) -> string
+
+.. automethod:: aptdaemon.core.AptDaemon.InstallPackages(package_names : array(string)) -> string
+
+.. automethod:: aptdaemon.core.AptDaemon.RemovePackages(package_names : array(string)) -> string
+
+.. automethod:: aptdaemon.core.AptDaemon.UpgradePackages(package_names : array(string)) -> string
+
+.. automethod:: aptdaemon.core.AptDaemon.CommitPackages(install : array(string), reinstall : array(string), remove : array(string), purge : array(string), upgrade : array(string), downgrade : array(string)) -> string
+
+.. automethod:: aptdaemon.core.AptDaemon.UpgradeSystem(safe_mode : boolean) -> string
+
+.. automethod:: aptdaemon.core.AptDaemon.FixIncompleteInstall() -> string
+
+.. automethod:: aptdaemon.core.AptDaemon.FixBrokenDepends() -> string
+
+.. automethod:: aptdaemon.core.AptDaemon.AddVendorKeyFromKeyserver(keyid : string, keyserver : string) -> string
+
+.. automethod:: aptdaemon.core.AptDaemon.AddVendorKeyFromFile(path : string) -> string
+
+
+Signals
+^^^^^^^
+
+The following singal can be emitted on the org.debian.apt interface.
+
+.. automethod:: aptdaemon.core.AptDaemon.ActiveTransactionsChanged(current : string, queued : array(string))
+
+Properties
+^^^^^^^^^^
+
+The daemon interface provides a set of properties which can be accessed and modified through :meth:`Set()`, :meth:`Get()` and :meth:`GetAll()` methods of the ``org.freedesktop.DBus.Properties`` interface.
+See the `D-Bus specification <http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties>`_ for more details.
+
+The following properties are available:
+
+.. attribute:: AutoCleanInterval : i
+
+ The interval in days in which the cache of downloaded packages should
+ should be cleaned. A value of 0 disables this feature.
+
+ *writable*
+
+
+.. attribute:: AutoDownload : b
+
+ If available upgrades should be already downloaded in the background.
+ The upgrades won't get installed automatically.
+
+ *writable*
+
+.. attribute:: AutoUpdateInterval : i
+
+ The interval in days in which the software repositories should be checked
+ for updates. A value of 0 disables the automatic check.
+
+ *writable*
+
+.. attribute:: PopConParticipation : b
+
+ If statistics about installed software and how often it is used should be
+ sent to the distribution anonymously. This helps to determine which
+ software should be shipped on the first install CDROMs and to make software
+ recommendations.
+
+ *writable*
+
+.. attribute:: UnattendedUpgrade : i
+
+ The interval in days in which updates should be installed
+ automatically. A value of 0 disables this feature.
+
+ *writable*
+
+.. attribute:: RebootRequired : b
+
+ Set if a reboot is required in order to complete the update.
+
+ *readonly*
+
+
+org.debian.apt.transaction --- The transaction interface
+--------------------------------------------------------
+
+This is the main interface of a transaction object. It allows to control and
+monitor the transaction. Transactions are created by using the org.debian.apt
+interface of aptdaemon.
+
+The path of a transaction object consists of ``/org/debian/apt/transaction/`` and an unique identifier.
+
+Methods
+^^^^^^^
+
+.. automethod:: aptdaemon.core.Transaction.Run()
+
+.. automethod:: aptdaemon.core.Transaction.RunAfter(tid : string)
+
+.. automethod:: aptdaemon.core.Transaction.Cancel()
+
+.. automethod:: aptdaemon.core.Transaction.Simulate()
+
+.. automethod:: aptdaemon.core.Transaction.ProvideMedium(medium : string)
+
+.. automethod:: aptdaemon.core.Transaction.ResolveConfigFileConflict(config : string, answer : string)
+
+Signals
+^^^^^^^
+
+.. automethod:: aptdaemon.core.Transaction.Finished() -> string
+
+.. automethod:: aptdaemon.core.Transaction.PropertyChanged() -> string, variant
+
+Properties
+^^^^^^^^^^
+
+The transaction interface provides a set of properties which can be accessed and modified through :meth:`Set()`, :meth:`Get()` and :meth:`GetAll()` methods of the ``org.freedesktop.DBus.Properties`` interface.
+See the `D-Bus specification <http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties>`_ for more details.
+
+For the documentation of the available string enumerations, see :mod:`aptdaemon.enums`.
+
+The following properties are available:
+
+
+.. attribute:: AllowUnauthenticated : b
+
+ If it is allowed to install not authenticated packages by the transaction.
+ Defaults to False.
+
+ *writable*
+
+.. attribute:: Cancellable : b
+
+ If the transaction can be cancelled at the moment.
+
+ *read-only*
+
+.. attribute:: ConfigFileConflict : (ss)
+
+ If the transaction waits for the resolution of a configuration file
+ conflict, this property contains an array of the path to the old and
+ the path to the new configuration file. See
+ :meth:`ResolveConfigFileConflict()`.
+
+ *read-only*
+
+.. attribute:: DebconfSocket : s
+
+ The path to the socket which should be used to proxy debconf communication
+ to the user.
+
+ *writable*
+
+.. attribute:: Dependencies : (asasasasasasas)
+
+ Array of package groups which will be modified as dependencies:
+
+ * array of the packages to install
+ * array of the packages to re-install
+ * array of the packages to remove
+ * array of the packages to purge
+ * array of the packages to upgrade
+ * array of the packages to downgrade
+ * array of the packages to not upgrade (keep)
+
+ The packages are specified by their name and a version number
+ separated by an "=", e.g. "xterm=261-1".
+ The dependencies are calculated after :meth:`Simulate()` or :meth:`Run()`
+ was called.
+
+ *read-only*
+
+.. attribute:: Download : x
+
+ The required download size in Bytes.
+
+ The property is available after :meth:`Simulate()` or :meth:`Run()` has
+ been called.
+
+ *read-only*
+
+.. attribute:: Error : (ss)
+
+ If the transaction failed this property contains an array of the error
+ code, e.g. ``error-no-lock`` and a detailed error message.
+
+ *read-only*
+
+.. attribute:: ExitState : s
+
+ If the transaction is completed it contains the exit status enum of
+ the transaction, e.g. ``exit-failed``. If the transaction has not yet
+ been completed it is ``exit-unfinished``.
+
+ *read-only*
+
+.. attribute:: HttpProxy : s
+
+ The URL of an http proxy which should be used for downloads by
+ the transaction, e.g. ``http://proxy:8080``.
+
+ *writable*
+
+.. attribute:: Locale : s
+
+ The locale which is used to translate messages, e.g. ``de_DE@UTF-8``.
+
+ *writable*
+
+.. attribute:: MetaData : a{sv}
+
+ The meta data dictionary allows client applications to store additional
+ data persistently in the transaction object. The key has to be a string
+ and be prefixed by an underscore separated identifier of the client
+ application, e.g. Software Center uses ``sc_app`` to store the application
+ corresponding to the transaction.
+
+ If a dict is written to the property it will be merged with the existing
+ one. It is not allowed to override already existing keys.
+
+ *writable*
+
+.. attribute:: Progress : i
+
+ The progress in percent of the transaction.
+
+ *read-only*
+
+.. attribute:: Packages : (asasasasasas)
+
+ Array of package groups which have been specified by the user intially
+ to be modified:
+
+ * array of the packages to install
+ * array of the packages to re-install
+ * array of the packages to remove
+ * array of the packages to purge
+ * array of the packages to upgrade
+ * array of the packages to downgrade
+
+ The packages are specified by their name and an optional version number
+ separated by an "=", e.g. "xterm=261-1". Furthermore if specified the
+ target release of the package will be separated by a "/", e.g.
+ "xterm/experimental".
+
+ *read-only*
+
+.. attribute:: Paused : b
+
+ If the transaction is paused, e.g. it is waiting for a medium or the
+ resolution of a configuration file conflict.
+
+ *read-only*
+
+.. attribute:: ProgressDetails : (iixxdx)
+
+ A list with detailed progress information:
+
+ * number of already processed items
+ * number of total items
+ * number of already downloaded bytes
+ * number of total bytes which have to be downloaded
+ * number of bytes downloaded per second
+ * remaining time in seconds
+
+ *read-only*
+
+.. attribute:: ProgressDownload : (sssxxs)
+
+ The last progress information update of a currently running download.
+ A list of ..
+
+ * URL of the download
+ * status enum of the download, e.g. ``download-fetching``.
+ * short description of the download
+ * number of already downloaded bytes
+ * number of total bytes which have to be downloaded
+ * Status message
+
+ *read-only*
+
+.. attribute:: RemoveObsoletedDepends : b
+
+ If in the case of a removal obsolete dependencies which have been installed
+ automatically before should be removed, too.
+ *writable*
+
+.. attribute:: RequiredMedium : (ss)
+
+ If the transaction waits for a medium to be inserted this property contains
+ an array of the medium name and the path to the drive in which
+ it should be inserted.
+ *read-only*
+
+.. attribute:: Role : s
+
+ The enum representing the type of action performed by the transaction e.g.
+ ``role-install-packages``.
+ *read-only*
+
+.. attribute:: Space : x
+
+ The required disk space in Bytes. If disk spaces is freed the value will
+ be negative.
+
+ The property is available after :meth:`Simulate()` or :meth:`Run()` has
+ been called.
+
+ *read-only*
+
+.. attribute:: Status : s
+
+ The status enum of the transaction, e.g. ``status-loading-cache``.
+
+ *read-only*
+
+.. attribute:: StatusDetails : s
+
+ A human readable string with additional download information.
+
+ *read-only*
+
+.. attribute:: Terminal : s
+
+ The path to the slave end of the controlling terminal which should be
+ used to controll the underlying :command:`dpkg` call.
+
+ *writable*
+
+.. attribute:: TerminalAttached : b
+
+ If the controlling terminal can be used to control the underlying
+ :command:`dpkg` call.
+
+ *read-only*
+
+.. attribute:: Unauthenticated : as
+
+ List of packages which are going to be installed but are not from an
+ authenticated repository.
+
+ *read-only*
+
+
+.. _policykit:
+
+PolicyKit privileges
+--------------------
+
+Most actions require the user to authenticate. The PolicyKit
+framework is used by aptdaemon for the authentication process.
+This allows to run aptdaemon as root and the client application as normal user.
+
+For non-transaction based actions the authentication will happen immediately.
+For transaction based actions the privilege will be checked after :meth:`Run()`
+has been called. If the privilege has not yet been granted the user will
+be requested to authenticate interactively.
+This allows the user to simulate a transaction before having to
+authenticate.
+
+Aptdaemon supports so called high level privileges which allow to perform
+a specified set of actions in a row without having to authenticate for each
+one separately. This only works if the client application authenticates for
+the high level privilge before running the transactions and the authentication
+is cached.
+
+There are two high level privileges ``install-packages-from-new-repo`` and
+``install-purchased-software``. Both allow to add a repository, install the
+key of vendor from a keyserver, update the cache and to install packages.
+
+.. literalinclude:: ../examples/chained.py
diff --git a/doc/source/index.rst b/doc/source/index.rst
new file mode 100644
index 0000000..2b5976e
--- /dev/null
+++ b/doc/source/index.rst
@@ -0,0 +1,22 @@
+Aptdaemon documentation
+=======================
+
+Contents:
+
+.. toctree::
+ :maxdepth: 2
+
+ aptdaemon.client
+ aptdaemon.enums
+ aptdaemon.gtk3widgets
+
+ dbus
+ plugins
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
+
diff --git a/doc/source/plugins.rst b/doc/source/plugins.rst
new file mode 100644
index 0000000..d3b35ef
--- /dev/null
+++ b/doc/source/plugins.rst
@@ -0,0 +1,68 @@
+Plugins
+=======
+
+Aptdaemon provides a plugin mechanism by making use of setuptools' entry points.
+The group name is ``aptdaemon.plugins``.
+
+Cache modifiers
+---------------
+
+Currently there are two types of plugins available which allow you to modify
+the marked changes of a transaction. Each plugin can be a function which
+accepts the resolver (apt.cache.ProblemResolver) and the cache (apt.cache.Cache)
+as arguments:
+
+ * *modify_cache_before*
+ The plugged-in function is called after the intentional changes of the
+ transaction have been marked, but before the dependencies have been resolved.
+
+ * *modify_cache_after*
+ The plugged-in function is called after the dependency resolution of the
+ transaction. The resolver will be called again afterwards.
+
+A short overview of the steps required to process a transaction:
+
+ 1. Mark intentional changes (e.g. the to be installed packages of a
+ InstallPackages transaction)
+ 2. Call all modify_cache_before plugins
+ 3. Run the dependency resolver
+ 4. Call all modify_cache_after_plugins and re-run the resolver
+ 5. Commit changes
+
+
+External helpers
+----------------
+
+There is also the *get_license_key* plugin which allows to retrieve the license
+key content and path to store. License keys are required by propriatary
+software. The plugged-in function gets called with uid of the user who started
+the transaction, the package name, a JSON OAuth tocken and the name of a
+server to query.
+
+Example
+-------
+
+Here is an example which would install language packages :file:`./plugins/aptd.py`:
+
+>>> def install_language_packs(resolver, cache):
+>>> """Marks the required language packs for installation."""
+>>> #... do the magic here ...
+>>> language_pack.mark_install(False, True)
+>>> # Only protect your changes if they are mantadory. If they cannot be
+>>> # be installed the transaction will fail.
+>>> resolver.clear(language_pack)
+>>> resolver.protect(language_pack)
+
+Finally you would have to register your function as entry point in :file:`setup.py`:
+
+>>> setup(
+>>> ...
+>>> entry_points="""[aptdaemon.plugins]
+>>> modify_cache_after=plugins.aptd:install_language_packs
+>>> """,
+>>> ...
+>>> )
+
+.. note::
+ Keep in mind that you can only register one entry point per name/plugin per
+ distribution.