summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClark Williams <williams@redhat.com>2009-12-23 12:43:03 -0600
committerClark Williams <williams@redhat.com>2009-12-23 12:43:03 -0600
commitfb6f1560de7cd9acbb70d9b6edbfca3d97c49a63 (patch)
treee6e4d549bc3f6762063260e9991bf1a347bad28e
parent372f39c05545f9d3333a5be26d97100dc400b178 (diff)
downloadmock-fb6f1560de7cd9acbb70d9b6edbfca3d97c49a63.tar.gz
mock-fb6f1560de7cd9acbb70d9b6edbfca3d97c49a63.tar.xz
mock-fb6f1560de7cd9acbb70d9b6edbfca3d97c49a63.zip
add IPv6 localhost entry to /etc/hosts and fix build issue
Add a default IPv6 entry for BZ545435, to fix failure in curl test suite. In addition, remove the result of gethostname(), since this causes koji to insert 'localhost' into rpms Signed-off-by: Clark Williams <williams@redhat.com>
-rwxr-xr-xpy/mock.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/py/mock.py b/py/mock.py
index 7d82175..46ffbbb 100755
--- a/py/mock.py
+++ b/py/mock.py
@@ -523,8 +523,10 @@ def main(ret):
# default /etc/hosts contents
if not config_opts['use_host_resolv'] and not config_opts['files'].has_key('etc/hosts'):
- config_opts['files']['etc/hosts'] = "127.0.0.1 localhost localhost.localdomain %s\n" % gethostname();
-
+ config_opts['files']['etc/hosts'] = '''
+127.0.0.1 localhost localhost.localdomain
+::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
+'''
# elevate privs
uidManager._becomeUser(0, 0)