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

Chris Lumens clumens at redhat.com
Thu Aug 9 19:51:14 UTC 2012


> @@ -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.

- Chris


More information about the anaconda-patches mailing list