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

Remove code duplication for enabling DVD repositories #7241

Merged
merged 2 commits into from Apr 10, 2019

Conversation

foursixnine
Copy link
Member

@foursixnine foursixnine commented Apr 10, 2019

While working on #6847 @rwx788 and I noticed that there's some code duplicated, so this is the follow up.

As an idea I might create later Lib::Utils::Zypper and move zypper related functions there, in an attempt to clean up a bit the lib/utils.pm

@foursixnine foursixnine force-pushed the cleanup-abit branch 2 times, most recently from 86ae8dc to 8f92ee5 Compare April 10, 2019 12:22
@foursixnine foursixnine marked this pull request as ready for review April 10, 2019 12:30
# see FATE#325541
zypper_call 'mr -e -l' if get_var('AUTOYAST')
|| is_sle('15+') and get_var('ISO_1', '') =~ /SLE-.*-Packages-.*\.iso/;
zypper_call 'ref';
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 take that "Enable dvd's" it's a step on it's own, and that includes the ref. Should we rename or repurpose the zypper_ref?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually you can skip AUTOYAST variable check, as it also has ISO_1 (all packages DVD mounted).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rwx788 dropped

Copy link
Member

@rwx788 rwx788 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right! I remember I've mentioned that when these duplicates were introduced, but because of the urgency we postponed removing the duplicates. Thanks for caring!

@rwx788 rwx788 merged commit 7341273 into os-autoinst:master Apr 10, 2019
@foursixnine foursixnine deleted the cleanup-abit branch April 10, 2019 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants