summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Zaman <perfinion@gentoo.org>2015-12-09 12:02:48 +0800
committerJason Zaman <perfinion@gentoo.org>2015-12-09 12:03:10 +0800
commit08f9e12847155ee345ceaf754d5b5c196527144f (patch)
tree86bc41f5f970bee3b5796f043e40652619a9ad85 /sys-libs/libselinux
parentwww-plugins/chrome-binary-plugins: automated update (diff)
downloadgentoo-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.ebuild5
-rw-r--r--sys-libs/libselinux/libselinux-9999.ebuild5
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 642336e6c51..8f366146c48 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 1f1d1d20aff..01b4776a012 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
}