-
Sub-task
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
-
False
-
False
-
-
1
-
Testable
-
rhel-conversions
-
-
-
The parent issue RHELC-809 has the label that triggered autocreation of this subtask to track the relative story point estimation for the integration test part of the issue.
The parent issue description at the time of creation of this issue was:
We fixed https://issues.redhat.com/browse/RHELC-16 in https://github.com/oamg/convert2rhel/pull/627/
There's one thing about the fix that should be reworked a little bit:
Doing a restore, and then remove of the file here: https://github.com/oamg/convert2rhel/pull/627/files#diff-51e9ff11d39778d3b26778b293fc350430a82e2feed0dab2938da7c0069ffdc6R183
Is a bit unclean. It would be better if the backup functionality only had to be used for backup and rollback instead of also being used here to temporarily restore a file that was removed as part of package removal.
I think we can clean this up and remove the `restore()` and `remove()` of the file by changing how we backup and remove the repofile packages. If we split that into two steps (backup and remove), we can then perform the backup portion earlier ( https://github.com/oamg/convert2rhel/pull/627/files#diff-7d31913eebe96d308744cc192ecf12ed870f425d573064d6e5dad3b53381ecc4R223 ) and do the removal later ( https://github.com/oamg/convert2rhel/pull/627/files#diff-7d31913eebe96d308744cc192ecf12ed870f425d573064d6e5dad3b53381ecc4L229 )
By doing that, the repository packages (and the specific os-release file that we need) will still be present when subscription.register_system() is called so we won't have to mess with trying to restore the file via the backup framework.