| 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 2 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
| 3 |
<head> |
| 4 |
<title>PackageKit - Frequently Asked Questions</title> |
| 5 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
| 6 |
<link rel="stylesheet" href="style.css" type="text/css" media="screen"/> |
| 7 |
</head> |
| 8 |
<body> |
| 9 |
|
| 10 |
<table align="center" class="title"> |
| 11 |
<tr> |
| 12 |
<td><center><img src="img/packagekit.png" alt=""/></center></td> |
| 13 |
<td width="95%" valign="middle"><p class="title">Frequently Asked Questions</p></td> |
| 14 |
<td><center><img src="img/packagekit.png" alt=""/></center></td> |
| 15 |
</tr> |
| 16 |
</table> |
| 17 |
|
| 18 |
<p>Back to the <a href="index.html">main page</a></p> |
| 19 |
|
| 20 |
<h1>Frequently asked questions</h1> |
| 21 |
|
| 22 |
<h2>Table Of Contents</h2> |
| 23 |
<ul> |
| 24 |
<li><a href="#how-complete">How complete are the backends?</a></li> |
| 25 |
<li><a href="#repo-add-remove">Why can't I add or remove software sources</a></li> |
| 26 |
<li><a href="#markup">Can I include formatting characters in package descriptions?</a></li> |
| 27 |
<li><a href="#1-click-install">Does PackageKit support 1-Click Install?</a></li> |
| 28 |
<li><a href="#command-not-found">How does the command not found functionality work?</a></li> |
| 29 |
<li><a href="#session-system">Why is there a session service and and a system service?</a></li> |
| 30 |
<li><a href="#session-methods">How do I use PackageKit in my application?</a></li> |
| 31 |
<li><a href="#rawhide-updates">Why don't I get update details with Fedora Rawhide?</a></li> |
| 32 |
<li><a href="#tray-icons">What do the tray icons mean?</a></li> |
| 33 |
<li><a href="#no-percentage-updates">What if we don't support percentage updates?</a></li> |
| 34 |
<li><a href="#remaining-times">Why are the remaining times sometimes wildly wrong?</a></li> |
| 35 |
<li><a href="#different-options">How will PackageKit support all the different options?</a></li> |
| 36 |
<li><a href="#error-codes">Error codes are different on each backend?</a></li> |
| 37 |
<li><a href="#user-interaction">Installing packages needs user interaction!</a></li> |
| 38 |
<li><a href="#up2date">Does PackageKit replace up2date?</a></li> |
| 39 |
<li><a href="#system-daemon">Is PackageKit a system daemon, always running and using resources?</a></li> |
| 40 |
<li><a href="#dependencies">How does PackageKit handle dependencies?</a></li> |
| 41 |
<li><a href="#multiple-users">How does PackageKit work with multiple users?</a></li> |
| 42 |
<li><a href="#use-existing-tools">Can users still use their normal package managers?</a></li> |
| 43 |
<li><a href="#corporate-sponsor">Is there an organization sponsoring development of PackageKit?</a></li> |
| 44 |
</ul> |
| 45 |
|
| 46 |
<hr/> |
| 47 |
<h3><a name="how-complete">How complete are the backends?</a></h3> |
| 48 |
<p> |
| 49 |
Backends do not have to be complete when they are added to PackageKit. |
| 50 |
If a feature is not present then it is hidden in the UI, which will explain why on some |
| 51 |
distributions the client tools look a little different to other distributions. |
| 52 |
You can see the latest feature matrix <a href="pk-matrix.html">here</a>. |
| 53 |
</p> |
| 54 |
|
| 55 |
<hr/> |
| 56 |
<h3><a name="repo-add-remove">Why can't I add or remove software sources?</a></h3> |
| 57 |
<p> |
| 58 |
In the software source viewer you can enable and disable repositories, but you |
| 59 |
cannot rename, add or remove them. |
| 60 |
This is a deliberate design choice chosen for the following reasons: |
| 61 |
</p> |
| 62 |
<ul> |
| 63 |
<li>The mirrorlist and source URL formats are very different between distributions</li> |
| 64 |
<li>There are better ways of adding sources, for instance installing the <code><i>repo</i>-release.rpm</code> package which also adds the GPG keys</li> |
| 65 |
<li>Removing the <code>repo-release.rpm</code> removes the repo and any temporary files</li> |
| 66 |
<li>Renaming a repo has no purpose</li> |
| 67 |
</ul> |
| 68 |
|
| 69 |
<h3><a name="markup">Can I include formatting characters in package descriptions?</a></h3> |
| 70 |
<p> |
| 71 |
Yes, as long as the descripions are formatted with |
| 72 |
<a href="http://en.wikipedia.org/wiki/Markdown">Markdown</a> then the descriptions will be |
| 73 |
formatted correctly in client programs. |
| 74 |
Using Markdown is a deliberate choice as it does not force the vendor to adopt any specific |
| 75 |
markup language. |
| 76 |
An example Markdown package description would be: |
| 77 |
</p> |
| 78 |
<pre> |
| 79 |
GNOME Power Manager uses the information and facilities |
| 80 |
provided by HAL displaying icons and handling user |
| 81 |
callbacks in an **interactive** GNOME session. |
| 82 |
|
| 83 |
The following *GUI* programs are provided: |
| 84 |
* `gnome-power-preferences` - set policy and change preferences |
| 85 |
* `gnome-power-statistics` - view power graphs and device history |
| 86 |
</pre> |
| 87 |
<p> |
| 88 |
This would be rendered by a text program as: |
| 89 |
</p> |
| 90 |
<pre> |
| 91 |
GNOME Power Manager uses the information and facilities provided by HAL |
| 92 |
displaying icons and handling user callbacks in an interactive GNOME session. |
| 93 |
|
| 94 |
The following GUI programs are provided: |
| 95 |
* gnome-power-preferences - set policy and change preferences |
| 96 |
* gnome-power-statistics - view power graphs and device history |
| 97 |
</pre> |
| 98 |
<p> |
| 99 |
A GUI front-end would format the text like this: |
| 100 |
</p> |
| 101 |
<table bgcolor="#eeeeee" cellpadding="6px"><tr><td> |
| 102 |
<p> |
| 103 |
GNOME Power Manager uses the information and facilities provided by HAL displaying icons and handling user callbacks in an <b>interactive</b> GNOME session. |
| 104 |
</p> |
| 105 |
<p> |
| 106 |
The following <i>GUI</i> programs are provided: |
| 107 |
</p> |
| 108 |
<ul> |
| 109 |
<li><code>gnome-power-preferences</code> - set policy and change preferences</li> |
| 110 |
<li><code>gnome-power-statistics</code> - view power graphs and device history</li> |
| 111 |
</ul> |
| 112 |
</td></tr></table> |
| 113 |
<p> |
| 114 |
Update descriptions are also processed for markdown, for example: |
| 115 |
</p> |
| 116 |
<img src="img/gpk-markdown.png" alt=""/> |
| 117 |
<hr/> |
| 118 |
|
| 119 |
<h3><a name="command-not-found">How does the command not found functionality work?</a></h3> |
| 120 |
<p> |
| 121 |
The command not found functionality is a bash extension that allows PackageKit |
| 122 |
to suggest similar commands, or to offer to install packages to provide commands. |
| 123 |
It's probably best to click on the image and watch the video. |
| 124 |
</p> |
| 125 |
<a href="videos/pk-command-not-found.ogv"><img src="img/pk-command-not-found.png" alt=""/></a> |
| 126 |
<hr/> |
| 127 |
|
| 128 |
<h3><a name="1-click-install">Does PackageKit support 1-Click Install?</a></h3> |
| 129 |
<p> |
| 130 |
No, as they are a potential security problem. The issues are as follows: |
| 131 |
</p> |
| 132 |
<ul> |
| 133 |
<li> |
| 134 |
That some developer creates a repository with a package with a higher package epoch, and then the |
| 135 |
distro releases a critical security package (with an updated version, but smaller epoch) and the |
| 136 |
package does not get upgraded, leaving the user vulnerable. |
| 137 |
</li> |
| 138 |
<li> |
| 139 |
The user installs some random repository, where the developer pushes a few svn packages. |
| 140 |
The developer gets bored, and stop produces updates, and then one of the old packages blocks |
| 141 |
on the distribution update, causing no further automatic system updates. |
| 142 |
</li> |
| 143 |
<li> |
| 144 |
There's no signing of 1-click-install files, so we can't actually be sure that they come from a |
| 145 |
reputable source. |
| 146 |
</li> |
| 147 |
<li> |
| 148 |
There's no localization in the 1-click-files. |
| 149 |
For instance, if we only show a French language speaker a description of "remote exploit trojan" |
| 150 |
they are not going to understand the description. |
| 151 |
</li> |
| 152 |
</ul> |
| 153 |
<p> |
| 154 |
So what's the solution? Using a standard <code>$vendor-release.rpm</code> or <code>.deb</code> |
| 155 |
you can ship the standard repo or source with a signed GPG key. |
| 156 |
PackageKit also supports <a href="#catalogs">catalogs</a> which can install sets of files provided by |
| 157 |
your distro. |
| 158 |
</p> |
| 159 |
<p> |
| 160 |
Quoting Sebastian Heinlein, |
| 161 |
<i>Allowing to easily add third party repositories and install third party software without a |
| 162 |
certification infrastructure is like opening the gates to hell. |
| 163 |
Most user just don't have got the technical understanding to handle this well.</i> |
| 164 |
</p> |
| 165 |
|
| 166 |
<hr/> |
| 167 |
<h3><a name="session-system">Why is there a session service <b>and</b> and a system service?</a></h3> |
| 168 |
<p> |
| 169 |
PackageKit runs a process <code>packagekitd</code> that is a daemon that runs per-system. |
| 170 |
The daemon lets you schedule transactions using either the raw |
| 171 |
<a href="http://gitweb.freedesktop.org/?p=packagekit.git;a=blob;f=src/org.freedesktop.PackageKit.Transaction.xml"> |
| 172 |
D-Bus methods</a>, or using <a href="https://www.freedesktop.org/software/PackageKit/gtk-doc/PkClient.html">libpackagekit</a>. |
| 173 |
The transactions are very fine grained, so an application would have to manage |
| 174 |
<a href="https://www.freedesktop.org/software/PackageKit/gtk-doc/introduction-ideas-transactions.html"> |
| 175 |
the transaction process</a> itself. |
| 176 |
This would mean handling the EULA and GPG callbacks in each application. This is less than ideal. |
| 177 |
</p> |
| 178 |
<p> |
| 179 |
For this reason, a session helper is provided which makes all the |
| 180 |
complexity go away; it handles all the GPG key authentication and |
| 181 |
EULA agreements, and also works with authentication agent and user settings. |
| 182 |
Using the session service is also designed to be synchronous, which means |
| 183 |
you can send the D-Bus call and just wait for the result, rather than |
| 184 |
managing callbacks to update custom GUIs. |
| 185 |
</p> |
| 186 |
<p> |
| 187 |
The session helper is implemented in <code>gpk-update-icon</code> on GNOME, |
| 188 |
and is also availble when <code>apper</code> is installed on KDE. |
| 189 |
If you want full integration using custom dialogs without running the extra |
| 190 |
session process, then use libpackagekit. |
| 191 |
If you don't care, and just want things to <i>work</i> then |
| 192 |
<a href="https://www.freedesktop.org/software/PackageKit/pk-faq.html#session-methods">use the session interface</a>. |
| 193 |
If you want a demo, you can download <a href="files/session.c">session.c</a> for a |
| 194 |
session example and <a href="files/system.c">system.c</a> as a system example. |
| 195 |
</p> |
| 196 |
<p> |
| 197 |
Compile with: |
| 198 |
</p> |
| 199 |
<pre> |
| 200 |
gcc -o session -Wall session.c `pkg-config --cflags --libs gio-2.0` |
| 201 |
gcc -o system -Wall system.c `pkg-config --cflags --libs packagekit-glib` |
| 202 |
</pre> |
| 203 |
|
| 204 |
<hr/> |
| 205 |
<h3><a name="session-methods">How do I use PackageKit in my application?</a></h3> |
| 206 |
<p> |
| 207 |
Using the shared session interface you can use the following D-Bus methods |
| 208 |
to make PackageKit just do the right thing. |
| 209 |
All the additional |
| 210 |
<a href="https://www.freedesktop.org/software/PackageKit/gtk-doc/introduction-ideas-transactions.html"> |
| 211 |
confirmation, package downloads, GPG and EULA prompting is done automatically.</a> |
| 212 |
</p> |
| 213 |
<p> |
| 214 |
The DBUS methods are designed to be run syncronously, but can be run |
| 215 |
async using <code>g_dbus_proxy_call</code> and getting the status with |
| 216 |
<code>g_dbus_proxy_call_finish</code>. |
| 217 |
There is example code available <a href="files/session.c">in c</a> or |
| 218 |
<a href="files/session.py">in python</a>. |
| 219 |
</p> |
| 220 |
<p> |
| 221 |
The methods available on this interface are: |
| 222 |
</p> |
| 223 |
<ul> |
| 224 |
<li><code>InstallPackageName("openoffice-clipart")</code></li> |
| 225 |
<li><code>InstallProvideFile("/usr/share/fonts/sarai/Sarai_07.ttf")</code></li> |
| 226 |
<li><code>InstallLocalFile("/home/dave/Desktop/lirc-0.6.6-4.rhfc1.dag.i686.rpm")</code></li> |
| 227 |
<li><code>InstallMimeType("application/x-rpm")</code></li> |
| 228 |
<li><code>InstallFont("lang(en_GB)")</code></li> |
| 229 |
</ul> |
| 230 |
<p> |
| 231 |
Please email me or the |
| 232 |
<a href="http://lists.freedesktop.org/mailman/listinfo/packagekit">mailing list</a> |
| 233 |
if you have any other questions |
| 234 |
</p> |
| 235 |
|
| 236 |
<hr/> |
| 237 |
<h3><a name="rawhide-updates">Why don't I get update details with Fedora Rawhide?</a></h3> |
| 238 |
<p> |
| 239 |
The Rawhide repository does not supply metadata needed for the update-viewer to display extra |
| 240 |
information about the update, such as changelogs, CVE and bugzilla references. |
| 241 |
Only released versions of Fedora have this metadata. |
| 242 |
</p> |
| 243 |
|
| 244 |
<hr/> |
| 245 |
<h3><a name="no-percentage-updates">What if the backend package manager doesn't support percentage updates?</a></h3> |
| 246 |
<p> |
| 247 |
You don't have to have a backend that supports percentage updates. |
| 248 |
If you don't know the progress, just emit NoPercentageUpdates and then the UI |
| 249 |
should just do the right thing and spin backwards and forwards. |
| 250 |
</p> |
| 251 |
|
| 252 |
<hr/> |
| 253 |
<h3><a name="remaining-times">Why are the remaining times sometimes not present or wildly wrong?</a></h3> |
| 254 |
<p> |
| 255 |
The remaining time to completion of the transaction is calculated using an |
| 256 |
average time of the time between percentage updates points, extrapolated to 100%. |
| 257 |
This means that backends that give accurate and frequent percentage-changed |
| 258 |
signals will get accurate times. |
| 259 |
</p> |
| 260 |
<p> |
| 261 |
If a backend updates the percentage using very course updates |
| 262 |
(e.g. 20%, 40%, 60%, 80%, 100%) then the remaining time algorithm will not |
| 263 |
perform well. |
| 264 |
Similarly, if the duration of 0% to 50% takes 2 minutes and 50% to 100% takes |
| 265 |
10 minutes then at first the time will be reported under the true time to |
| 266 |
completion. |
| 267 |
It is up to the backends to map the transaction progress to fine-granularity |
| 268 |
accurate percentage updates, at least as best as possible. |
| 269 |
</p> |
| 270 |
|
| 271 |
<hr/> |
| 272 |
<h3><a name="different-options">With all the differences between backends, how will PackageKit support all the different options?</a></h3> |
| 273 |
<p> |
| 274 |
Backends don't have to support all options of all methods. |
| 275 |
Just set an error and return false if not implemented. |
| 276 |
</p> |
| 277 |
|
| 278 |
<hr/> |
| 279 |
<h3><a name="error-codes">But error codes are different on each backend?</a></h3> |
| 280 |
<p> |
| 281 |
Error codes have to be standardized so they can be localized. |
| 282 |
The error detail field can just be the untranslatable output. |
| 283 |
If you are creating a backend and you need another error enum, mention it |
| 284 |
and we can add it to the supported list. |
| 285 |
</p> |
| 286 |
|
| 287 |
<hr/> |
| 288 |
<h3><a name="user-interaction">How will PackageKit handle installation an application that needs user interaction?</a></h3> |
| 289 |
<p> |
| 290 |
Upgrading, installing or removing packages <b>has to be 100% silent</b>. |
| 291 |
</p> |
| 292 |
<p> |
| 293 |
The user cannot be prompted mid-transaction for questions as these will not be |
| 294 |
handled in PackageKit. |
| 295 |
The backend should do the right thing, as these questions mean very |
| 296 |
little to the average user. |
| 297 |
</p> |
| 298 |
<p> |
| 299 |
The reasons for this are as follows: |
| 300 |
</p> |
| 301 |
<ul> |
| 302 |
<li> |
| 303 |
The messages cannot be translated as the daemon is running in the C locale, |
| 304 |
and there may be multiple running session clients in different locales. |
| 305 |
</li> |
| 306 |
<li> |
| 307 |
Stopping the transaction and waiting for input would also mean the methods |
| 308 |
are no longer "fire and forget". |
| 309 |
</li> |
| 310 |
<li> |
| 311 |
Security updates can now be performed automatically, i.e. |
| 312 |
when the user is idle. |
| 313 |
There's no user at the console in this case to answer questions. |
| 314 |
</li> |
| 315 |
<li> |
| 316 |
Due to the client/server split of PackageKit, a non-root user would be able |
| 317 |
to change the answer of debconf scripts, and another PolicyKit role would have |
| 318 |
to be defined. |
| 319 |
In this case a situation could arise where a user is able to update software, |
| 320 |
but not agree to EULAs, thus making the transaction invalid and impossible. |
| 321 |
</li> |
| 322 |
</ul> |
| 323 |
<p> |
| 324 |
EULAs or other agreements will have to be agreed to <b>before</b> the |
| 325 |
transaction is processed using the <code>EulaRequired</code> signal. |
| 326 |
EULAs should preferably be shown per-user - i.e. the first time an application is run. |
| 327 |
</p> |
| 328 |
<p> |
| 329 |
PackageKit will not install packages with broken maintainer scripts that |
| 330 |
require a stdin. |
| 331 |
<a href="http://www.debian.org/doc/debian-policy/ch-binary.html#s-maintscriptprompt">Debian</a> |
| 332 |
policy clearly says that prompting on <code>stdin</code> instead of using debconf is deprecated. |
| 333 |
If this is attempted the backend should detect this and error out of the |
| 334 |
transaction with <code>PK_ERROR_ENUM_BROKEN_PACKAGE</code>. |
| 335 |
<b>We cannot and will not ask the user for random standard input.</b> |
| 336 |
</p> |
| 337 |
<p> |
| 338 |
See the <a href="http://wiki.debian.org/PackageKit">Debian PackageKit wiki</a> |
| 339 |
for more details and further discussion. |
| 340 |
</p> |
| 341 |
<p> |
| 342 |
If the transaction needs to tell the user something, the <code>Message()</code> |
| 343 |
method can be used that will localise the message up the stack, and also give the user a way |
| 344 |
of ignoring duplicate messages of this type. We really don't want to be doing things like |
| 345 |
<a href="http://tieguy.org/blog/2008/04/11/second-worst-dialog-i-saw-during-a-recent-ubuntu-upgrade/">this</a> |
| 346 |
or <a href="http://weblogs.mozillazine.org/gerv/archives/2008/04/upgrading_to_hardy.html">this</a>. |
| 347 |
</p> |
| 348 |
|
| 349 |
<hr/> |
| 350 |
<h3><a name="up2date">Does PackageKit replace up2date?</a></h3> |
| 351 |
<p> |
| 352 |
PackageKit does not replace up2date. |
| 353 |
PackageKit is a way for users to interact with the packaging system, not for an |
| 354 |
administrator to install software on remote machines. |
| 355 |
</p> |
| 356 |
|
| 357 |
<hr/> |
| 358 |
<h3><a name="system-daemon">Is PackageKit a system daemon, always running and using resources?</a></h3> |
| 359 |
<p> |
| 360 |
PackageKit is not yet another system daemon. |
| 361 |
It quits when not doing anything, and only starts when something wants |
| 362 |
information or a task completed. |
| 363 |
</p> |
| 364 |
|
| 365 |
<hr/> |
| 366 |
<h3><a name="dependencies">How does PackageKit handle dependencies?</a></h3> |
| 367 |
<p> |
| 368 |
PackageKit <b>does not do</b> dependency resolution. |
| 369 |
This problem has already been solved by the backend systems and we don't really |
| 370 |
want to re-invent the wheel. |
| 371 |
</p> |
| 372 |
<p> |
| 373 |
PackageKit does not have the fine-grained API to do everything. |
| 374 |
For instance, synaptic should still use libapt as can do much more than can be |
| 375 |
provided by PackageKit. |
| 376 |
</p> |
| 377 |
|
| 378 |
<hr/> |
| 379 |
<h3><a name="multiple-users">How does PackageKit work with multiple users?</a></h3> |
| 380 |
<p> |
| 381 |
PackageKit is designed from the ground up to work with fast user switching and |
| 382 |
logging in and out of sessions during upgrades. |
| 383 |
You can start a package install, log out, log in as another user, all without |
| 384 |
corruption. |
| 385 |
</p> |
| 386 |
|
| 387 |
<hr/> |
| 388 |
<h3><a name="use-existing-tools">Can users still use their normal package managers and backends, such as Yum, APT or Conary?</a></h3> |
| 389 |
<p> |
| 390 |
PackageKit does not stop you using the low level tools, in fact it quits as soon |
| 391 |
as possible if a native tool is waiting to be run. |
| 392 |
</p> |
| 393 |
|
| 394 |
<hr/> |
| 395 |
<h3><a name="corporate-sponsor">Is there an organization or corporation sponsoring development of PackageKit?</a></h3> |
| 396 |
<p> |
| 397 |
PackageKit is not sponsored by anyone, although I now work at Red Hat full time |
| 398 |
on PackageKit and several other projects. |
| 399 |
</p> |
| 400 |
|
| 401 |
<p>Back to the <a href="index.html">main page</a></p> |
| 402 |
|
| 403 |
<!-- space for the links to be at the top --> |
| 404 |
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/> |
| 405 |
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/> |
| 406 |
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/> |
| 407 |
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/> |
| 408 |
|
| 409 |
<p class="footer"> |
| 410 |
Copyright <a href="mailto:[email protected]">Richard Hughes 2007-2013</a><br/> |
| 411 |
<a href="http://validator.w3.org/check/referer">Optimized</a> |
| 412 |
for <a href="http://www.w3.org/">standards</a>. |
| 413 |
</p> |
| 414 |
|
| 415 |
</body> |
| 416 |
</html> |
| 417 |
|