Skip to contentSkip to conversation

Give coreutils a chance to build the df utility

PATCH Superseded Julian Pidancet 3 participants 4 messages Oct 25, 2011 – Oct 26, 2011

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Give coreutils a chance to build the df utility

The coreutils configure script is unable determine how to get free space from the Operating System when cross-compiling. This patch gives it some extra help by setting the fu_cv_sys_stat_statfs2_bsize variable to yes before invoking the configure script.

---
 meta/recipes-core/coreutils/coreutils_8.14.bb |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
meta/recipes-core/coreutils/coreutils_8.14.bb +5 -1
index f3b7af7..3c75ddf 100644
@@ -27,7 +27,7 @@ bindir_progs = "base64 basename chcon cksum comm csplit cut dir dircolors dirnam
                 join link logname md5sum mkfifo mktemp nice nl nohup nproc od paste pathchk \
                 pinky pr printenv printf ptx readlink runcon seq sha1sum sha224sum sha256sum \
                 sha384sum sha512sum shred shuf sort split stat stdbuf sum tac tail tee test timeout\
-                tr truncate tsort tty unexpand uniq unlink uptime users vdir wc who whoami yes"
+                tr truncate tsort tty unexpand uniq unlink uptime users vdir wc who whoami yes df"
 
 # hostname gets a special treatment and is not included in this
 base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill ln ls mkdir \
@@ -35,6 +35,10 @@ base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill ln ls mkdi
 
 sbindir_progs= "chroot"
 
+do_configure_prepend () {
+        export fu_cv_sys_stat_statfs2_bsize=yes
+}
+
 do_install_append() {
 	for i in ${bindir_progs}; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${PN}; done
 
Signature · 1 line
Julian Pidancet
#1 lore raw
Quoted 2 lines · Julian Pidancet

+do_configure_prepend () {
+        export fu_cv_sys_stat_statfs2_bsize=yes

I'm asking out of curiosity.. why don't these go in meta/site/common instead?

-M

#2 lore raw
Quoted 6 lines · On Wed, Oct 26, 2011 at 2:59 AM, McClintock Matthew-B29882…
Quoted 2 lines · Julian Pidancet

+do_configure_prepend () {
+        export fu_cv_sys_stat_statfs2_bsize=yes

I'm asking out of curiosity.. why don't these go in meta/site/common instead?

To be honest, I ignored the very existence of this file. Is this globally applied to all the recipes ? Isn't there a risk of breaking other packages by doing this ?

Signature · 1 line
Julian
#3 lore raw
Quoted 4 lines · Julian Pidancet
Quoted 2 lines · On Wed, Oct 26, 2011 at 2:59 AM, McClintock Matthew-B29882…

On Mon, Oct 24, 2011 at 8:18 PM, Julian Pidancet
<[email protected]> wrote:

Quoted 8 lines
Quoted 4 lines

meta/recipes-core/coreutils/coreutils_8.14.bb base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill ln ls mkdi · line 39

Quoted 2 lines
meta/recipes-core/coreutils/coreutils_8.14.bb +2 -0
+do_configure_prepend () {
+        export fu_cv_sys_stat_statfs2_bsize=yes

I'm asking out of curiosity.. why don't these go in meta/site/common instead?

To be honest, I ignored the very existence of this file. Is this globally applied to all the recipes ? Isn't there a risk of breaking other packages by doing this ?

A small risk, yes. On the other hand, by hardcoding one particular value in the recipe, there is a risk that it might be the wrong answer for some target systems. Whereas the site files are, intentionally, target and OS specific.

p.