Bug 1038305

Summary: zypper ignores trailing "-" when searching
Product: [openSUSE] openSUSE Distribution Reporter: Stephan Hemeier <Sauerlandlinux>
Component: libzyppAssignee: E-mail List <zypp-maintainers>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P2 - High CC: davejplater, igonzalezsosa, karl.thomas.schmidt, Sauerlandlinux
Version: Leap 42.3   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Stephan Hemeier 2017-05-09 16:39:32 UTC
If I search with zypper, it only searches up to a dash, after that zypper will not find any Packages.

zypper se -si python-

will give:

i | dbus-1-python                  | Paket | 1.2.0-7.34                     | x86_64 | openSUSE-Leap-42.2-Oss   
i | dbus-1-python3                 | Paket | 1.2.0-7.30                     | x86_64 | openSUSE-Leap-42.2-Oss   
i | gimp-plugins-python            | Paket | 2.9.5.git20170429-16.1         | x86_64 | Sauerland-Leap           
i | libboost_python1_61_0          | Paket | 1.61.0-1.6                     | x86_64 | openSUSE-Leap-42.2-Oss   
i | libboost_python3-1_61_0        | Paket | 1.61.0-1.6                     | x86_64 | openSUSE-Leap-42.2-Oss
.
.
.
i | python3-sip                    | Paket | 4.16.9-5.4                     | x86_64 | openSUSE-Leap-42.2-Oss   
i | python3-six                    | Paket | 1.9.0-2.2                      | noarch | openSUSE-Leap-42.2-Oss   
i | python3-smbc                   | Paket | 1.0.15.4-4.3                   | x86_64 | openSUSE-Leap-42.2-Oss   
i | rpm-python                     | Paket | 4.11.2-10.1                    | x86_64 | openSUSE-Leap-42.2-Oss   
i | zypp-plugin-python             | Paket | 0.5-5.3                        | x86_64 | openSUSE-Leap-42.2-Oss

That is ok.


But

zypper se -si python3-s

will give:

Repository-Daten werden geladen...
Installierte Pakete werden gelesen...
Keine passenden Objekte gefunden.

Nothing, but it should give f.e. the above Packages:
i | python3-sip                    | Paket | 4.16.9-5.4                     | x86_64 | openSUSE-Leap-42.2-Oss   
i | python3-six                    | Paket | 1.9.0-2.2                      | noarch | openSUSE-Leap-42.2-Oss   
i | python3-smbc

With an Asterisk it will work:

zypper se -si python3-s*
Repository-Daten werden geladen...
Installierte Pakete werden gelesen...

S | Name               | Typ   | Version      | Arch   | Repository            
--+--------------------+-------+--------------+--------+-----------------------
i | python3-setuptools | Paket | 33.1.1-175.1 | noarch | KDE-Extra             
i | python3-simplejson | Paket | 3.8.0-5.18   | x86_64 | openSUSE-Leap-42.2-Oss
i | python3-sip        | Paket | 4.16.9-5.4   | x86_64 | openSUSE-Leap-42.2-Oss
i | python3-six        | Paket | 1.9.0-2.2    | noarch | openSUSE-Leap-42.2-Oss
i | python3-smbc       | Paket | 1.0.15.4-4.3 | x86_64 | openSUSE-Leap-42.2-Oss

That is not the old behavior.......

Stephan
Comment 1 Stephan Hemeier 2017-05-09 16:44:35 UTC
In the first example the search string is python- and so python3- should not be find by zypper.

Thats also an bug.
Comment 2 Michael Andres 2017-05-09 17:04:37 UTC
@Stephan: Which zypper version you are using?
Comment 3 Stephan Hemeier 2017-05-09 17:16:49 UTC
Last Version from April:

zypper se -si zypp
Repository-Daten werden geladen...
Installierte Pakete werden gelesen...

S | Name                    | Typ   | Version       | Arch   | Repository               
--+-------------------------+-------+---------------+--------+--------------------------
i | PackageKit-backend-zypp | Paket | 1.1.3-2.3     | x86_64 | openSUSE-Leap-42.2-Oss   
i | libzypp                 | Paket | 16.5.2-5.3.1  | x86_64 | openSUSE-Leap-42.2-Update
i | snapper-zypp-plugin     | Paket | 0.3.3-2.2     | noarch | openSUSE-Leap-42.2-Oss   
i | zypp-plugin-python      | Paket | 0.5-5.3       | x86_64 | openSUSE-Leap-42.2-Oss   
i | zypper                  | Paket | 1.13.21-5.3.1 | x86_64 | openSUSE-Leap-42.2-Update
i | zypper-aptitude         | Paket | 1.13.21-5.3.1 | noarch | openSUSE-Leap-42.2-Update
i | zypper-log              | Paket | 1.13.21-5.3.1 | noarch | openSUSE-Leap-42.2-Update
Comment 4 Karl Thomas Schmidt 2017-05-09 17:31:45 UTC
Confirm this bug. Same here with zypper V 1.13.21
Comment 5 Andreas Stieger 2017-09-05 11:31:29 UTC
*** Bug 1057168 has been marked as a duplicate of this bug. ***
Comment 6 Dave Plater 2017-09-05 13:00:59 UTC
I did indeed first notice the zypper se gstreamer-plugins problem from Bug 1057168 in 42.2 and it is now in 42.3. It's important to note that zypper se alsa-plugins succeeds as does a search for alsa-plugins- although searching for alsa-plugins- also finds alsa-plugins.
Now I see what actually happens:
zypper se libzypp-plugin should find libzypp-plugin-appdata but it doesn't but zypper se zypp-plugin finds all instances because there is a package called zypp-plugin to find but in the case of gstreamer-plugins and libzypp-plugin there isn't a package called by that name. If I were to create a dummy rpm called gstreamer-plugins then zypper se would find all instances of it.
This is not the same as the reporter's bug which also still exists in 42.3.

Maybe this isn't actually a bug because:
zypper se gstreamer-plugins* succeeds and also zypper se -s python-* gives the output that the reporter requires.
zypper se --help states:
* and ? wildcards can also be used within search strings.
If a search string is enclosed in '/', it's interpreted as a regular expression.

and enclosing /python-/ or /gstreamer-plugins/ gives the expected result.
Comment 7 Imobach Gonzalez Sosa 2017-09-07 07:42:49 UTC
I am assigning this bug to libzypp maintainer as I think there is nothing the YaST team can do here.

Please, let me know if we can help in any way.
Comment 8 Michael Andres 2019-01-25 16:48:52 UTC
Fixed in zypper-1.14.5

*** This bug has been marked as a duplicate of bug 1070770 ***