Skip to contentSkip to conversation

ncurses: use ln -r to generate relative symlink

PATCH In review Ross Burton 4 participants 6 messages Feb 28, 2014 – Mar 4, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ncurses: use ln -r to generate relative symlink

Instead of using a Python do_install() and calling oe.path.make_relative_symlink, just pass -r to ln to generate a relative symlink directly.

---
 meta/recipes-core/ncurses/ncurses.inc |   10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
meta/recipes-core/ncurses/ncurses.inc +2 -8
index a94466a..835ecc3 100644
@@ -147,12 +147,7 @@ _install_cfgs = "\
   PKG_CONFIG_LIBDIR='${libdir}/pkgconfig' \
 "
 
-python do_install () {
-    bb.build.exec_func("shell_do_install", d)
-    oe.path.make_relative_symlink(d.expand("${D}${libdir}/libtinfo.so"))
-}
-
-shell_do_install() {
+do_install() {
         # Order of installation is important; widec installs a 'curses.h'
         # header with more definitions and must be installed last hence.
         # Compatibility of these headers will be checked in 'do_test()'.
@@ -226,8 +221,7 @@ shell_do_install() {
 
             mv ${D}${libdir}/libtinfo.so.* ${D}${base_libdir}
             rm ${D}${libdir}/libtinfo.so
-            # We'll turn this into a relative symlink after do_install returns
-            ln -sf ${D}${base_libdir}/libtinfo.so.5 ${D}${libdir}/libtinfo.so
+            ln -rsf ${D}${base_libdir}/libtinfo.so.5 ${D}${libdir}/libtinfo.so
         fi
 
         oe_multilib_header curses.h
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 28 lines · Ross Burton

Instead of using a Python do_install() and calling oe.path.make_relative_symlink, just pass -r to ln to generate a relative symlink directly.

---
  meta/recipes-core/ncurses/ncurses.inc |   10 ++--------
  1 file changed, 2 insertions(+), 8 deletions(-)
meta/recipes-core/ncurses/ncurses.inc +1 -6
index a94466a..835ecc3 100644
@@ -147,12 +147,7 @@ _install_cfgs = "\
    PKG_CONFIG_LIBDIR='${libdir}/pkgconfig' \
  "
 
-python do_install () {
-    bb.build.exec_func("shell_do_install", d)
-    oe.path.make_relative_symlink(d.expand("${D}${libdir}/libtinfo.so"))
-}
-
-shell_do_install() {
+do_install() {
          # Order of installation is important; widec installs a 'curses.h'
          # header with more definitions and must be installed last hence.
          # Compatibility of these headers will be checked in 'do_test()'.

meta/recipes-core/ncurses/ncurses.inc shell_do_install() { · line 224

Quoted 6 lines
meta/recipes-core/ncurses/ncurses.inc +1 -2
@@ -226,8 +221,7 @@ shell_do_install() {
 
              mv ${D}${libdir}/libtinfo.so.* ${D}${base_libdir}
              rm ${D}${libdir}/libtinfo.so
-            # We'll turn this into a relative symlink after do_install returns
-            ln -sf ${D}${base_libdir}/libtinfo.so.5 ${D}${libdir}/libtinfo.so
+            ln -rsf ${D}${base_libdir}/libtinfo.so.5 ${D}${libdir}/libtinfo.so

Hi Ross,

In Ubuntu 12.04, `ln' command doesn't have '-r' option. we will get following error during building ncurses
ln: invalid option -- 'r'

Best Regards
Chong

Quoted 3 lines
meta/recipes-core/ncurses/ncurses.inc +0 -0
          fi
 
          oe_multilib_header curses.h
#2 lore raw
Quoted 36 lines · Lu Chong
Quoted 27 lines · Ross Burton

Instead of using a Python do_install() and calling oe.path.make_relative_symlink, just pass -r to ln to generate a relative symlink directly.

---
 meta/recipes-core/ncurses/ncurses.inc |   10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
meta/recipes-core/ncurses/ncurses.inc +1 -5
index a94466a..835ecc3 100644
@@ -147,12 +147,7 @@ _install_cfgs = "\
   PKG_CONFIG_LIBDIR='${libdir}/pkgconfig' \
 "
 -python do_install () {
-    bb.build.exec_func("shell_do_install", d)
-    oe.path.make_relative_symlink(d.expand("${D}${libdir}/libtinfo.so"))
-}
-
-shell_do_install() {
+do_install() {
         # Order of installation is important; widec installs a 'curses.h'
         # header with more definitions and must be installed last hence.
         # Compatibility of these headers will be checked in 'do_test()'.

meta/recipes-core/ncurses/ncurses.inc shell_do_install() { · line 223

Quoted 5 lines
meta/recipes-core/ncurses/ncurses.inc +1 -2
@@ -226,8 +221,7 @@ shell_do_install() {
               mv ${D}${libdir}/libtinfo.so.* ${D}${base_libdir}
             rm ${D}${libdir}/libtinfo.so
-            # We'll turn this into a relative symlink after do_install returns
-            ln -sf ${D}${base_libdir}/libtinfo.so.5 ${D}${libdir}/libtinfo.so
+            ln -rsf ${D}${base_libdir}/libtinfo.so.5 ${D}${libdir}/libtinfo.so

Hi Ross,

Quoted 3 lines

In Ubuntu 12.04, `ln' command doesn't have '-r' option. we will get following error during building ncurses
ln: invalid option -- ‘r'

count debian in too.

Quoted 10 lines

Best Regards
Chong

meta/recipes-core/ncurses/ncurses.inc shell_do_install() { · line 227

Quoted 2 lines
meta/recipes-core/ncurses/ncurses.inc +0 -0
         fi
           oe_multilib_header curses.h

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#3 lore raw

Same here, daily build failed.

Builders are using latest Ubuntu LTS shipped with coreutils 8.13 version. --relative is introduced in coreutils 8.16:
http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commit;h=15b8318e93a947d1422e9a927f699eda1085cf0d

Quoted 63 lines · Khem Raj
Quoted 36 lines · Lu Chong
Quoted 27 lines · Ross Burton

Instead of using a Python do_install() and calling oe.path.make_relative_symlink, just pass -r to ln to generate a relative symlink directly.

---
 meta/recipes-core/ncurses/ncurses.inc |   10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
meta/recipes-core/ncurses/ncurses.inc +1 -5
index a94466a..835ecc3 100644
@@ -147,12 +147,7 @@ _install_cfgs = "\
   PKG_CONFIG_LIBDIR='${libdir}/pkgconfig' \
 "
 -python do_install () {
-    bb.build.exec_func("shell_do_install", d)
-    oe.path.make_relative_symlink(d.expand("${D}${libdir}/libtinfo.so"))
-}
-
-shell_do_install() {
+do_install() {
         # Order of installation is important; widec installs a 'curses.h'
         # header with more definitions and must be installed last hence.
         # Compatibility of these headers will be checked in 'do_test()'.

meta/recipes-core/ncurses/ncurses.inc shell_do_install() { · line 223

Quoted 5 lines
meta/recipes-core/ncurses/ncurses.inc +1 -2
@@ -226,8 +221,7 @@ shell_do_install() {
               mv ${D}${libdir}/libtinfo.so.* ${D}${base_libdir}
             rm ${D}${libdir}/libtinfo.so
-            # We'll turn this into a relative symlink after do_install returns
-            ln -sf ${D}${base_libdir}/libtinfo.so.5 ${D}${libdir}/libtinfo.so
+            ln -rsf ${D}${base_libdir}/libtinfo.so.5 ${D}${libdir}/libtinfo.so

Hi Ross,

Quoted 3 lines

In Ubuntu 12.04, `ln' command doesn't have '-r' option. we will get following error during building ncurses
ln: invalid option -- 'r'

count debian in too.

Quoted 10 lines

Best Regards
Chong

meta/recipes-core/ncurses/ncurses.inc shell_do_install() { · line 227

Quoted 2 lines
meta/recipes-core/ncurses/ncurses.inc +0 -0
         fi
           oe_multilib_header curses.h

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Signature · 3 lines
Fathi Boudra
Builds and Baselines Manager | Release Manager
Linaro.org | Open source software for ARM SoCs
#5 lore raw
Quoted 1 line · Ross

I wrote this patch on Debian stable...

yeah I jumped in too quick, master was debian, but this failed slave node was ubuntu 12.04