Bug 800858

Summary: gpk-gstreamer-installer: fails to install if two packages found
Product: [openSUSE] openSUSE Tumbleweed Reporter: Dominique Leuenberger <dimstar>
Component: GNOMEAssignee: Jonathan Kang <songchuan.kang>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P4 - Low CC: dleuenberger, firebird209, hpj, i, lnussel, mcatanzaro, rhughes, Ulrich.Windl
Version: 13.1 Milestone 1   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: log file
working screenshot

Description Dominique Leuenberger 2013-01-28 18:18:05 UTC
Created attachment 522271 [details]
log file

Using totem, and starting a video file while not having the corresponding codec installed, triggers a package kit dialog to install the missing packages (if possible.. mostly requires 3rd party repositories).

In my current case, gpk/zypp suggests two versions of gstreamer-plugins-good to be installed (on top of one already insytalled) and then fails with 'can not install both')

zypper se -s gstreamer-plugins-good lists those at the moment (to 'help' understanding what is available in the repos):

i | gstreamer-plugins-good      | package    | 1.0.5-17.9  | x86_64 | (System Packages)     
v | gstreamer-plugins-good      | package    | 1.0.5-19.1  | x86_64 | GStreamer             
v | gstreamer-plugins-good      | package    | 1.0.5-17.15 | i586   | GStreamer             
v | gstreamer-plugins-good      | package    | 1.0.5-17.7  | x86_64 | GNOME:Factory         
v | gstreamer-plugins-good      | package    | 1.0.5-17.7  | i586   | GNOME:Factory

Attached the pk_backend_zypp log file for further analysis.
Comment 1 Stephan Kulow 2013-02-11 08:19:40 UTC
be careful with my accounts ;(
Comment 2 Stephan Kulow 2013-02-11 09:03:04 UTC
hmm, need to talk with hughsie about it. The backend is not to blame here, PK asks "what provides codecs"? The correct answer to that are two packages.

And then PK asks the backend to install 2 packages - that task happens to be impossible.

I don't see a straight forward way to fix it, I need to cheat in either what-provides or install ;(
Comment 3 Stephan Kulow 2013-02-11 09:04:53 UTC
CCing richard, who happens to have an account :)
Comment 4 Stephan Kulow 2013-02-11 09:30:40 UTC
So I need to play with it, but some brain storming got me thinking I can return in what-provides a sample package and add a fake marker to it, so I know in install-pkgs that I need to actually install the provides of it.+

As far as I know PK doesn't do any sanity checks on the returned package ids, so I can invent repositories as I like.
Comment 5 Stephan Kulow 2013-02-11 18:13:28 UTC
*** Bug 735864 has been marked as a duplicate of this bug. ***
Comment 6 Stephan Kulow 2013-02-11 19:11:15 UTC
hmm, how is that even possible that the installed plugins provide something and it still asks PK to install a package?
Comment 7 Stephan Kulow 2013-02-11 19:53:45 UTC
just to verify: this did not work in 12.2, right?
Comment 8 Dominique Leuenberger 2013-02-11 20:00:46 UTC
Indeed, in 12.2 this had several issues... in some rare situations it 'just works', but it's very fragile...
Comment 9 Dominique Leuenberger 2013-02-11 20:02:08 UTC
(In reply to comment #6)
> hmm, how is that even possible that the installed plugins provide something and
> it still asks PK to install a package?

This happens 'only' if at least 2 'things' are looked for. I 'assume' (sorry), that if the first verified is missing, that the entire chain is just passed down to PK for 'resolution'...
Comment 10 Stephan Kulow 2013-02-11 21:30:29 UTC
so how do I reproduce this? if I start totem, it says plugins are missing and exists. Some requires seem wrong?
Comment 11 Dominique Leuenberger 2013-02-12 08:08:02 UTC
Depending on your video, you likely just run into the issue that there are no plugins for it available in Factory.

The easiest to reproduce is to add the repository

  http://gstreamer.leuenberger.net/openSUSE_Factory

to your system. Then the codecs are all available.

DISCLAIMER: This is just for Proof of Concept. Remove the packages coming from there again
Comment 12 Stephan Kulow 2013-02-12 08:33:39 UTC
it doesn't even try - it exists with "not all available plugins".
Comment 13 Stephan Kulow 2013-02-12 09:41:43 UTC
ok, I talked to Richard and he says the application that simply installs all solvables providing the codec needs to be fixed to let the user choose (or choose itself).

So that relieves me from having to add an ugly work around in the backend.
Comment 14 Dominique Leuenberger 2013-02-12 09:54:14 UTC
(In reply to comment #13)
> ok, I talked to Richard and he says the application that simply installs all
> solvables providing the codec needs to be fixed to let the user choose (or
> choose itself).
> 
> So that relieves me from having to add an ugly work around in the backend.

Oh.. then Richard will be the one fixing it :) gst-install-plugins-helper is part of PK upstream after all...
Comment 15 Dominique Leuenberger 2013-04-17 07:16:04 UTC
*** Bug 812859 has been marked as a duplicate of this bug. ***
Comment 16 Ulrich Windl 2013-06-20 07:53:26 UTC
Just to feed-in some more keywords: When trying to view an MP4 file in 12.3, I get these errors trying to install the decoder modules in totem:
cannot install both gstreamer-plugins-bad-1.0.5-2.1.1.i586 and gstreamer-plugins-bad-1.0.5-2.1.1.i586
cannot install both gstreamer-plugins-good-1.0.5-2.1.5.i586 and gstreamer-plugins-good-1.0.5-2.1.5.i586
What makes me wonder is: After totem seems to know quite well what is missing, the final selection of packages looks as if the details got lost while searching for the software.
Comment 17 fire bird 2014-03-01 06:31:19 UTC
Tried viewing an mp4 in openSUSE Factory + Gnome (3.11.90) and this type of issue still exists (perhaps expected by those in the know about it? :)) I fired up totem from cli and watched the output, which is as follows:

** Message: PackageKit: Did not install codec: GDBus.Error:org.freedesktop.PackageKit.Modify.depResolutionFailed: cannot install both gstreamer-plugins-bad-1.0.10-2.5.4.x86_64 and gstreamer-plugins-bad-1.2.3-53.7.x86_64
cannot install both gstreamer-plugins-good-1.2.3-3.1.x86_64 and gstreamer-plugins-good-1.2.3-44.1.x86_64
cannot install both gstreamer-plugins-bad-1.2.3-1.1.x86_64 and gstreamer-plugins-bad-1.2.3-59.5.x86_64
** Message: No installation candidate for missing plugins found.

Totem itself gives a message dialog stating "Failed to install software" "A package could not be found that allows the action to complete. More information is available in the detailed report."
Comment 18 Hans Petter Jansson 2015-07-22 17:52:12 UTC
This happens in 13.2 too. jhbuild sysdeps --install fails to install anything, and I get a long list of entries like this:

cannot install both libgphoto2-devel-2.5.5.1-1.3.x86_64 and libgphoto2-devel-2.5.5.1-1.3.x86_64
cannot install both libgudev-1_0-devel-210-25.8.1.x86_64 and libgudev-1_0-devel-210-25.5.4.x86_64
cannot install both libproxy-devel-0.4.11-12.1.3.x86_64 and libproxy-devel-0.4.11-12.1.3.x86_64

etc.
Comment 19 Dominique Leuenberger 2016-08-05 09:40:05 UTC
(In reply to Hans Petter Jansson from comment #18)
> This happens in 13.2 too. jhbuild sysdeps --install fails to install
> anything, and I get a long list of entries like this:
> 
> cannot install both libgphoto2-devel-2.5.5.1-1.3.x86_64 and
> libgphoto2-devel-2.5.5.1-1.3.x86_64
> cannot install both libgudev-1_0-devel-210-25.8.1.x86_64 and
> libgudev-1_0-devel-210-25.5.4.x86_64
> cannot install both libproxy-devel-0.4.11-12.1.3.x86_64 and
> libproxy-devel-0.4.11-12.1.3.x86_64

the jhbuild issue is slightly different (I think) and depends on nug 984865
Comment 20 Jonathan Kang 2023-05-19 08:18:28 UTC
Created attachment 867124 [details]
working screenshot

A lot has been changed as it's been 10 years! Currently when playing a mp4 video file in totem, a dialog pops up providing the option to install the required component using GNOME Software. So this is no longer an issue right now.

Although in my testing, GNOME Software is activated with an already installed package. So the suggested package is actually not the one expected. But this should be another issue separated with this one.
Comment 21 Dominique Leuenberger 2023-05-22 14:28:51 UTC
(In reply to Jonathan Kang from comment #20)
> Created attachment 867124 [details]
> working screenshot
> 
> A lot has been changed as it's been 10 years! Currently when playing a mp4
> video file in totem, a dialog pops up providing the option to install the
> required component using GNOME Software. So this is no longer an issue right
> now.
> 
> Although in my testing, GNOME Software is activated with an already
> installed package. So the suggested package is actually not the one
> expected. But this should be another issue separated with this one.

Sounds fair to close this one.

As fo your error: the issue seems be gstreamer-plugins-bad advertising
  gstreamer1(decoder-video/x-h264)()(64bit)
as capability - without being able to play the video then :(

PK no longer being involved in the actual searching of the packages - but gnome software being used, makes this error 'solved'
Comment 22 Jonathan Kang 2023-05-25 02:05:22 UTC
(In reply to Dominique Leuenberger from comment #21)
> (In reply to Jonathan Kang from comment #20)
> > Created attachment 867124 [details]
> > working screenshot
> > 
> > A lot has been changed as it's been 10 years! Currently when playing a mp4
> > video file in totem, a dialog pops up providing the option to install the
> > required component using GNOME Software. So this is no longer an issue right
> > now.
> > 
> > Although in my testing, GNOME Software is activated with an already
> > installed package. So the suggested package is actually not the one
> > expected. But this should be another issue separated with this one.
> 
> Sounds fair to close this one.
> 
> As fo your error: the issue seems be gstreamer-plugins-bad advertising
>   gstreamer1(decoder-video/x-h264)()(64bit)
> as capability - without being able to play the video then :(
> 
I found that gstreamer-1.20-plugin-openh264[1] doesn't claim codec type in its appstream data. So it won't show up in the search result list.

> <package type="rpm">

*[1] https://en.opensuse.org/OpenH264