Skip to content

Fix repo_url concatenation logic in importer#1431

Open
rmg0070 wants to merge 1 commit intoSUSE:masterfrom
rmg0070:rmg0070-patch-1
Open

Fix repo_url concatenation logic in importer#1431
rmg0070 wants to merge 1 commit intoSUSE:masterfrom
rmg0070:rmg0070-patch-1

Conversation

@rmg0070
Copy link

@rmg0070 rmg0070 commented Feb 25, 2026

Replaced incorrect ends_with usage with Ruby's end_with?

Description

While running the SMT to RMT migration using:

rmt-data-import -d ./

a NoMethodError was encountered due to the use of the non-existent ends_with method on a Ruby String.

Ruby provides end_with?, not ends_with.
This caused the importer to fail while normalizing repository URLs.

This change replaces the incorrect method call with end_with?, ensuring repository URLs are normalized correctly and preventing the runtime error during import.

Related Issue / Ticket / Trello card: N/A (encountered during SMT → RMT migration)


How to test

  1. Prepare an SMT export directory
  2. Run:
    rmt-data-import -d ./
  3. Verify:
    • Import completes successfully
    • No NoMethodError is raised
    • Repository URLs with and without trailing slashes are handled correctly

Change Type

  • Bug Fix (a non-breaking change which fixes an issue)
  • New Feature
  • Documentation Update

Checklist

  • I have reviewed my own code and believe that it's ready for an external review.
  • I have provided comments for any hard-to-understand code.
  • I have documented the MANUAL.md file with any changes to the user experience. (Not applicable)
  • I have added a changelog entry to package/obs/rmt-server.changes. (Not required for a trivial fix)

Review

Please review according to the SUSE code review guidelines:
https://github.com/SUSE/scc-docs/blob/master/team/workflow/code_review.md

Replaced incorrect ends_with usage with Ruby's end_with?
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.

1 participant