Bug 1193238
| Summary: | Specifying a --source option doesn't overwrite the built-in templates | ||
|---|---|---|---|
| Product: | [Community] Virtualization Tools | Reporter: | James (purpleidea) <jshubin> |
| Component: | libguestfs | Assignee: | Pino Toscano <ptoscano> |
| Status: | CLOSED UPSTREAM | QA Contact: | |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | unspecified | CC: | jshubin, ptoscano, rbalakri |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-05-05 16:36:27 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
James (purpleidea)
2015-02-16 23:16:38 UTC
(In reply to James (purpleidea) from comment #0) > 1) That anything specified with --source take precedence *over* any > built-ins. --source just adds new sources to the existing sources, with no special treatment. This means they are merged together the processed repositories, so any of the templates in the specified --source is used only whether (a) doesn't exist already (b) exist but its architecture does not exist (c) exist already also for its architecture, but its revision= is greater. The change to process --source options ahead of repositories is easy to do, although it won't change the result in case the template you are "overriding" get a revision bump; sent for review: https://www.redhat.com/archives/libguestfs/2015-February/msg00160.html (In reply to Pino Toscano from comment #1) > (In reply to James (purpleidea) from comment #0) > > 1) That anything specified with --source take precedence *over* any > > built-ins. > > --source just adds new sources to the existing sources, with no special > treatment. This means they are merged together the processed repositories, > so any of the templates in the specified --source is used only whether (a) > doesn't exist already (b) exist but its architecture does not exist (c) > exist already also for its architecture, but its revision= is greater. > > The change to process --source options ahead of repositories is easy to do, > although it won't change the result in case the template you are > "overriding" get a revision bump; sent for review: > https://www.redhat.com/archives/libguestfs/2015-February/msg00160.html Cool... Would having an --only-source type option make sense or be useful to anyone besides me? (In reply to James (purpleidea) from comment #0) > 2) There be an option to only show images from --source when desired. eg: > --only-include-manual-sources (or something with a better name) virt-builder uses XDG paths (the $XDG_CONFIG_DIRS envvar for system paths, and $XDG_CONFIG_HOME for user's one) as base for the repositories; if you don't want to use them, it should be enough to set them empty: env XDG_CONFIG_DIRS="" virt-builder ... (In reply to Pino Toscano from comment #1) > (In reply to James (purpleidea) from comment #0) > > 1) That anything specified with --source take precedence *over* any > > built-ins. > > --source just adds new sources to the existing sources, with no special > treatment. This means they are merged together the processed repositories, > so any of the templates in the specified --source is used only whether (a) > doesn't exist already (b) exist but its architecture does not exist (c) > exist already also for its architecture, but its revision= is greater. > > The change to process --source options ahead of repositories is easy to do, > although it won't change the result in case the template you are > "overriding" get a revision bump; sent for review: > https://www.redhat.com/archives/libguestfs/2015-February/msg00160.html This is fixed with https://github.com/libguestfs/libguestfs/commit/17dabd57c78c021f17169fe69643a35c6c3b7ef9 which is in libguestfs >= 1.29.27. Reading again the original bug report: (1) has been fixed one year ago (see comment #4) (2) is possible by setting the XDG_CONFIG_DIRS and XDG_CONFIG_HOME envvars (see comment #3, and the virt-builder man page) Hence, this bug report can be closed now -- feel free to reopen in case you think something has not been fixed yet. |