Description of problem: We have guest types like 'centos-6' which mean "the latest version of CentOS 6". ie. Currently that installs CentOS 6.5. Some users have asked me make available old versions of CentOS, so we would have centos-6.0, centos-6.1, ..., centos-6.5. To avoid breaking existing users, 'centos-6' would then become an alias for a particular os-version, eg. centos-6 -> centos-6.5 Suggested syntax (since we are using a proper parser): centos-6 -> centos-6.5 Version-Release number of selected component (if applicable): libguestfs 1.27.11
(In reply to Richard W.M. Jones from comment #0) > We have guest types like 'centos-6' which mean "the latest version > of CentOS 6". ie. Currently that installs CentOS 6.5. > > Some users have asked me make available old versions of CentOS, > so we would have centos-6.0, centos-6.1, ..., centos-6.5. > > To avoid breaking existing users, 'centos-6' would then become > an alias for a particular os-version, eg. centos-6 -> centos-6.5 Good idea. > Suggested syntax (since we are using a proper parser): > > centos-6 -> centos-6.5 I'm not sure, where should it go like that? I was thinking about a simplier: [foo] ... aliases=foo-alias bar-alias
I don't really have any strong preferences about this. One observation though: since all guest names are supposed to be "os-version", I think we can add section names like [global] or [aliases] without conflicting with existing guest names. However ... (In reply to Pino Toscano from comment #1) > I was thinking about a simplier: > [foo] > ... > aliases=foo-alias bar-alias isn't this backwards?
(In reply to Richard W.M. Jones from comment #2) > I don't really have any strong preferences about this. One > observation though: since all guest names are supposed to be > "os-version", I think we can add section names like [global] > or [aliases] without conflicting with existing guest names. Let's see whether we can come up with a solution that leaves the section names all available to the user. > (In reply to Pino Toscano from comment #1) > > I was thinking about a simplier: > > [foo] > > ... > > aliases=foo-alias bar-alias > > isn't this backwards? I'm not sure I get you here, why having an entry declare its aliases should be backward?
> > (In reply to Pino Toscano from comment #1) > > > I was thinking about a simplier: > > > [foo] > > > ... > > > aliases=foo-alias bar-alias > > > > isn't this backwards? > > I'm not sure I get you here, why having an entry declare its aliases should > be backward? I think this example is clearer: [centos-6.5] ... other fields ... alias=centos-6 which is fine.
(In reply to Richard W.M. Jones from comment #4) > > > (In reply to Pino Toscano from comment #1) > > > > I was thinking about a simplier: > > > > [foo] > > > > ... > > > > aliases=foo-alias bar-alias > > > > > > isn't this backwards? > > > > I'm not sure I get you here, why having an entry declare its aliases should > > be backward? > > I think this example is clearer: > > [centos-6.5] > ... other fields ... > alias=centos-6 > > which is fine. Yes, this is basically what I proposed too, just allowing multiple aliases for each entry, so in the example above you could have both "centos-6" and "centos" as aliases for the most recent CentOS version.
This has been committed as https://github.com/libguestfs/libguestfs/commit/e4005bd530aab62a8d86cfc7cb5db1c69ae873dd which is in libguestfs >= 1.27.14.