* [ptxdist] [PATCH] ptxd_install_shared: Fix missing links when ${src} is a symlink itself
@ 2013-03-21 14:58 Bernhard Walle
2013-03-21 15:08 ` Bernhard Walle
0 siblings, 1 reply; 7+ messages in thread
From: Bernhard Walle @ 2013-03-21 14:58 UTC (permalink / raw)
To: ptxdist
When "${src}" is a symlink to some other directory, then not all
symbolic links to the library are installed.
In my case I'm using a ct-ng-based toolchain where
${TOOLCHAIN_BASE}/arm-unknown-linux-gnueabi/lib/ is a symbolic link to
sysroot/lib/. As a result, install_copy_toolchain_lib with libstdc++.so
doesn't install the libstdc++.so.6 symbolic link and so C++ programs
don't start.
Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
---
scripts/lib/ptxd_make_xpkg_pkg.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh b/scripts/lib/ptxd_make_xpkg_pkg.sh
index 476ad58..03356b3 100644
--- a/scripts/lib/ptxd_make_xpkg_pkg.sh
+++ b/scripts/lib/ptxd_make_xpkg_pkg.sh
@@ -694,6 +694,7 @@ ptxd_install_shared() {
ptxd_install_file "${src}" "${dst}/${filename}" "${usr}" "${grp}" "${mod}" &&
+ src="$(readlink -f "${src}")"
find "$(dirname "${src}")" -maxdepth 1 -type l | while read file; do
if [ "$(basename "$(readlink -f "${file}")")" = "${filename}" ]; then
local link="${dst}/$(basename "${file}")"
--
1.8.2
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 7+ messages in thread
* [ptxdist] [PATCH] ptxd_install_shared: Fix missing links when ${src} is a symlink itself
2013-03-21 14:58 [ptxdist] [PATCH] ptxd_install_shared: Fix missing links when ${src} is a symlink itself Bernhard Walle
@ 2013-03-21 15:08 ` Bernhard Walle
2013-03-21 15:47 ` Michael Olbrich
0 siblings, 1 reply; 7+ messages in thread
From: Bernhard Walle @ 2013-03-21 15:08 UTC (permalink / raw)
To: ptxdist
When "${src}" is a symlink to some other directory, then not all
symbolic links to the library are installed.
In my case I'm using a ct-ng-based toolchain where
${TOOLCHAIN_BASE}/arm-unknown-linux-gnueabi/lib/ is a symbolic link to
sysroot/lib/. As a result, install_copy_toolchain_lib with libstdc++.so
doesn't install the libstdc++.so.6 symbolic link and so C++ programs
don't start.
Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
---
First version missed the '&&'.
scripts/lib/ptxd_make_xpkg_pkg.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh b/scripts/lib/ptxd_make_xpkg_pkg.sh
index 476ad58..b32461e 100644
--- a/scripts/lib/ptxd_make_xpkg_pkg.sh
+++ b/scripts/lib/ptxd_make_xpkg_pkg.sh
@@ -694,6 +694,7 @@ ptxd_install_shared() {
ptxd_install_file "${src}" "${dst}/${filename}" "${usr}" "${grp}" "${mod}" &&
+ src="$(readlink -f "${src}")" &&
find "$(dirname "${src}")" -maxdepth 1 -type l | while read file; do
if [ "$(basename "$(readlink -f "${file}")")" = "${filename}" ]; then
local link="${dst}/$(basename "${file}")"
--
1.8.2
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ptxdist] [PATCH] ptxd_install_shared: Fix missing links when ${src} is a symlink itself
2013-03-21 15:08 ` Bernhard Walle
@ 2013-03-21 15:47 ` Michael Olbrich
2013-03-21 16:21 ` Bernhard Walle
0 siblings, 1 reply; 7+ messages in thread
From: Michael Olbrich @ 2013-03-21 15:47 UTC (permalink / raw)
To: ptxdist
On Thu, Mar 21, 2013 at 04:08:54PM +0100, Bernhard Walle wrote:
> When "${src}" is a symlink to some other directory, then not all
> symbolic links to the library are installed.
>
> In my case I'm using a ct-ng-based toolchain where
> ${TOOLCHAIN_BASE}/arm-unknown-linux-gnueabi/lib/ is a symbolic link to
> sysroot/lib/. As a result, install_copy_toolchain_lib with libstdc++.so
> doesn't install the libstdc++.so.6 symbolic link and so C++ programs
> don't start.
>
> Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
> ---
> First version missed the '&&'.
>
> scripts/lib/ptxd_make_xpkg_pkg.sh | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh b/scripts/lib/ptxd_make_xpkg_pkg.sh
> index 476ad58..b32461e 100644
> --- a/scripts/lib/ptxd_make_xpkg_pkg.sh
> +++ b/scripts/lib/ptxd_make_xpkg_pkg.sh
> @@ -694,6 +694,7 @@ ptxd_install_shared() {
>
> ptxd_install_file "${src}" "${dst}/${filename}" "${usr}" "${grp}" "${mod}" &&
>
> + src="$(readlink -f "${src}")" &&
> find "$(dirname "${src}")" -maxdepth 1 -type l | while read file; do
I think this would be nicer and should work too, right:
find -H "$(dirname "${src}")" -maxdepth 1 -type l | while read file; do
mol
> if [ "$(basename "$(readlink -f "${file}")")" = "${filename}" ]; then
> local link="${dst}/$(basename "${file}")"
> --
> 1.8.2
>
>
> --
> ptxdist mailing list
> ptxdist@pengutronix.de
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ptxdist] [PATCH] ptxd_install_shared: Fix missing links when ${src} is a symlink itself
2013-03-21 15:47 ` Michael Olbrich
@ 2013-03-21 16:21 ` Bernhard Walle
2013-03-21 17:25 ` Michael Olbrich
0 siblings, 1 reply; 7+ messages in thread
From: Bernhard Walle @ 2013-03-21 16:21 UTC (permalink / raw)
To: ptxdist
* Michael Olbrich <m.olbrich@pengutronix.de> [2013-03-21 16:47]:
> > ptxd_install_file "${src}" "${dst}/${filename}" "${usr}" "${grp}" "${mod}" &&
> >
> > + src="$(readlink -f "${src}")" &&
> > find "$(dirname "${src}")" -maxdepth 1 -type l | while read file; do
>
> I think this would be nicer and should work too, right:
>
> find -H "$(dirname "${src}")" -maxdepth 1 -type l | while read file; do
That works indeed. Should I send a new patch?
Regards,
Bernhard
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ptxdist] [PATCH] ptxd_install_shared: Fix missing links when ${src} is a symlink itself
2013-03-21 16:21 ` Bernhard Walle
@ 2013-03-21 17:25 ` Michael Olbrich
2013-03-21 18:34 ` Bernhard Walle
0 siblings, 1 reply; 7+ messages in thread
From: Michael Olbrich @ 2013-03-21 17:25 UTC (permalink / raw)
To: ptxdist
On Thu, Mar 21, 2013 at 05:21:26PM +0100, Bernhard Walle wrote:
> * Michael Olbrich <m.olbrich@pengutronix.de> [2013-03-21 16:47]:
> > > ptxd_install_file "${src}" "${dst}/${filename}" "${usr}" "${grp}" "${mod}" &&
> > >
> > > + src="$(readlink -f "${src}")" &&
> > > find "$(dirname "${src}")" -maxdepth 1 -type l | while read file; do
> >
> > I think this would be nicer and should work too, right:
> >
> > find -H "$(dirname "${src}")" -maxdepth 1 -type l | while read file; do
>
> That works indeed. Should I send a new patch?
Yes please.
Michael
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 7+ messages in thread
* [ptxdist] [PATCH] ptxd_install_shared: Fix missing links when ${src} is a symlink itself
2013-03-21 17:25 ` Michael Olbrich
@ 2013-03-21 18:34 ` Bernhard Walle
2013-03-22 9:43 ` Michael Olbrich
0 siblings, 1 reply; 7+ messages in thread
From: Bernhard Walle @ 2013-03-21 18:34 UTC (permalink / raw)
To: ptxdist
When "${src}" is a symlink to some other directory, then not all
symbolic links to the library are installed.
In my case I'm using a ct-ng-based toolchain where
${TOOLCHAIN_BASE}/arm-unknown-linux-gnueabi/lib/ is a symbolic link to
sysroot/lib/. As a result, install_copy_toolchain_lib with libstdc++.so
doesn't install the libstdc++.so.6 symbolic link and so C++ programs
don't start.
Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
---
scripts/lib/ptxd_make_xpkg_pkg.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh b/scripts/lib/ptxd_make_xpkg_pkg.sh
index 476ad58..17d3ff4 100644
--- a/scripts/lib/ptxd_make_xpkg_pkg.sh
+++ b/scripts/lib/ptxd_make_xpkg_pkg.sh
@@ -694,7 +694,7 @@ ptxd_install_shared() {
ptxd_install_file "${src}" "${dst}/${filename}" "${usr}" "${grp}" "${mod}" &&
- find "$(dirname "${src}")" -maxdepth 1 -type l | while read file; do
+ find -H "$(dirname "${src}")" -maxdepth 1 -type l | while read file; do
if [ "$(basename "$(readlink -f "${file}")")" = "${filename}" ]; then
local link="${dst}/$(basename "${file}")"
ptxd_install_ln "${filename}" "${link}" "${usr}" "${grp}" || return
--
1.8.2
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ptxdist] [PATCH] ptxd_install_shared: Fix missing links when ${src} is a symlink itself
2013-03-21 18:34 ` Bernhard Walle
@ 2013-03-22 9:43 ` Michael Olbrich
0 siblings, 0 replies; 7+ messages in thread
From: Michael Olbrich @ 2013-03-22 9:43 UTC (permalink / raw)
To: ptxdist
On Thu, Mar 21, 2013 at 07:34:09PM +0100, Bernhard Walle wrote:
> When "${src}" is a symlink to some other directory, then not all
> symbolic links to the library are installed.
>
> In my case I'm using a ct-ng-based toolchain where
> ${TOOLCHAIN_BASE}/arm-unknown-linux-gnueabi/lib/ is a symbolic link to
> sysroot/lib/. As a result, install_copy_toolchain_lib with libstdc++.so
> doesn't install the libstdc++.so.6 symbolic link and so C++ programs
> don't start.
Thanks, applied.
Michael
> Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
> ---
> scripts/lib/ptxd_make_xpkg_pkg.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh b/scripts/lib/ptxd_make_xpkg_pkg.sh
> index 476ad58..17d3ff4 100644
> --- a/scripts/lib/ptxd_make_xpkg_pkg.sh
> +++ b/scripts/lib/ptxd_make_xpkg_pkg.sh
> @@ -694,7 +694,7 @@ ptxd_install_shared() {
>
> ptxd_install_file "${src}" "${dst}/${filename}" "${usr}" "${grp}" "${mod}" &&
>
> - find "$(dirname "${src}")" -maxdepth 1 -type l | while read file; do
> + find -H "$(dirname "${src}")" -maxdepth 1 -type l | while read file; do
> if [ "$(basename "$(readlink -f "${file}")")" = "${filename}" ]; then
> local link="${dst}/$(basename "${file}")"
> ptxd_install_ln "${filename}" "${link}" "${usr}" "${grp}" || return
> --
> 1.8.2
>
>
> --
> ptxdist mailing list
> ptxdist@pengutronix.de
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-03-22 9:43 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-21 14:58 [ptxdist] [PATCH] ptxd_install_shared: Fix missing links when ${src} is a symlink itself Bernhard Walle
2013-03-21 15:08 ` Bernhard Walle
2013-03-21 15:47 ` Michael Olbrich
2013-03-21 16:21 ` Bernhard Walle
2013-03-21 17:25 ` Michael Olbrich
2013-03-21 18:34 ` Bernhard Walle
2013-03-22 9:43 ` Michael Olbrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox