openSUSE / opi

OBS Package Installer (CLI)
GNU General Public License v3.0
244 stars 22 forks source link

Duplicated results #84

Closed trmdi closed 1 year ago

trmdi commented 2 years ago

opi shows: image While OBS has only one: image

asdil12 commented 2 years ago

The reason for this seems to be that gifski build in the devel project (graphics) agaist both Tumbleweed and Factory: https://build.opensuse.org/package/show/graphics/gifski

This is not the case for other packages like libexif which only builds against Factory: https://build.opensuse.org/package/show/graphics/libexif

asdil12 commented 2 years ago

>>> binaries = opi.search_published_binary('openSUSE', 'gifski')
>>> pprint(binaries)
[{'arch': 'x86_64',
  'baseproject': 'openSUSE:Factory',
  'filename': 'gifski-20211001.git.b804a8b-1.1.x86_64.rpm',
  'filepath': 'graphics/openSUSE_Factory/x86_64/gifski-20211001.git.b804a8b-1.1.x86_64.rpm',
  'name': 'gifski',
  'obs_instance': 'openSUSE',
  'package': 'gifski',
  'project': 'graphics',
  'release': '1.1',
  'repository': 'openSUSE_Factory',
  'type': 'rpm',
  'version': '20211001.git.b804a8b'},
 {'arch': 'x86_64',
  'baseproject': 'openSUSE:Factory',
  'filename': 'gifski-20211001.git.b804a8b-1.1.x86_64.rpm',
  'filepath': 'graphics/openSUSE_Tumbleweed/x86_64/gifski-20211001.git.b804a8b-1.1.x86_64.rpm',
  'name': 'gifski',
  'obs_instance': 'openSUSE',
  'package': 'gifski',
  'project': 'graphics',
  'release': '1.1',
  'repository': 'openSUSE_Tumbleweed',
  'type': 'rpm',
  'version': '20211001.git.b804a8b'},
 {'arch': 'x86_64',
  'baseproject': 'openSUSE:Factory',
  'filename': 'gifski-debuginfo-20211001.git.b804a8b-1.1.x86_64.rpm',
  'filepath': 'graphics/openSUSE_Factory/x86_64/gifski-debuginfo-20211001.git.b804a8b-1.1.x86_64.rpm',
  'name': 'gifski-debuginfo',
  'obs_instance': 'openSUSE',
  'package': 'gifski',
  'project': 'graphics',
  'release': '1.1',
  'repository': 'openSUSE_Factory',
  'type': 'rpm',
  'version': '20211001.git.b804a8b'},
 {'arch': 'x86_64',
  'baseproject': 'openSUSE:Factory',
  'filename': 'gifski-debuginfo-20211001.git.b804a8b-1.1.x86_64.rpm',
  'filepath': 'graphics/openSUSE_Tumbleweed/x86_64/gifski-debuginfo-20211001.git.b804a8b-1.1.x86_64.rpm',
  'name': 'gifski-debuginfo',
  'obs_instance': 'openSUSE',
  'package': 'gifski',
  'project': 'graphics',
  'release': '1.1',
  'repository': 'openSUSE_Tumbleweed',
  'type': 'rpm',
  'version': '20211001.git.b804a8b'}]
asdil12 commented 2 years ago

I guess that the xpath query is only matching the baseproject here which is openSUSE:Factory in both cases. Only the repository entry seems to distinguish them.


contains-ic(@name, 'gifski') and path/project='openSUSE:Factory'
trmdi commented 2 years ago

Then opi should show the repo together with the arch, or whatever...

asdil12 commented 1 year ago

Should be fixed by #137 in version 3.0.0