This page is to offer some tips for testing and debugging the conary backend for packagekit.
Misc
- Check out the latest git version for development.
- Here is some documentation (from Fedora project wiki) on building PackageKit and others from source.
Debugging information
- The logging module is used to show debugging info:
import logging as log log.basicConfig(level=logging.DEBUG, format='%(asctime)s %(levelname)s %(message)s') #### log.debug("Log phrase")
To remove logging, reset the debug level (or set to any level higher than DEBUG, like INFO):
level=logging.NOTSET
Build packagekit to run locally
Pass these flags to the ./configure script (change --prefix as you need):
NOCONFIGURE=yes ./autogen.sh ./configure --with-default-backend=conary --disable-qt --enable-local --with-default-backend=conary --enable-conary / --enable-dummy --with-security-framework=polkit --disable-gtk-doc --disable-browser-plugin --disable-gstreamer-plugin / --disable-ruck --disable-command-not-found --disable-gtk-module --disable-strict make
(why "--disable-gtk-module --disable-command-not-found --disable-browser-plugin --disable-gstreamer-plugin"?) >> disable extra plugins for only run packagekit
Run packagekit without installing
- The conary backend is in backends/conary/ and the file conaryBackend.py acts as the entrance to the backend. The parameters that conaryBackend.py receives can be get from backends/conary/pk-backend-conary.c (simply search for 'conaryBackend.py').
So you can directly launch pkcon commands on the backend, shown as following.
Before you run the 'python conaryBackend.py <cmd>' commands, some preparation should be done first (TODO):
export NETWORK= export BACKGROUND=
PackageKit:
pkcon refreshbackend:
python conaryBackend.py refresh-cache 0
Packagekit
pkcon search name gimpbackend:
python conaryBackend.py search-name "installed;available" gimp
PackageKit:
pkcon remove pastebinitbackend:
python conaryBackend.py remove-packages none "pastebinit:runtime;0.7-1-1;x86;/foresight.rpath.org@fl:2-qa/1222042924.172:0.7-1-1,1#x86"
Packagekit:
??backend:
python conaryBackend.py update-packages "pastebinit;0.7-1-1;x86;/foresight.rpath.org@fl:2-qa/1222042924.172:0.7-1-1,1#x86"
PackageKit:
pkcon install pastebinitbackend:
python conaryBackend.py install-packages "pastebinit;0.7-1-1;x86;/foresight.rpath.org@fl:2-qa/1222042924.172:0.7-1-1,1#x86"
Packagekit:
pkcon resolve <app>backend:
python conaryBackend.py resolve installed pastebinit