[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Re: Review Request: Add an API for installing missing Plasma engines.
From: "Kevin Kofler" <kevin.kofler () chello ! at>
Date: 2011-08-03 8:19:22
Message-ID: 20110803081922.21637.80998 () vidsolbach ! de
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
> On Aug. 3, 2011, 8:13 a.m., Aaron J. Seigo wrote:
> > plasma/dataenginemanager.cpp, line 134
> > <http://git.reviewboard.kde.org/r/102175/diff/2/?file=30633#file30633line134>
> >
> > this failure case is going to be trickier to address than the scriptengine \
> > failure case below. one possibility would be to have a "delayed load" DataEngine \
> > that is returned which waits on the return from the ComponentInstaller.
> > it could cache all requests made until the ComponentInstaller returns. on \
> > success, it would then load the actual DataEngine and forward all calls made thus \
> > far to it (object connection requests, etc; basically replaying its internal \
> > state). on failure, it would flush all of these cached requests and behave just \
> > like the NullEngine.
A way to make things actually work without restarting everything would definitely \
help indeed. But it's not going to be easy to get working indeed. I'll see if I can \
improve this in a followup patch.
- Kevin
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/102175/#review5334
-----------------------------------------------------------
On Aug. 2, 2011, 3:49 p.m., Kevin Kofler wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/102175/
> -----------------------------------------------------------
>
> (Updated Aug. 2, 2011, 3:49 p.m.)
>
>
> Review request for Plasma.
>
>
> Summary
> -------
>
> This is part of my GSoC 2011 work. Expect more Plasma patches related to this in \
> the next few days.
> In particular, the currently unused "force" feature of the new API is intended to \
> be used if the user just installed a widget which explicitly requires a given \
> engine. (By default, prompts are not repeated within a session to prevent flooding \
> the user.)
> The implementation is based on PackageKit. It requires PackageKit >= 0.6.16 and \
> either Apper trunk or the backported patch from \
> http://pkgs.fedoraproject.org/gitweb/?p=kpackagekit.git;a=blob;f=kpackagekit06-plasma.patch;h=208427aa6cc072164b6a9ba48a30a954657ef892;hb=HEAD \
> to have any effect. If the requirements are not met, no change will be noticeable \
> at all, because the asynchronous call will simply fail and any errors are \
> (intentionally) discarded. (We don't want to annoy the user with a pointless error \
> dialog if he/she doesn't have PackageKit installed or his/her version is too old.)
> PackageKit will also only actually find the relevant packages if the distribution \
> is using RPM and yum (at this time) and if the RPMs in the repository have been \
> built with my Provides generator. But that shouldn't be Plasma's problem. Any work \
> in that area needs to happen on the PackageKit or distro side. Support for \
> GStreamer plugins has been implemented in other PackageKit backends too, so it \
> should also be doable for Plasma engines. And if a distro wants to use something \
> entirely different from PackageKit, that's also possible, this is what the abstract \
> EngineInstaller API is for.
> The API is public because it might be useful outside of libplasma, and it is quite \
> simple and generic, thus keeping BC should not be a problem.
>
> Diffs
> -----
>
> plasma/CMakeLists.txt ef411df
> plasma/dataenginemanager.cpp 988fe76
> plasma/private/componentinstaller.cpp PRE-CREATION
> plasma/private/componentinstaller_p.h PRE-CREATION
> plasma/scripting/scriptengine.cpp fb8cd1a
>
> Diff: http://git.reviewboard.kde.org/r/102175/diff
>
>
> Testing
> -------
>
> Verified that it compiles without errors and that it successfully prompts for a \
> missing Python script engine on Fedora 15. (The patch is against master (4.8), but \
> applies without changes to the kdelibs 4.6.5 in Fedora 15, which is how I tested \
> it.)
>
> Thanks,
>
> Kevin
>
>
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/102175/">http://git.reviewboard.kde.org/r/102175/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On August 3rd, 2011, 8:13 a.m., <b>Aaron J. \
Seigo</b> wrote:</p> <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;"> <thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;"> <a \
href="http://git.reviewboard.kde.org/r/102175/diff/2/?file=30633#file30633line134" \
style="color: black; font-weight: bold; text-decoration: \
underline;">plasma/dataenginemanager.cpp</a> <span style="font-weight: normal;">
(Diff revision 2)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
">Plasma::DataEngine *DataEngineManager::loadEngine(const QString \
&name)</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">134</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span \
class="c1">// Try installing the engine. However, it's too late for this \
request.</span></pre></td> </tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">this failure case is \
going to be trickier to address than the scriptengine failure case below. one \
possibility would be to have a "delayed load" DataEngine that is returned \
which waits on the return from the ComponentInstaller.
it could cache all requests made until the ComponentInstaller returns. on success, it \
would then load the actual DataEngine and forward all calls made thus far to it \
(object connection requests, etc; basically replaying its internal state). on \
failure, it would flush all of these cached requests and behave just like the \
NullEngine.</pre> </blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">A way to \
make things actually work without restarting everything would definitely help indeed. \
But it's not going to be easy to get working indeed. I'll see if I can \
improve this in a followup patch.</pre> <br />
<p>- Kevin</p>
<br />
<p>On August 2nd, 2011, 3:49 p.m., Kevin Kofler wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for Plasma.</div>
<div>By Kevin Kofler.</div>
<p style="color: grey;"><i>Updated Aug. 2, 2011, 3:49 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">This is part of my GSoC 2011 work. Expect more Plasma patches related to \
this in the next few days.
In particular, the currently unused "force" feature of the new API is \
intended to be used if the user just installed a widget which explicitly requires a \
given engine. (By default, prompts are not repeated within a session to prevent \
flooding the user.)
The implementation is based on PackageKit. It requires PackageKit >= 0.6.16 and \
either Apper trunk or the backported patch from \
http://pkgs.fedoraproject.org/gitweb/?p=kpackagekit.git;a=blob;f=kpackagekit06-plasma.patch;h=208427aa6cc072164b6a9ba48a30a954657ef892;hb=HEAD \
to have any effect. If the requirements are not met, no change will be noticeable at \
all, because the asynchronous call will simply fail and any errors are \
(intentionally) discarded. (We don't want to annoy the user with a pointless \
error dialog if he/she doesn't have PackageKit installed or his/her version is \
too old.)
PackageKit will also only actually find the relevant packages if the distribution is \
using RPM and yum (at this time) and if the RPMs in the repository have been built \
with my Provides generator. But that shouldn't be Plasma's problem. Any work \
in that area needs to happen on the PackageKit or distro side. Support for GStreamer \
plugins has been implemented in other PackageKit backends too, so it should also be \
doable for Plasma engines. And if a distro wants to use something entirely different \
from PackageKit, that's also possible, this is what the abstract EngineInstaller \
API is for.
The API is public because it might be useful outside of libplasma, and it is quite \
simple and generic, thus keeping BC should not be a problem.</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Verified that it compiles without errors and that it successfully \
prompts for a missing Python script engine on Fedora 15. (The patch is against master \
(4.8), but applies without changes to the kdelibs 4.6.5 in Fedora 15, which is how I \
tested it.)</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>plasma/CMakeLists.txt <span style="color: grey">(ef411df)</span></li>
<li>plasma/dataenginemanager.cpp <span style="color: grey">(988fe76)</span></li>
<li>plasma/private/componentinstaller.cpp <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>plasma/private/componentinstaller_p.h <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>plasma/scripting/scriptengine.cpp <span style="color: \
grey">(fb8cd1a)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/102175/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic