Hi, I'm a bit concerned about making the option -a not working anymore. Are you sure making -a not working doesn't brake any other programs?. Shouldn't we stick to the standard behavior with base programs like this one?
On Mon, Aug 03, 2009 at 10:25:43PM +0200, Michael Stapelberg wrote: > Hi, > > I can confirm this behaviour. While one can work around it using > "options inet6" in /etc/resolv.conf, a better solution is converting hostname > to use getaddrinfo() instead of gethostbyname(). getaddrinfo() is the > preferred function to resolve addresses, see for example this entry from > Ulrich > Drepper: > > http://udrepper.livejournal.com/16116.html > > So, after applying the patch I attached, the new version of hostname correctly > handles my IPv6-only host: > > $ hostname > x200 > $ hostname -f > No address associated with name > $ hostname -i > 192.168.1.42 > $ ./hostname-patched > x200 > $ ./hostname-patched -f > x200.zekjur.net > $ ./hostname-patched -i > 2001:4d88:1008:4242:21f:16ff:fe06:3aab > > Note that using getaddrinfo() removes old cruft, that is, the aliases field > returned by gethostbyname(). Thus, hostname -a will not work anymore. I???ve > documented this in the manpage and left the option available for backwards > compatibility. > > Please apply the attached patch, > > Thanks and best regards, > Michael -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org