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

Fixes #18695: Create a technique to manage yum repository #1645

Conversation

ncharles
Copy link
Member

@ncharles
Copy link
Member Author

Yum repos have several option for url:
mirrorlist
baseurl

Should we let the user choose which field to set ?

@ncharles ncharles force-pushed the bug_18695/create_a_technique_to_manage_yum_repository branch from e38aa72 to 145142d Compare November 25, 2020 20:37
@ncharles
Copy link
Member Author

Commit modified

if => "!delete_repo_${index}";

# Deletion of repo
"delete repo ${index}" usebundle => file_absent("${filename[${index}]}"),
Copy link
Member Author

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

Copy link
Member Author

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
@ncharles
Copy link
Member Author

PR updated with a new commit

Fixes #18695: Create a technique to manage yum repository
@ncharles
Copy link
Member Author

PR updated with a new commit

…epository

Fixes #18695: Create a technique to manage yum repository
@ncharles
Copy link
Member Author

PR updated with a new commit

@ncharles ncharles added the WIP label Nov 30, 2020
@ncharles
Copy link
Member Author

still not totally functionning, as the deletion doesn't report anything nor delete the file

@ncharles
Copy link
Member Author

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
@ncharles
Copy link
Member Author

PR updated with a new commit

…o manage yum repository

Fixes #18695: Create a technique to manage yum repository
@ncharles
Copy link
Member Author

ncharles commented Dec 1, 2020

PR updated with a new commit

@ncharles ncharles removed the WIP label Dec 2, 2020
@ncharles
Copy link
Member Author

ncharles commented Dec 2, 2020

ready for review

…nique to manage yum repository

Fixes #18695: Create a technique to manage yum repository
@ncharles
Copy link
Member Author

ncharles commented Dec 2, 2020

PR updated with a new commit

@ncharles ncharles added the WIP label May 12, 2022
@peckpeck
Copy link
Member

this one too, is it still valid ?

@peckpeck peckpeck removed their request for review September 5, 2022 09:36
@ncharles ncharles closed this Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants