/dev/std* missing in mock

Clark Williams williams at redhat.com
Tue Mar 21 19:14:55 UTC 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Toshio Kuratomi wrote:

>Hi all,
>
>Seth is a bit tapped for time right now, could someone with mock checkin
>rights take a look at this bug?
> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=179852
>
>The current understanding in the bug report is that the buildsystem
>should have /dev/std{in,out,err} added.
>
Toshio,

The attached patch seems to work on my system. Can you try it to
confirm and if it fixes your problem I'll check it in (unless someone
objects strenuously).

Clark


Index: mock.py
===================================================================
RCS file: /cvs/fedora/mock/mock.py,v
retrieving revision 1.37
diff -u -r1.37 mock.py
- --- mock.py     15 Mar 2006 22:14:38 -0000      1.37
+++ mock.py     21 Mar 2006 19:12:40 -0000
@@ -555,6 +555,14 @@
         if not os.path.exists(devpath):
             os.symlink('../proc/self/fd', devpath)
        
+        fd = 0
+        for item in ('stdin', 'stdout', 'stderr'):
+            devpath =  os.path.join(self.rootdir, 'dev', item)
+            if not os.path.exists(devpath):
+                fdpath = os.path.join('../proc/self/fd', str(fd))
+                os.symlink(fdpath, devpath)
+            fd += 1
+
         for item in [os.path.join(self.rootdir, 'etc', 'mtab'),
                      os.path.join(self.rootdir, 'etc', 'fstab'),
                      os.path.join(self.rootdir, 'var', 'log',
'yum.log')]:

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFEIFCvHyuj/+TTEp0RAk2mAKCId7zoU+2rflmbPgDSXpUbmezxpQCeIf/n
H1b/VAVtfIK1HQTvLdnr7xE=
=FckP
-----END PGP SIGNATURE-----




More information about the Fedora-buildsys-list mailing list