platform_external_selinux/policycoreutils/sepolicy
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
..
sepolicy policycoreutils/sepolicy: Check get_rpm_nvr_list() return value 2016-08-09 15:55:08 -04:00
.gitignore These are massive changes involved in building new GUI. 2013-10-24 13:58:41 -04:00
common.h sepolicy: Add python3 PyInt and PyString defs 2016-08-05 12:57:08 -04:00
info.c policycoreutils: sepolicy: rename policy global variable 2016-02-11 08:36:27 -05:00
Makefile policycoreutils: sepolicy: do not overwrite CFLAGS 2016-02-11 08:42:45 -05:00
org.selinux.conf These are massive changes involved in building new GUI. 2013-10-24 13:58:41 -04:00
org.selinux.policy org.selinux.policy: Require auth_admin_keep for all actions. 2015-04-16 09:40:31 -04:00
org.selinux.service These are massive changes involved in building new GUI. 2013-10-24 13:58:41 -04:00
policy.c sepolicy: C Module init for python3 2016-08-05 12:57:08 -04:00
policy.h policycoreutils: sepolicy: rename policy global variable 2016-02-11 08:36:27 -05:00
search.c policycoreutils: sepolicy: rename policy global variable 2016-02-11 08:36:27 -05:00
selinux_client.py policycoreutils: Fix PEP8 issues 2015-07-24 16:07:13 +08:00
selinux_server.py policycoreutils: Fix PEP8 issues 2015-07-24 16:07:13 +08:00
sepolgen.8 These are massive changes involved in building new GUI. 2013-10-24 13:58:41 -04:00
sepolicy-bash-completion.sh These are massive changes involved in building new GUI. 2013-10-24 13:58:41 -04:00
sepolicy-booleans.8 policycoreutils: sepolicy: new command to unite small utilities 2013-02-05 20:14:28 -05:00
sepolicy-communicate.8 libselinux, policycoreutils: Man page warning fixes 2015-11-24 16:32:13 -05:00
sepolicy-generate.8 Minor manpages improvements 2013-11-06 09:36:33 -05:00
sepolicy-gui.8 These are massive changes involved in building new GUI. 2013-10-24 13:58:41 -04:00
sepolicy-interface.8 These are massive changes involved in building new GUI. 2013-10-24 13:58:41 -04:00
sepolicy-manpage.8 These are massive changes involved in building new GUI. 2013-10-24 13:58:41 -04:00
sepolicy-network.8 These are massive changes involved in building new GUI. 2013-10-24 13:58:41 -04:00
sepolicy-transition.8 policycoreutils: sepolicy: new command to unite small utilities 2013-02-05 20:14:28 -05:00
sepolicy.8 These are massive changes involved in building new GUI. 2013-10-24 13:58:41 -04:00
sepolicy.desktop These are massive changes involved in building new GUI. 2013-10-24 13:58:41 -04:00
sepolicy.py policycoreutils: gettext compat for py2 and 3 2016-08-05 12:57:08 -04:00
sepolicy_16.png Add new icons for sepolicy gui 2013-11-13 11:07:17 -05:00
sepolicy_22.png Add new icons for sepolicy gui 2013-11-13 11:07:17 -05:00
sepolicy_32.png Add new icons for sepolicy gui 2013-11-13 11:07:17 -05:00
sepolicy_48.png Add new icons for sepolicy gui 2013-11-13 11:07:17 -05:00
sepolicy_256.png Add new icons for sepolicy gui 2013-11-13 11:07:17 -05:00
setup.py policycoreutils: Fix PEP8 issues 2015-07-24 16:07:13 +08:00
test_sepolicy.py sepolicy: Add python3 support to test_sepolicy.py 2016-08-08 15:50:18 -04:00