selinux/policycoreutils
Vit Mojzis 671f83b42b policycoreutils/sepolicy: Check get_rpm_nvr_list() return value
get_rpm_nvr_list can fail to get the version of selinux-policy rpm
package, which leads to error during spec file creation (attempt to
invoke __getitem__ of "None" object).

This patch sets the policy number to "0.0.0" in case rpm failed to
get it. This change should be safe because it affects only an example
of spec file.

Variable "POLICYCOREUTILSVER" was removed (unused).

fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1321499

Failed to retrieve rpm info for selinux-policy
Traceback (most recent call last):
  File "/bin/selinux-polgengui", line 360, in forward
    self.generate_policy()
  File "/bin/selinux-polgengui", line 506, in generate_policy
    self.info(my_policy.generate(outputdir))
  File "/usr/lib64/python2.7/site-packages/sepolicy/generate.py", line 1382, in generate
    out += "%s # %s\n" % (self.write_spec(out_dir), _("Spec file"))
  File "/usr/lib64/python2.7/site-packages/sepolicy/generate.py", line 1228, in write_spec
    fd.write(self.generate_spec())
  File "/usr/lib64/python2.7/site-packages/sepolicy/generate.py", line 1190, in generate_spec
    selinux_policyver = get_rpm_nvr_list("selinux-policy")[1]
  TypeError: 'NoneType' object has no attribute '__getitem__'

Signed-off-by: Vit Mojzis <vmojzis@redhat.com>
2016-08-09 15:55:08 -04:00
..
.tx Update Translations 2013-10-24 13:58:39 -04:00
audit2allow policycoreutils: audit2* - ignore setlocale errors 2015-08-25 15:06:37 -04:00
gui policycoreutils/gui: py3 support for modules that changed name 2016-08-05 12:57:08 -04:00
hll policycoreutils/hll/pp: Warn if module name different than output filename 2016-04-12 10:41:04 -04:00
load_policy Minor manpages improvements 2013-11-06 09:36:33 -05:00
man Merge branch 'fedora' into master-merge 2013-10-24 15:24:17 -04:00
mcstrans policycoreutils: Fix PEP8 issues 2015-07-24 16:07:13 +08:00
newrole policycoreutils: newrole: add missing defined in #if 2016-02-01 08:54:30 -05:00
po policycoreutils: Remove unused autoconf files from po/ 2016-07-25 13:54:49 -04:00
restorecond Fix gcc -Wstrict-prototypes warnings 2014-10-02 09:56:38 -04:00
run_init open_init_pty: Do not error on EINTR 2016-07-12 15:35:23 -04:00
sandbox policycoreutils: Don't use subprocess.getstatusoutput() in Python 2 code 2016-08-09 15:55:02 -04:00
scripts policycoreutils: Don't use subprocess.getstatusoutput() in Python 2 code 2016-08-09 15:55:02 -04:00
secon Added missing descriptions for --*-key params in secon man page. 2016-01-12 08:39:14 -05:00
semanage semanage: add auditing of changes in records 2016-08-09 15:54:57 -04:00
semodule policycoreutils: semodule - remove 'q' from getopt string 2016-08-04 08:42:15 -04:00
semodule_deps Laurent Bigonville patch to fix various minor manpage issues and correct section numbering. 2013-10-24 13:58:37 -04:00
semodule_expand
semodule_link
semodule_package libselinux, policycoreutils: Man page warning fixes 2015-11-24 16:32:13 -05:00
sepolgen-ifgen
sepolicy policycoreutils/sepolicy: Check get_rpm_nvr_list() return value 2016-08-09 15:55:08 -04:00
sestatus Laurent Bigonville patch to fix various minor manpage issues and correct section numbering. 2013-10-24 13:58:37 -04:00
setfiles policycoreutils: setfiles/restorecon: fix -r/-R option 2015-04-16 11:40:55 -04:00
setsebool libselinux, policycoreutils: Man page warning fixes 2015-11-24 16:32:13 -05:00
.gitignore policycoreutils: add a HLL compiler to convert policy packages (.pp) to CIL 2014-08-26 08:03:31 -04:00
ChangeLog Updated policycoreutils ChangeLog. 2016-08-08 15:56:46 -04:00
COPYING
Makefile policycoreutils: add a HLL compiler to convert policy packages (.pp) to CIL 2014-08-26 08:03:31 -04:00
VERSION Update ChangeLog and VERSION for final release 2016-02-23 11:31:41 -05:00