[PATCH 18/21] Base auto-generated name prefixes on productName, not device type.

David Lehman dlehman at redhat.com
Thu Aug 9 20:14:06 UTC 2012


On Thu, 2012-08-09 at 15:51 -0400, Chris Lumens wrote:
> > @@ -1323,6 +1321,9 @@ class Storage(object):
> >  
> >      def suggestContainerName(self, hostname=None, prefix=""):
> >          """ Return a reasonable, unused device name. """
> > +        if not prefix:
> > +            prefix = productName.lower().replace(" ", "_")
> > +
> >          # try to create a device name incorporating the hostname
> >          if hostname not in (None, "", 'localhost', 'localhost.localdomain'):
> >              template = "%s_%s" % (prefix, hostname.split('.')[0].lower())
> 
> I know we talked about a potential fix for the following problem in IRC:
> 
> If your product is "Red Hat Enterprise Linux", this is going to result
> in a very long container name.

Yeah. I kept thinking I had a more evolved version of this patch but was
unable to find it until just now. I'll send a new version shortly as a
reply to this.

Dave




More information about the anaconda-patches mailing list