Bug 675803

Summary: "ERROR: sequence item 1: expected string, int found" when trying to do anything
Product: [Fedora] Fedora Reporter: Carlos Laviola <carlos.laviola>
Component: mockAssignee: Clark Williams <williams>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: dag, dcantrell, lottcaskey, mebrown, williams
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: mock-1.1.10-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 04:37:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Fixes missing paren for makeChrootPath at line 415 (when creating 'dev/tty'). none

Description Carlos Laviola 2011-02-07 19:45:09 UTC
Hi,

When trying to run mock version 1.0.15 from the mock-1.0 branch on git under CentOS, anything I try to do eventually gives me this stack trace:

INFO: Results and/or logs in: /var/lib/mock/epel-5-i386/result
ERROR: sequence item 1: expected string, int found
Traceback (most recent call last):
  File "/usr/sbin/mock", line 845, in ?
    main(retParams)
  File "/usr/sbin/mock", line 787, in main
    do_buildsrpm(config_opts, chroot, options, args)
  File "/usr/sbin/mock", line 492, in do_buildsrpm
    chroot.init()
  File "<peak.util.decorators.rewrap wrapping mock.backend.init at 0x-4842A90C>", line 3, in init
    def init(self): return __decorated(self)
  File "/usr/lib/python2.4/site-packages/mock/trace_decorator.py", line 70, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.4/site-packages/mock/backend.py", line 234, in init
    self._init()
  File "<peak.util.decorators.rewrap wrapping mock.backend._init at 0x-4842ACC4>", line 3, in _init
    def _init(self): return __decorated(self)
  File "/usr/lib/python2.4/site-packages/mock/trace_decorator.py", line 70, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.4/site-packages/mock/backend.py", line 348, in _init
    self._setupDev()
  File "<peak.util.decorators.rewrap wrapping mock.backend._setupDev at 0x-48430084>", line 3, in _setupDev
    def _setupDev(self): return __decorated(self)
  File "/usr/lib/python2.4/site-packages/mock/trace_decorator.py", line 70, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.4/site-packages/mock/backend.py", line 415, in _setupDev
    os.mknod(self.makeChrootPath("dev/tty", stat.S_IFCHR|0666, os.makedev(5, 0)))
  File "<peak.util.decorators.rewrap wrapping mock.backend.makeChrootPath at 0x-4842A3CC>", line 3, in makeChrootPath
    def makeChrootPath(self, *args): return __decorated(self, *args)
  File "/usr/lib/python2.4/site-packages/mock/trace_decorator.py", line 70, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.4/site-packages/mock/backend.py", line 228, in makeChrootPath
    tmp = self._rootdir + "/" + "/".join(args)
TypeError: sequence item 1: expected string, int found

Comment 1 Clark Williams 2011-02-20 19:28:24 UTC
Carlos, 

I missed this BZ when I pushed mock-1.0.16/mock-1.1.9. It fixes the typo you're seeing.

Comment 2 Lott Caskey 2011-03-01 16:09:44 UTC
Modify line 415 of /usr/lib/python2.4/site-packages/mock/backend.py.

Old:
os.mknod(self.makeChrootPath("dev/tty", stat.S_IFCHR|0666, os.makedev(5, 0)))


New:
os.mknod(self.makeChrootPath("dev/tty"), stat.S_IFCHR|0666, os.makedev(5, 0))

Comment 3 Lott Caskey 2011-03-01 16:14:07 UTC
Created attachment 481674 [details]
Fixes missing paren for makeChrootPath at line 415 (when creating 'dev/tty').

Fixes the following error:

Traceback (most recent call last):
  File "/usr/sbin/mock", line 858, in ?
    main(retParams)
  File "/usr/sbin/mock", line 797, in main
    do_rebuild(config_opts, chroot, args)
  File "<peak.util.decorators.rewrap wrapping __main__.do_rebuild at 0x2ACDFAD4E0C8>", line 3, in do_rebuild
    def do_rebuild(config_opts, chroot, srpms): return __decorated(config_opts, chroot, srpms)
  File "/usr/lib/python2.4/site-packages/mock/trace_decorator.py", line 70, in trace
    result = func(*args, **kw)
  File "/usr/sbin/mock", line 467, in do_rebuild
    chroot.init()
  File "<peak.util.decorators.rewrap wrapping mock.backend.init at 0x2ACDF85452A8>", line 3, in init
    def init(self): return __decorated(self)
  File "/usr/lib/python2.4/site-packages/mock/trace_decorator.py", line 70, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.4/site-packages/mock/backend.py", line 234, in init
    self._init()
  File "<peak.util.decorators.rewrap wrapping mock.backend._init at 0x2ACDF8541668>", line 3, in _init
    def _init(self): return __decorated(self)
  File "/usr/lib/python2.4/site-packages/mock/trace_decorator.py", line 70, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.4/site-packages/mock/backend.py", line 348, in _init
    self._setupDev()
  File "<peak.util.decorators.rewrap wrapping mock.backend._setupDev at 0x2ACDF8540B90>", line 3, in _setupDev
    def _setupDev(self): return __decorated(self)
  File "/usr/lib/python2.4/site-packages/mock/trace_decorator.py", line 70, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.4/site-packages/mock/backend.py", line 415, in _setupDev
    os.mknod(self.makeChrootPath("dev/tty", stat.S_IFCHR|0666, os.makedev(5, 0)))
  File "<peak.util.decorators.rewrap wrapping mock.backend.makeChrootPath at 0x2ACDF8545B18>", line 3, in makeChrootPath
    def makeChrootPath(self, *args): return __decorated(self, *args)
  File "/usr/lib/python2.4/site-packages/mock/trace_decorator.py", line 70, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.4/site-packages/mock/backend.py", line 228, in makeChrootPath
    tmp = self._rootdir + "/" + "/".join(args)
TypeError: sequence item 1: expected string, int found

Comment 4 Clark Williams 2011-03-01 16:38:50 UTC
I might not have been clear in the comment above. Mock-1.1.9 fixes this, I just didn't add this BZ to the update so it didn't get modified automatically by bohdi.

Comment 5 Dag Wieers 2011-03-07 12:45:05 UTC
Apparently this was not fixed in 1.1.9 (at least not in the tarball from the mock-1.1.9-1.el6 SRPM in EPEL).

Thanks to Google/Bugzilla this was quickly resolved :-)

PS It would be useful if the project would make public tarballs again.

Comment 6 Clark Williams 2011-03-07 14:41:46 UTC
Apologies Carlos, Lott and Dag, I surely did miss adding it in my git tree. 

I'll push 1.1.10 out this week and it will definitely be fixed there.

Comment 7 Fedora Admin XMLRPC Client 2011-03-11 18:09:17 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 8 Clark Williams 2011-05-13 16:36:26 UTC
Addressed in a different way since we're going back to always creating /dev/tty and /dev/ptmx.

Comment 9 Fedora Update System 2011-05-13 20:31:23 UTC
mock-1.1.10-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/mock-1.1.10-1.fc15

Comment 10 Fedora Update System 2011-05-13 20:36:30 UTC
mock-1.1.10-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/mock-1.1.10-1.fc14

Comment 11 Fedora Update System 2011-05-13 20:40:46 UTC
mock-1.0.17-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.17-1.el5

Comment 12 Fedora Update System 2011-05-13 20:44:55 UTC
mock-1.1.10-1.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/mock-1.1.10-1.fc13

Comment 13 Fedora Update System 2011-05-13 20:49:13 UTC
mock-1.1.10-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.10-1.el6

Comment 14 Fedora Update System 2011-05-14 00:01:23 UTC
Package mock-1.1.10-1.el6:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing mock-1.1.10-1.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/mock-1.1.10-1.el6
then log in and leave karma (feedback).

Comment 15 Fedora Update System 2011-05-19 04:32:53 UTC
mock-1.1.10-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2011-05-25 02:40:11 UTC
mock-1.1.10-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2011-05-25 03:14:45 UTC
mock-1.1.10-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2011-06-02 19:04:23 UTC
mock-1.0.17-1.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2011-06-02 19:14:26 UTC
mock-1.1.10-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.