diff options
author | Jason Zaman <perfinion@gentoo.org> | 2015-12-09 12:02:48 +0800 |
---|---|---|
committer | Jason Zaman <perfinion@gentoo.org> | 2015-12-09 12:03:10 +0800 |
commit | 08f9e12847155ee345ceaf754d5b5c196527144f (patch) | |
tree | 86bc41f5f970bee3b5796f043e40652619a9ad85 /sys-libs/libselinux | |
parent | www-plugins/chrome-binary-plugins: automated update (diff) | |
download | gentoo-08f9e12847155ee345ceaf754d5b5c196527144f.tar.gz gentoo-08f9e12847155ee345ceaf754d5b5c196527144f.tar.bz2 gentoo-08f9e12847155ee345ceaf754d5b5c196527144f.zip |
sys-libs/libselinux: only recompile contexts if the files are installed
During stage building, the fcontext files might not exist on the system yet
Package-Manager: portage-2.2.24
Diffstat (limited to 'sys-libs/libselinux')
-rw-r--r-- | sys-libs/libselinux/libselinux-2.4.ebuild | 5 | ||||
-rw-r--r-- | sys-libs/libselinux/libselinux-9999.ebuild | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/sys-libs/libselinux/libselinux-2.4.ebuild b/sys-libs/libselinux/libselinux-2.4.ebuild index 642336e6c519..8f366146c484 100644 --- a/sys-libs/libselinux/libselinux-2.4.ebuild +++ b/sys-libs/libselinux/libselinux-2.4.ebuild @@ -136,7 +136,10 @@ pkg_postinst() { touch /etc/selinux/${POLTYPE}/contexts/files/file_contexts.local || die # Fix bug 516608 for EXPRFILE in file_contexts file_contexts.homedirs file_contexts.local ; do - sefcontext_compile /etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE} || die "Failed to recompile contexts" + if [[ -f ${EXPRFILE} ]]; then + sefcontext_compile /etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE} \ + || die "Failed to recompile contexts" + fi done done } diff --git a/sys-libs/libselinux/libselinux-9999.ebuild b/sys-libs/libselinux/libselinux-9999.ebuild index 1f1d1d20aff7..01b4776a0127 100644 --- a/sys-libs/libselinux/libselinux-9999.ebuild +++ b/sys-libs/libselinux/libselinux-9999.ebuild @@ -146,7 +146,10 @@ pkg_postinst() { touch /etc/selinux/${POLTYPE}/contexts/files/file_contexts.local || die # Fix bug 516608 for EXPRFILE in file_contexts file_contexts.homedirs file_contexts.local ; do - sefcontext_compile /etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE} || die "Failed to recompile contexts" + if [[ -f ${EXPRFILE} ]]; then + sefcontext_compile /etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE} \ + || die "Failed to recompile contexts" + fi done done } |