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

osc refuses to checkout a package with "Install the obs-scm-bridge package to work on packages managed in scm (git)!" #1623

Open
smithfarm opened this issue Sep 10, 2024 · 4 comments
Labels

Comments

@smithfarm
Copy link
Member

smithfarm commented Sep 10, 2024

Describe the bug

osc refuses to checkout a package that is managed by git, even though the sources are present on the source server:

$ osc co foo:bar baz
Install the obs-scm-bridge package to work on packages managed in scm (git)!
$ echo $?
1

This is a bug, because there are valid use cases for checking out sources from an OBS instances even when the package in question is maintained in git. For example, someone might want to simply look at the sources that are stored on the OBS source server. Or they might want to repeatedly run osc buildinfo as this is much more convenient from within a checkout.

One can make the error go away by installing the package (as called for by the error message), but all this does is make the error go away. The functionality is the same.

Versions

  • Operating system: openSUSE Leap 15.6
  • Packages: osc-1.5.1-150400.10.3.1.noarch

Expected behavior

The checkout should succeed, allowing the user to peruse the sources as stored on the OBS source server.

Additional context

One obvious way to fix the bug would be to adjust the error handling in osc so the error is displayed only on operations that really do require the obs-scm-bridge package.

Another (perhaps easier) way to fix it would be to add a Requires: osc-scm-bridge to osc.spec.

@smithfarm smithfarm added the Bug label Sep 10, 2024
@adrianschroeter
Copy link
Member

we can add an option to checkout classic scm files nevertheless, without checking for the bridge.

However, I would not promote this in the error message, since it would result in a different representation of the checkout and when the user is then trying to commit modifications it would fail. So this would be an expert-only with internal knowledge of implementation feature.

@adrianschroeter
Copy link
Member

#1624

@adrianschroeter
Copy link
Member

We should add a

Recommends: obs-scm-bridge

to osc that the bridge is installed by default independ of this.

@mlschroe
Copy link
Member

The "commit modifications" argument does not fly in my opinion. If you have a "subdir" in the scm url there will be no .git directory and thus you cannot contribute anyway. It only makes sense in one specific use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants