DevHeads.net

adding a runtime dependency into KDELIBS

We're in the process of merging a review which will partly fix the sad
situation of MTP/MPI/iPod devices in libsolid, the review I'm talking
about is:

<a href="https://git.reviewboard.kde.org/r/103028/" title="https://git.reviewboard.kde.org/r/103028/">https://git.reviewboard.kde.org/r/103028/</a>

This as far as I know was (is) working with the linux-deprecated HAL
backend, so is something we urge to fix.

This patch adds support for media-player-info which is basically what
replaces some features HAL has in the new u* stuff.

So, Can I give the ship it for this patch? can we add an optional
runtime dependency to kdelibs 4.7.x ?

Thanks.

Comments

Re: adding a runtime dependency into KDELIBS

By Aleix Pol at 11/23/2011 - 17:42

It's a runtime dependency, that doesn't seem to be a new dependency.

As far as I understand it's not really a problem. Right now we can assume
that kde-runtime is installed. Otherwise KIcon won't work properly either,
no?

What would happen if kde-runtime wasn't installed when running this? If
it's not a crash, i'd say it's fine :).

Aleix

Re: adding a runtime dependency into KDELIBS

By Albert Astals Cid at 11/23/2011 - 18:42

El Dimecres, 23 de novembre de 2011, a les 00:00:29, Alex Fiestas va escriure:
I don't see this adding any kind of dependency from the POV of code, that is,
it does not do qprocess nor the likes, so can you explain what the "optional
runtime dependency" means here?

Also Kevin's code looks like copied/duplicated "aka bad stuff".

Albert

Re: adding a runtime dependency into KDELIBS

By Dario Freddi at 11/23/2011 - 19:18

2011/11/24 Albert Astals Cid < ... at kde dot org>:
I think the code is accessing the DBus service, even though in the
patch this is not mentioned as well, so I'm slightly confused.
Besides, on a different topic, we should really standardize for
handling this kind of runtime dependencies, as I think they'll just
grow more as time goes

Re: adding a runtime dependency into KDELIBS

By Dario Freddi at 11/23/2011 - 19:21

2011/11/24 Dario Freddi < ... at gmail dot com>:
Forget this bit, I was just confusing myself, sorry.

From the wiki page:

"media-player-info is a repository of data files describing media
player capabilities, mostly of mass-storage devices. These files
contain information about the directory layout to use to add music to
these devices, the supported file formats and so on.

These capabilities used to be provided by HAL in the
10-usb-music-players.fdi file, but HAL is now deprecated, so the
information is being provided as a separate package."

So it's likely the new properties will be provided reliably only if
that package is installed, which explains pretty much everything else.

Re: adding a runtime dependency into KDELIBS

By Alex Fiestas at 11/24/2011 - 09:56

On 11/24/2011 01:21 AM, Dario Freddi wrote:
Ah, sorry for not explaining myself better but thankfully Dario did it
for me :p

Basically to provide better info and handle iOS devices we need to read
from some files installed by a package called "media-info-players".

Re: adding a runtime dependency into KDELIBS

By Aaron J. Seigo at 11/24/2011 - 03:32

On Thursday, November 24, 2011 01:21:12 Dario Freddi wrote:
so strictly speaking, this is actually udev (or whatever u* bit) dragging in a
new runtime dependency and not libsolid. i don't see the issue with this.

Re: adding a runtime dependency into KDELIBS

By Dario Freddi at 11/24/2011 - 04:17

(sorry Aaron for the duplicate, blame GMail)

2011/11/24 Aaron J. Seigo < ... at kde dot org>:
Yes and no. Whereas the component is a runtime part of udev, it's a
runtime dependency for udev as soon as its frontends take advantage of
it. This kind of circular dependencies make my head hurt and want me
to run into a wall, but at the end of the day I think it's not a big
deal, especially because it's just a bunch of spec files. So yeah, I
don't see any issue either.

Re: adding a runtime dependency into KDELIBS

By Alex Fiestas at 11/24/2011 - 09:57

So, do have I have green light to give the "ship it" to this patch?

Thanks and sorry for the mess of me not explaining :p

Re: adding a runtime dependency into KDELIBS

By Dario Freddi at 11/24/2011 - 14:04

Ship it!

2011/11/24 Alex Fiestas < ... at kde dot org>:

Re: adding a runtime dependency into KDELIBS

By Albert Astals Cid at 11/24/2011 - 12:41

El Dijous, 24 de novembre de 2011, a les 15:57:22, Alex Fiestas va escriure:
From what i can see it is a bug fix, it changes some code in solid and will
not break horribly or work worse for those of us that to not have that
"dependency" installed.

So if you are fine living with copied code from somewhere else, go for it.

Albert

Re: adding a runtime dependency into KDELIBS

By Alex Fiestas at 11/24/2011 - 12:47

On 11/24/2011 06:41 PM, Albert Astals Cid wrote:
IIRC Qt5 will have this information.