Bug 571690

Summary: YaST-gtk does not allow to search for files in packages that are not installed
Product: [openSUSE] openSUSE 11.2 Reporter: Forgotten User OvlPd7Jcli <forgotten_OvlPd7Jcli>
Component: YaST2Assignee: Forgotten User h13THG8RK1 <forgotten_h13THG8RK1>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Enhancement    
Priority: P5 - None CC: awafaa, forgotten_h13THG8RK1, tgoettlicher
Version: Final   
Target Milestone: Future 11.3   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Forgotten User OvlPd7Jcli 2010-01-18 21:19:54 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; it; rv:1.9.1.6) Gecko/20091201 SUSE/3.5.6-1.1.1 Firefox/3.5.6

In YaST-gtk it is not possible to search for files inside packages thare are not installed, as it can be done in YaST Qt, using the "Provides" checkbox.

Since this is very useful to install dependencies of third party commercial applications that are not distributed using RPM's, it should be probably added.

Reproducible: Always
Comment 1 Arvin Schnell 2010-01-19 09:18:25 UTC
AFAIK the information isn't provided in the repositories. Ricardo?
Comment 2 Forgotten User h13THG8RK1 2010-01-19 10:02:49 UTC
Repositories do make such information available. RPM fields such as provides, requires, recommends, suggests, etc are all made available so that Zypp SAT-Solver can e.g. evaluate beforehand if all its dependencies can be satisfied.

Alberto had already mentioned this to me. It seems that in the case of libraries, interpreters and many others, the "provides" field is a nice (if not fool-proof) to find the more relevant files. For instance, a package like SDL would have the string "libSDL.so" under provides, or sun-java and gcj would have the string "javac".
I had already put this feature request under the wiki so I wouldn't forget: http://en.opensuse.org/YaST2-GTK_brainstorm . Meanwhile, I've also worked on our Zypp wrapper so to make adding such new search fields much easier: http://groups.google.com/group/yast2-gtk/browse_thread/thread/c667ebe95c096daf

I think, like yast2-qt, we should simply add a new "provides" option to the search field (and maybe a "requires" one). Alternatively, we could make the "filename" option search in "provides" for not-installed packages (and have some tooltip saying filename search on not-installed is not reliable). But that could confuse the more advanced users (or could it?).
Maybe the best approach is to have a tooltip on filename search saying: "filename search can only be performed for installed packages. provides search can be a satisfactory alternative for not-installed packages however."

At the very least, we want to have this information on the help box. I don't think many people realize that a provides search can be a good alternative to the filename one.
Comment 3 Forgotten User h13THG8RK1 2010-01-19 10:07:05 UTC
By the way, yast2-qt in 11.2 introduced this new "Keywords" search field. Anyone knows what that refers to?

If I search for "a" (or some other letter) in the "Name" field, I get a lot of stuff (of course). But the "Keywords" one does never list me anything. I will be sure to look at their code when I get my hands dirty.
Comment 4 Forgotten User h13THG8RK1 2010-01-19 10:11:58 UTC
Interestingly, yast2-qt has this to say on their help-box about search:

«Search allows you to search for packages that meet various criteria. This is usually the easiest way to find a package if you know its name.
Hint: You can also use this to find out what package contains a certain library. Search in the Provides RPM field.»

Like I suspected, this is mostly reliable for libraries. (which probably satisfies most search use-cases.)

We should probably throw some online tooltip as well, because I doubt many people would look for the help text.
Comment 5 Forgotten User OvlPd7Jcli 2010-01-19 23:26:36 UTC
Hi Ricardo, thanks for remembering my suggestion. I'm sorry if this bugreport sounded pushy... just wanted to file it officially somewhere, since we were talking about it on IRC with another user.

Best,
A.
Comment 6 Andrew Wafaa 2010-01-23 08:16:49 UTC
Having a search feature similar to that provided by http://packages.opensuse-community.org would be excellent.  There is a cli client available in the openSUSE:Tools repo called webpin.
Comment 7 Forgotten User h13THG8RK1 2010-01-23 10:48:44 UTC
Andrew. I can have a look at that, and I will be sure to ask what the yast2-qt maintainer has to say about it (since he works full-time in yast2, he should know better the limitations and work involved). But I suspect it involves more work than merely listing it. You'll have to be adding temporary repositories and then follow through when the user asks for some of those packages to be installed. Alas, the problem is that sw_single is, unlike the other yast2 tools developed in both YCP and C++, making it quite painful for the various modules involved to cooperate.

What yast2-qt does in 11.2 is to have a shortcut to Webpin under "Configuration > Search Packages on Web".
Comment 8 Andrew Wafaa 2010-01-23 12:09:59 UTC
Hi Ricardo,

If integrating the likes of webpin is too painful, maybe just the search functionality?  At the end of the day the point is to enable yast-gtk to have the ability to search for package contents, not just package name.

How it gets done is up to you ;-)
Comment 9 Forgotten User OvlPd7Jcli 2010-01-23 18:25:17 UTC
YaST Qt has a client for webpin in openSUSE 11.2 (Search packages (webpin) - Icon of a world with a RPM on it). It queries webpin and provides the list of packages.

You can take a look at yaloki's blog too. He has a CLI to query webpin: http://dev-loki.blogspot.com/search?q=webpin

Best,
A.
Comment 10 Andrew Wafaa 2010-01-23 18:29:05 UTC
But the yast webpin app only searches for package names not contents, unlike the cli or web interface.
Comment 11 Forgotten User h13THG8RK1 2010-01-23 19:28:42 UTC
Andrew, there is a "Contents" check-box in the webpin GUI... Is that not working, or does it refer to something else than what you mean?
Comment 12 Forgotten User h13THG8RK1 2010-01-23 19:36:33 UTC
(In reply to comment #9)
> YaST Qt has a client for webpin in openSUSE 11.2

You can run any yast2 tool in yast2-gtk as well. (and yast2-ncurses if they don't use fancy stuff like images.) There are only yast2 tools. There are none yast2-qt or yast2-gtk tools. yast2-gtk and yast2-qt are solely translation layers that map YCP methods to the underlying desktop API.

The exception -- as I've discussed in the yast2-gtk mailing list -- is sw_single and online_update, which are largely coded at the translation layer level. (standing ancient architectural decisions.)
Comment 13 Thomas Göttlicher 2010-01-26 10:03:17 UTC
(In reply to comment #7)
> What yast2-qt does in 11.2 is to have a shortcut to Webpin under "Configuration
> > Search Packages on Web".

Webpin and the package selectors use different technologies. While the package selectors uses libzypp to search for packages, webpin uses xml rpc to search for packages. It's not trivial to extend the package selectors. I think the mentioned shortcut to Webpin in the package selector is good enough.
Comment 14 Forgotten User h13THG8RK1 2010-02-13 07:06:57 UTC
Fixed on svn. Let's try to get these stuff into 11.3.

    If you'd like to try svn:

    svn checkout  http://svn.opensuse.org/svn/yast/trunk/gtk/ yast2-gtk
    cd yast2-gtk
    make && sudo make install

    Reach us out at:

    http://groups.google.com/group/yast2-gtk