Bug 620522

Summary: ImportError: No module named sepolgen.refparser
Product: [Fedora] Fedora Reporter: Michael Schwendt <bugs.michael>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED CANTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: dmalcolm, dwalsh, jantill, mgrepl, pmatilai
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-26 20:00:40 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:
Bug Depends On:    
Bug Blocks: 620817    
Attachments:
Description Flags
full upgrade yum.log none

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.