Hi All:

I'd like to point out that there are images/livecd's that are failing to
build for rawhide[1]. With the change in /etc/resolv.conf handling the
builds are now failing with "IOError: [Errno 2] No such file or directory:
'/var/tmp/imgcreate-ChCMoB/install_root/etc/resolv.conf'" Looking the code
in python-ingcreate[3] it appears that /etc/resolv.conf is opened,
permissions changed, then closed. Think the sequence should be open, close,
change permissions, or can that block of code go away? At any rate patch to
reverse the order.

diff --git a/imgcreate/kickstart.py b/imgcreate/kickstart.py
index aef3ef2..b87fd59 100644
--- a/imgcreate/kickstart.py
+++ b/imgcreate/kickstart.py
@@ -441,8 +441,8 @@ class SelinuxConfig(KickstartConfig):
         for fn in ("/etc/resolv.conf",):
             path = self.path(fn)
             f = file(path, "w+")
-            os.chmod(path, 0644)
             f.close()
+            os.chmod(path, 0644)
 
         if ksselinux.selinux == ksconstants.SELINUX_DISABLED:
             return



Jerry


1. https://apps.fedoraproject.org/releng-dash/
2. https://kojipkgs.fedoraproject.org//work/tasks/970/7430970/root.log
3. https://git.fedorahosted.org/cgit/livecd/tree/imgcreate/kickstart.py
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Reply via email to