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
Fixes #18695: Create a technique to manage yum repository #1645
Fixes #18695: Create a technique to manage yum repository #1645
Conversation
Yum repos have several option for url: Should we let the user choose which field to set ? |
e38aa72
to
145142d
Compare
Commit modified |
if => "!delete_repo_${index}"; | ||
|
||
# Deletion of repo | ||
"delete repo ${index}" usebundle => file_absent("${filename[${index}]}"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is overzealous as it may delete several repos if they are in the same file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i could make a file promise, that would select the region, and delete all lines matching *, plus deleting the region.
but it may leave nearly empty files
So another idea would be to count the section in a file, with a grep -rc '^[.*]$' /etc/yum.repos.d/
if count is 1, then delete the file, else clean it
this would probably be another bundle
Fixes #18695: Create a technique to manage yum repository
PR updated with a new commit |
Fixes #18695: Create a technique to manage yum repository
PR updated with a new commit |
…epository Fixes #18695: Create a technique to manage yum repository
PR updated with a new commit |
still not totally functionning, as the deletion doesn't report anything nor delete the file |
it's because the section is not present, so nothing to remove, so nothing happens |
…e yum repository Fixes #18695: Create a technique to manage yum repository
PR updated with a new commit |
…o manage yum repository Fixes #18695: Create a technique to manage yum repository
PR updated with a new commit |
ready for review |
…nique to manage yum repository Fixes #18695: Create a technique to manage yum repository
PR updated with a new commit |
this one too, is it still valid ? |
https://issues.rudder.io/issues/18695