Bug 677121

Summary: [abrt] fedpkg-0.5.3.0-1.fc14: __init__.py:111:_name_from_spec:IndexError: list index out of range
Product: [Fedora] Fedora Reporter: Masami Ichikawa <masami256>
Component: fedora-packagerAssignee: David Cantrell <dcantrell>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 14CC: bloch, dcantrell, dennis, jskarvad, rhbugs
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:08eafd86
Fixed In Version: fedora-packager-0.5.6.0-1.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-07 20:56:58 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
File: backtrace none

Description Masami Ichikawa 2011-02-13 14:48:16 UTC
abrt version: 1.1.14
architecture: x86_64
cmdline: /usr/bin/python /usr/bin/fedpkg srpm
component: fedora-packager
executable: /usr/bin/fedpkg
kernel: 2.6.35.11-83.fc14.x86_64
package: fedpkg-0.5.3.0-1.fc14
reason: __init__.py:111:_name_from_spec:IndexError: list index out of range
release: Fedora release 14 (Laughlin)
time: 1297607810
uid: 500

backtrace
-----
__init__.py:111:_name_from_spec:IndexError: list index out of range

Traceback (most recent call last):
  File "/usr/bin/fedpkg", line 1259, in <module>
    args.command(args)
  File "/usr/bin/fedpkg", line 673, in srpm
    mymodule = pyfedpkg.PackageModule(args.path, args.dist)
  File "/usr/lib/python2.7/site-packages/pyfedpkg/__init__.py", line 1083, in __init__
    self.module = _name_from_spec(os.path.join(self.path, self.spec))
  File "/usr/lib/python2.7/site-packages/pyfedpkg/__init__.py", line 111, in _name_from_spec
    return output.split()[0]
IndexError: list index out of range

Local variables in innermost frame:
output: ''
cmd: ['rpm', '-q', '--qf', '%{NAME} ', '--specfile', '/home/masami/fedora-src/dillo/.#dillo.spec']
proc: <subprocess.Popen object at 0x7f3219cc3690>
spec: '/home/masami/fedora-src/dillo/.#dillo.spec'
error: "error: Unable to open /home/masami/fedora-src/dillo/.#dillo.spec: No such file or directory\nerror: query of specfile /home/masami/fedora-src/dillo/.#dillo.spec failed, can't parse\n"

comment
-----
When open a file by emacs, emacs creates a temporary file such as .#dillo.spec. so if I run 'fedpkg srpm' while open a .spec file, 'fedpkg srpm' fails. If I close the spec file then run it, srpm file was created successfully.
 It would be nice if fedpkg ignores such temporary files.

How to reproduce
-----
1.Clone a package from pkgs.fp.o
2.Open its .spec by emacs
3.run 'fedpkg srpm'

Comment 1 Masami Ichikawa 2011-02-13 14:48:19 UTC
Created attachment 478471 [details]
File: backtrace

Comment 2 Jesse Keating 2011-02-14 18:03:29 UTC
Hrm, that's interesting.  I guess I'll have to throw out things that start with ".".  Out of curiosity, can you verify that this stil happens with 0.5.5-2 ?  It should be in updates-testing.

Comment 3 Masami Ichikawa 2011-02-14 22:10:32 UTC
I tried to reproduce with fedpkg-0.5.5.0-2.fc14.noarch and I got following result.
 
[masami@moon]~/fedora-src/dillo% fedpkg srpm
error: Unable to open /home/masami/fedora-src/dillo/.#dillo.spec: No such file or directory
error: query of specfile /home/masami/fedora-src/dillo/.#dillo.spec failed, can't parse


Thanks,

Comment 4 Jaroslav Škarvada 2011-02-15 09:12:08 UTC
Package: fedpkg-0.5.3.0-1.fc14
Architecture: x86_64
OS Release: Fedora release 14 (Laughlin)


How to reproduce
-----
1. I had changelog withou 'header' line (did not start with *)
2. Invoked fedpkg clog
3. Abrt fires up


Comment
-----
Well my changelog was not OK, but it should warn instead of abrt.

Comment 5 Jesse Keating 2011-02-16 17:44:33 UTC
I've fixed the original bug here upstream, will be in the next build.

Jaroslav I believe your issue is fixed in 0.5.5 which should be in updates-testing.

Comment 6 Adam Huffman 2011-02-17 17:40:32 UTC
Package: fedpkg-0.5.3.0-1.fc14
Architecture: x86_64
OS Release: Fedora release 14 (Laughlin)


How to reproduce
-----
1. ran fedpkg build on f13 branch 
2.
3.


Comment
-----
There was a conflict in the .spec file, meaning it was malformed

Comment 7 Fedora Update System 2011-02-23 20:07:10 UTC
fedora-packager-0.5.6.0-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/fedora-packager-0.5.6.0-1.fc14

Comment 8 Fedora Update System 2011-02-24 06:27:32 UTC
fedora-packager-0.5.6.0-1.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update fedora-packager'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/fedora-packager-0.5.6.0-1.fc14

Comment 9 Fedora Update System 2011-03-07 20:56:43 UTC
fedora-packager-0.5.6.0-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.