我想释放.mo
文件占用的空间/usr/share/locale
,因此我用符号链接替换了该目录,/tmp/.locale-blackhole
并配置了该目录的自动创建
/etc/tmpfiles.d/locale-blackhole.conf
:
# Conserve disk space for unused locales
# pre-create the dir below and clean 1-day-old files periodically:
d /tmp/.locale-blackhole 0755 root root 1d
# pre-create symlinks
L+ /tmp/.locale-blackhole/locale.alias - - - - ../../usr/share/locale.persist/locale.alias
L+ /tmp/.locale-blackhole/en - - - - ../../usr/share/locale.persist/en
L+ /tmp/.locale-blackhole/en_US - - - - ../../usr/share/locale.persist/en_US
L+ /tmp/.locale-blackhole/fr - - - - ../../usr/share/locale.persist/fr
# do not cleanup the paths below:
x /tmp/.locale-blackhole/locale.alias
x /tmp/.locale-blackhole/en
x /tmp/.locale-blackhole/en_US
x /tmp/.locale-blackhole/fr
x /tmp/.locale-blackhole/keepme
它可以工作,除非glibc-common
更新或重新安装时,符号链接/tmp/.locale-blackhole/locale.alias
被替换为常规文件。
所以我想配置rpm
为始终将此文件重新定位到/usr/share/locale.persist/
.这可能吗?
或者更好的是,是否可以/usr/share/locale/
从 rpm 提取中排除某些语言?