-
Notifications
You must be signed in to change notification settings - Fork 684
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
Use VM install repo URL on the installed system #4338
Use VM install repo URL on the installed system #4338
Conversation
Signed-off-by: Jiri Jaburek <jjaburek@redhat.com>
Fixed the PEP8 issue. |
The inspection completed: 1 updated code elements |
@@ -83,6 +85,25 @@ def parse_args(): | |||
return parser.parse_args() | |||
|
|||
|
|||
def detect_url_os(url): | |||
"""Given a repository URL, guess an OS type and version.""" | |||
cmd = ["osinfo-detect", "-f", "env", "-t", "tree", url] |
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.
Please also add libosinfo
package into the "Libvirt backend" section of tests/README.md
.
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.
@matusmarhefka libosinfo
is already used and required by virt-install
, so if you have virt-install
you already have libosinfo
. In addition, the python exception takes care of cases where it's not present and the repository is simply not set up (still allowing some level of testing or manual repo setup).
Are you sure you want me to put it in README.md
? .. Maybe as "optional"?
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.
You are right. In that case there is no need to put the package there.
@comps Good stuff, thanks for the extension. |
Fedora doesn't need this (installs mirrors implicitly) and the list can be extended if this logic is checked to work with ie. SLES or openSUSE.
I don't like the
gpgcheck=0
, but the VM is supposed to be transient and this works with internal or otherwise temporary unsigned repositories.