Bug 620522 - ImportError: No module named sepolgen.refparser
Summary: ImportError: No module named sepolgen.refparser
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 14
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: Python27
TreeView+ depends on / blocked
 
Reported: 2010-08-02 18:52 UTC by Michael Schwendt
Modified: 2014-01-21 06:18 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-05-26 20:00:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
full upgrade yum.log (55.56 KB, text/plain)
2010-08-03 17:23 UTC, Michael Schwendt
no flags Details

Description Michael Schwendt 2010-08-02 18:52:35 UTC
Upgraded a Fedora 13 installation to Fedora 14 (Branched). Saw this:

  Updating       : policycoreutils-2.0.83-5.fc14.x86_64                418/1742 
  Updating       : selinux-policy-3.8.8-8.fc14.noarch                  419/1742 
Traceback (most recent call last):
  File "/usr/bin/sepolgen-ifgen", line 36, in <module>
    import sepolgen.refparser as refparser
ImportError: No module named sepolgen.refparser
  Updating       : initscripts-9.16-1.fc14.x86_64                      420/1742 

Didn't examine it further.

Comment 1 Daniel Walsh 2010-08-03 15:19:26 UTC
I believe this is caused by python2.7 being updated but policycoreutils-python is not updated yet.

Can  you attach the full log.

selinux-policy update triggers policycoreutils-python to execute sepolgen-ifgen.

sepolgen-ifgen is running with python-2.7 and looks in 
/usr/lib64/python2.7/site-packages ...


Instead of 2.6 where the sepolgen.refparser package is currently installed,  When policycoreutils-python updates sepolgen.refparser would be in the 2.7 directory.

Comment 2 Daniel Walsh 2010-08-03 15:21:22 UTC
From policycoreutils.spec:
%triggerin python -- selinux-policy
selinuxenabled && [ -f /usr/share/selinux/devel/include/build.conf ] && /usr/bin/sepolgen-ifgen 2>/dev/null
exit 0

Comment 3 Daniel Walsh 2010-08-03 15:27:19 UTC
rpm and yum guys, is there a way for me to say trigger requires that the package it is in is updated?


Meaning if there is an update to policycoreutils-python and a trigger happens, the trigger does not fire until the packages is updated?

As a last resort, I could push an update to F13 to add 2>/dev/null to this line to ignore the error on the update.

Comment 4 Michael Schwendt 2010-08-03 17:23:31 UTC
Created attachment 436330 [details]
full upgrade yum.log

Your theory seems to be correct:

Aug 02 20:43:11 Updated: python-2.7-7.fc14.x86_64
...
Aug 02 20:46:32 Updated: selinux-policy-3.8.8-8.fc14.noarch
...
Aug 02 20:47:11 Updated: policycoreutils-python-2.0.83-5.fc14.x86_64

Comment 5 Fedora Admin XMLRPC Client 2010-11-08 21:52:00 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 6 Fedora Admin XMLRPC Client 2010-11-08 21:54:58 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 7 Fedora Admin XMLRPC Client 2010-11-08 21:55:34 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.


Note You need to log in before you can comment on or make changes to this bug.