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

Choke on checkout of scmsync-enabled package #1687

Open
jengelh opened this issue Jan 6, 2025 · 1 comment
Open

Choke on checkout of scmsync-enabled package #1687

jengelh opened this issue Jan 6, 2025 · 1 comment
Labels

Comments

@jengelh
Copy link
Contributor

jengelh commented Jan 6, 2025

Versions

  • Operating system: openSUSE Tumbleweed amd64 20250103
  • Packages: osc-1.10.1-1.1.noarch

To Reproduce
Steps to reproduce the behavior:

  1. Run command osc co multimedia:libs/ffmpeg-5
  2. See error
Traceback (most recent call last):
  File "/usr/bin/osc", line 33, in <module>
    sys.exit(load_entry_point('osc==1.10.1', 'console_scripts', 'osc')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/osc/babysitter.py", line 227, in main
    sys.exit(run(commandline.OscMainCommand()))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/osc/babysitter.py", line 70, in run
    prg.main(argv)
  File "/usr/lib/python3.11/site-packages/osc/commandline.py", line 296, in main
    exit_code = cmd.run(args)
                ^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/osc/commandline_common.py", line 214, in run
    return cmd.run(args)
           ^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/osc/commandline.py", line 240, in run
    return self.func(args.command, args, *args.positional_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/osc/commandline.py", line 5104, in do_checkout
    checkout_package(apiurl, project, package, rev, expand_link=expand_link,
  File "/usr/lib/python3.11/site-packages/osc/core.py", line 3165, in checkout_package
    scmsync_obsinfo = ScmsyncObsinfo.from_api(apiurl, project, package, rev=revision)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/osc/obs_api/scmsync_obsinfo.py", line 56, in from_api
    return cls.from_file(response)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/osc/obs_api/scmsync_obsinfo.py", line 38, in from_file
    return cls.from_string(data)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/osc/obs_api/scmsync_obsinfo.py", line 28, in from_string
    return cls(**kwargs)
           ^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/osc/util/models.py", line 405, in __init__
    raise TypeError(
TypeError: The following fields of 'ScmsyncObsinfo' object are not initialized and have no default either: 'revision'

Expected behavior

Succeed; or tell the user how to add the "revision" field and what it should contain.

Additional info

$ osc cat multimedia:libs/ffmpeg-5/_scmsync.obsinfo
mtime: 1726540366
commit: 32ade1364a64337cc79a9b987d6f14d1f98d7d2d997f3c40984921e41d43da3c
url: https://src.opensuse.org/jengelh/ffmpeg-5.git
$ osc cat multimedia:libs/ffmpeg-4/_scmsync.obsinfo
mtime: 1736168221
commit: 52f36ca5b3383586c1ae8abf1b64353de97005272d185339a0eca858376b3ac2
url: https://src.opensuse.org/jengelh/ffmpeg-4
revision: master

So apparently there is no #branch marker in the <scmsync> line of the pkgmeta, but IMO it should just pull the default branch from git then.

@jengelh jengelh added the Bug label Jan 6, 2025
@dmach
Copy link
Contributor

dmach commented Jan 8, 2025

This is something I probably addressed in #1690 already.
Could you check if the latest osc shows the same behavior?

As far I can tell, osc co multimedia:libs/ffmpeg-5 works fine for me now.

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

2 participants