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 service run" fails when using obs_scm and new git filter on the same repo twice #443

Open
martinkunkel2 opened this issue Apr 8, 2022 · 0 comments

Comments

@martinkunkel2
Copy link

We sometimes use the obs_scm on the same repo twice and only extract part of the sources.

Minimal example _service file:

<services>
  <service name="obs_scm">
    <param name="url">https://github.com/openSUSE/obs-service-tar_scm.git</param>
    <param name="scm">git</param>
    <param name="revision">master</param>
    <param name="version">_none_</param>
    <param name="subdir">debian</param>
    <param name="filename">debian</param>
  </service>

  <service name="obs_scm">
    <param name="url">https://github.com/openSUSE/obs-service-tar_scm.git</param>
    <param name="scm">git</param>
    <param name="revision">master</param>
    <param name="version">_none_</param>
    <param name="filename">full</param>
  </service>
</services>

This works with revision ed7b12cad10ec7d7c54c4670797db2a61a120822:

$ osc service run
Cloning into '/home/suse-obs/home:martinkunkel/multi-repo-checkout-test/obs-service-tar_scm'...
c58bf82bb0b10420600bb4640c7a6f4963ca6289
Already up to date.
c58bf82bb0b10420600bb4640c7a6f4963ca6289
Already up to date.
c58bf82bb0b10420600bb4640c7a6f4963ca6289

But with latest master revision c58bf82bb0b10420600bb4640c7a6f4963ca6289 it fails:

$ osc service run
Cloning into '/home/suse-obs/home:martinkunkel/multi-repo-checkout-test/obs-service-tar_scm'...
c58bf82bb0b10420600bb4640c7a6f4963ca6289
Already up to date.
c58bf82bb0b10420600bb4640c7a6f4963ca6289
fatal: --filter can only be used when extensions.partialClone is set
ERROR:root:Corrupt clone_dir '/home/suse-obs/home:martinkunkel/multi-repo-checkout-test/obs-service-tar_scm' detected.
Command ['git', 'fetch', '--filter=tree:0', '--tags'] failed(128): 'fatal: --filter can only be used when extensions.partialClone is set'
Aborting: service call failed:  /usr/lib/obs/service/obs_scm --url https://github.com/openSUSE/obs-service-tar_scm.git --scm git --revision master --version _none_ --filename full --outdir /home/suse-obs/home:martinkunkel/multi-repo-checkout-test/tmpk88lxjt0.obs_scm.service

I assume this is a cause of #397.
Should this kind of service file that I posted above work with the local osc client?

@martinkunkel2 martinkunkel2 changed the title When using obs_scm and new git filter on the same repo, osc service run fails When using obs_scm and new git filter on the same repo, "osc service run" fails Apr 8, 2022
@martinkunkel2 martinkunkel2 changed the title When using obs_scm and new git filter on the same repo, "osc service run" fails "osc service run" fails when using obs_scm and new git filter on the same repo twice Apr 8, 2022
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

No branches or pull requests

1 participant