Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing repositories to the download page #1327

Closed
wants to merge 1 commit into from

Conversation

voegelas
Copy link
Contributor

Repositories without a package whose name matches the OBS package name are currently not added to the download page. Debian package names sometimes differ from RPM package names. For example, perl-URI is named liburi-perl on Debian-based systems.

This pull request makes the following modifications:

  1. The API request fetches all binaries as mentioned in Add option to query OBS repo by package rather than binary name. #1036.
  2. As before repositories with a package whose name matches the OBS package name are added to the download page. Nothing changes for these repositories. As before only the matching package is added.
  3. Additionally, the repositories that weren't added in the previous step are added to the download page.
  4. The Debian section in the ERB template outputs the Debian package name instead of the OBS package name.

Screenshots

Source: https://software.opensuse.org//download.html?project=home%3Avoegelas&package=perl-CPANPLUS-Dist-Debora

Current download page without Debian repositories

grafik

New download page with Debian repositories

grafik


  • I've included before / after screenshots or did not change the UI

@hellcp
Copy link
Member

hellcp commented Apr 20, 2023

So this was partly intentional, and I don't know if this is the best solution to the problem. As you implemented it, we will have quite a lot of packages listed when the source package in obs creates a lot of subpackages. My preference would probably be to list subpackages from the source package as links to different package pages, so that it's still simple to just link to a specific subpackage if the packager would rather do that.

@voegelas
Copy link
Contributor Author

Both RPM and Debian repositories with a package that matches the OBS package name are handled as before: Only the matching package is added. I doubt that there are many repositories without a matching package and lots of subpackages.

Debian package names that differ from RPM package names are an exception. Mostly modules for Python, Perl etc. that rarely have got subpackages.

@hellcp
Copy link
Member

hellcp commented Apr 20, 2023

This is not all that uncommon in case of RPMs though, there are plenty of packages that don't build the root package, but only exist as a bunch of subpackages. Granted, we do have the publishing sources enabled, so in most cases the root package will still be displayed as src.rpm file, which is not ideal in its own right.

@voegelas
Copy link
Contributor Author

I will update the code to ignore repositories with subpackages.

Repositories without a package whose name matches the OBS package name
were not added to the download page.  Debian package names sometimes
differ from RPM package names.  For example, perl-URI is named
liburi-perl on Debian-based systems.
@voegelas
Copy link
Contributor Author

The code does now only add additional repositories with exactly one package. The failed unit test is probably caused by missing API credentials. But I do not have the time to look into that code complexity message from codeclimate, which in my opinion is nonsense. I give up.

@voegelas voegelas closed this Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants