xorg-font-common: redirect stderr to /dev/null in pkg_postinst
PATCH 1/2 xorg-font-common: redirect stderr to /dev/null in pkg_postinst
Redirect stderr to /dev/null to avoid the error:
$ opkg install encodings Installing encodings (1.0.5) on root Configuring encodings. find: /usr/lib/X11/fonts: No such file or directory
--- meta/recipes-graphics/xorg-font/xorg-font-common.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-graphics/xorg-font/xorg-font-common.inc +2 -2
@@ -32,11 +32,11 @@ FILES_${PN} += " ${libdir}/X11/fonts ${datadir}" PACKAGE_WRITE_DEPS += "mkfontdir-native mkfontscale-native" pkg_postinst_${PN} () { - for fontdir in `find $D/usr/lib/X11/fonts -type d`; do + for fontdir in `find $D/usr/lib/X11/fonts -type d 2>/dev/null`; do mkfontdir $fontdir mkfontscale $fontdir done - for fontdir in `find $D/usr/share/fonts/X11 -type d`; do + for fontdir in `find $D/usr/share/fonts/X11 -type d 2>/dev/null`; do mkfontdir $fontdir mkfontscale $fontdir done
Signature · 1 line
2.17.1
PATCH 2/2 encodings: RDEPEND on mkfontdir mkfontscale
Fix pkg_postinst error when install encodings via online repo:
$ opkg install encodings Installing encodings (1.0.5) on root Configuring encodings. /var/lib/opkg/info/encodings.postinst: line 7: mkfontdir: not found Collected errors: * pkg_run_script: package "encodings" postinst script returned status 127. * opkg_configure: encodings.postinst returned 127.
--- meta/recipes-graphics/xorg-font/encodings_1.0.5.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/xorg-font/encodings_1.0.5.bb +1 -1
@@ -10,7 +10,7 @@ PE = "1" PR = "${INC_PR}.1" DEPENDS = "mkfontscale-native mkfontdir-native font-util-native" -RDEPENDS_${PN} = "" +RDEPENDS_${PN} = "mkfontdir mkfontscale" SRC_URI += "file://nocompiler.patch" SRC_URI[md5sum] = "bbae4f247b88ccde0e85ed6a403da22a"
Signature · 1 line
2.17.1
Re: [OE-core] [PATCH 2/2] encodings: RDEPEND on mkfontdir mkfontscale
Quoted 20 lines · Yi Zhao
Fix
pkg_postinsterror when install encodings via online repo:$ opkg install encodings Installing encodings (1.0.5) on root Configuring encodings. /var/lib/opkg/info/encodings.postinst: line 7: mkfontdir: not found Collected errors: * pkg_run_script: package "encodings" postinst script returned status 127. * opkg_configure: encodings.postinst returned 127.Signed-off-by Yi Zhao <[email protected]>--- meta/recipes-graphics/xorg-font/encodings_1.0.5.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/recipes-graphics/xorg-font/encodings_1.0.5.bb +0
-0
meta/recipes-graphics/xorg-font/encodings_1.0.5.bb PE = "1" · line 16
Quoted 8 lines
meta/recipes-graphics/xorg-font/encodings_1.0.5.bb +1
-1@@ -10,7 +10,7 @@ PE = "1" PR = "${INC_PR}.1" DEPENDS = "mkfontscale-native mkfontdir-native font-util-native" -RDEPENDS_${PN} = "" +RDEPENDS_${PN} = "mkfontdir mkfontscale" SRC_URI += "file://nocompiler.patch" SRC_URI[md5sum] = "bbae4f247b88ccde0e85ed6a403da22a"
I don't think these two patches are correct. encodings doesn't install these things so perhaps it shouldn't be running these postinst at all?
I thought I remembered something about this change:
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=b8f089512f65a4a131c8096c281c4f3d9cf23718
from 2013! Sadly the commit log is a bit sparse.
Cheers,
Richard
Re: [OE-core] [PATCH 2/2] encodings: RDEPEND on mkfontdir mkfontscale
Quoted 23 lines · Richard Purdie
Quoted 22 lines · Yi Zhao
Fix
pkg_postinsterror when install encodings via online repo:$ opkg install encodings Installing encodings (1.0.5) on root Configuring encodings. /var/lib/opkg/info/encodings.postinst: line 7: mkfontdir: not found Collected errors: * pkg_run_script: package "encodings" postinst script returned status 127. * opkg_configure: encodings.postinst returned 127.Signed-off-by Yi Zhao <[email protected]>--- meta/recipes-graphics/xorg-font/encodings_1.0.5.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/recipes-graphics/xorg-font/encodings_1.0.5.bb +0
-0@@ -10,7 +10,7 @@ PE = "1" PR = "${INC_PR}.1"
Quoted 8 lines
meta/recipes-graphics/xorg-font/encodings_1.0.5.bb PE = "1" · line 16
Quoted 6 lines
meta/recipes-graphics/xorg-font/encodings_1.0.5.bb +1
-1DEPENDS = "mkfontscale-native mkfontdir-native font-util-native" -RDEPENDS_${PN} = "" +RDEPENDS_${PN} = "mkfontdir mkfontscale" SRC_URI += "file://nocompiler.patch" SRC_URI[md5sum] = "bbae4f247b88ccde0e85ed6a403da22a"I don't think these two patches are correct. encodings doesn't install these things so perhaps it shouldn't be running these postinst at all?
Yes, encdings doesn't need postinst at all.
//Yi
Quoted 11 lines
I thought I remembered something about this change:
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=b8f089512f65a4a131c8096c281c4f3d9cf23718
from 2013! Sadly the commit log is a bit sparse.
Cheers,
Richard