Thanks Mark and Panu.

2009/8/26 Panu Matilainen <pmati...@laiskiainen.org>

> On Mon, 24 Aug 2009, Giles Anderson wrote:
>
>  On Monday 24 August 2009 15:49:39 Mark Hatle wrote:
>>
>>> RPM queries the name of the local machine from the DNS.
>>>
>>> So if you have the IP set to 127.0.0.1, and the DNS entry of
>>> locahost.localdomain, then that is what you will get.
>>>
>>> Fix the host's IP address and DNS entry to get a reasonable value.
>>>
>>
> To be exact, rpm queries the system hostname, and then performs a DNS
> lookup of that hostname. If the DNS query fails you get a warning but rpm
> uses whatever the hostname happens to be, otherwise it uses the name gotten
> from DNS.
>
>  Thats what I have done, but its the last item in the list.
>>
>> Presumably it has to be first?
>>
>
> Yes, the rest are considered aliases. For example on my F11 laptop:
> [pmati...@localhost ~]$ hostname
> localhost.localdomain
> [pmati...@localhost ~]$ python -c "import socket; print
> socket.gethostbyname_ex(socket.gethostname())"
> ('localhost', ['localhost.localdomain', 'localhost4',
> 'localhost4.localdomain4', 'localhost.localdomain', 'localhost6',
> 'localhost6.localdomain6'], ['127.0.0.1', '127.0.0.1'])
>
> The hostname is "localhost.localdomain" but the first entry in /etc/hosts
> is "localhost" so that is what gethostbyname() returns, and gets used by rpm
> as the build host.
>
>        - Panu -
>
>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to