Bug 940477

Summary: libzypp: case-overlapping package names cause double installation
Product: [openSUSE] openSUSE Tumbleweed Reporter: Jan Engelhardt <jengelh>
Component: libzyppAssignee: E-mail List <zypp-maintainers>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Enhancement    
Priority: P2 - High CC: alinm.elena, ma, wahming
Version: Current   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: /var/log/zyp* direct tar

Description Jan Engelhardt 2015-08-04 09:35:52 UTC
On Tumbleweed du jour + /science repository (openSUSE_Factory), attempting to install the ASL simulation library also wants to install the ASL Macro Assembler:

---
jng-sfac:/etc/zypp/repos.d # zypper in --no-r ASL
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following 28 NEW packages are going to be installed:
  asl ASL boost-license1_58_0 libaslcommon0 libboost_filesystem1_58_0
  libboost_program_options1_58_0 libboost_system1_58_0 libgfortran3 libgl2ps1
  libhdf4 libhdf5-10 libhdf5_hl10 libibverbs1 libicu55_1 libicu55_1-ledata
  libjsoncpp1 libmatio2 libnetcdf7 libnetcdf_c++4 libOpenCL1 libquadmath0
  libtheoradec1 libtheoraenc1 openmpi-libs R-base R-base-devel tk vtk

The following package is recommended, but will not be installed (only required packages will be installed):
  beignet

28 new packages to install.
Overall download size: 77.8 MiB. Already cached: 0 B. After the operation,
additional 197.2 MiB will be used.
Continue? [y/n/? shows all options] (y): y
---

Is this behavior of zypp indeed intended?
Comment 1 Jan Engelhardt 2015-08-04 09:45:57 UTC
Created attachment 642831 [details]
/var/log/zyp* direct tar
Comment 2 Michael Andres 2015-08-04 10:47:25 UTC
(In reply to Jan Engelhardt from comment #0)
> Is this behavior of zypp indeed intended?

Looks like it was actually implemented to resolve bug#412496 :(

We'll review the code and see how to fix it. Case insensitive search might be convenient but an exact match must superseed any other hit. And options to turn on/off ci-search should be available as well.
Comment 3 Michael Andres 2016-05-12 14:49:28 UTC
*** Bug 979323 has been marked as a duplicate of this bug. ***
Comment 4 Michael Andres 2016-05-12 14:52:11 UTC
*** Bug 749784 has been marked as a duplicate of this bug. ***
Comment 5 Michael Andres 2016-05-12 15:14:10 UTC
Fixed for zypper-1.13.1. CLI arguments for install/remove are always case-sensitive.

WORKAROUD for older versions is to use '-C, --capability', which was always case-sensitive. Unfortunately it does not support globbing.