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 new --extract-rename option #509

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bluca
Copy link
Contributor

@bluca bluca commented Jan 18, 2025

Allows extracting a file and renaming it. Useful for Debian builds where the recipe file is in git, but the naming doesn't match OBS expectations: usually git stores debian/control but OBS wants debian.control. Also useful for multibuild, eg, to extract foo.spec to foo_TargetRepository.spec.

TarSCM/cli.py Outdated Show resolved Hide resolved
TarSCM/cli.py Outdated Show resolved Hide resolved
Allows extracting a file and renaming it. Useful for Debian builds where
the recipe file is in git, but the naming doesn't match OBS expectations:
usually git stores debian/control but OBS wants debian.control.
Also useful for multibuild, eg, to extract foo.spec to foo_TargetRepository.spec.
@Werkov
Copy link

Werkov commented Jan 21, 2025

Isn't this what https://github.com/openSUSE/obs-service-extract_file already does? I see you actually use it (It seems to me clearer to handle the renaming together with moving of files.)

@bluca
Copy link
Contributor Author

bluca commented Jan 21, 2025

Isn't this what https://github.com/openSUSE/obs-service-extract_file already does? I see you actually use it (It seems to me clearer to handle the renaming together with moving of files.)

That only works on tarballs, so you need to use tar_scm instead of obs_scm, and my understanding is that OBS admins want people to use obs_scm as it's easier on the backend and the storage

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.

3 participants