All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] musl: prevent errors if do_install is run more than once
@ 2017-11-30 20:20 Andre McCurdy
  2017-11-30 21:51 ` Khem Raj
  0 siblings, 1 reply; 8+ messages in thread
From: Andre McCurdy @ 2017-11-30 20:20 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
---
 meta/recipes-core/musl/musl_git.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/musl/musl_git.bb b/meta/recipes-core/musl/musl_git.bb
index 932c9a2..db26b4f 100644
--- a/meta/recipes-core/musl/musl_git.bb
+++ b/meta/recipes-core/musl/musl_git.bb
@@ -57,10 +57,11 @@ do_install() {
 	oe_runmake install DESTDIR='${D}'
 
 	install -d ${D}${bindir}
+	rm -f ${D}${bindir}/ldd
 	lnr ${D}${libdir}/libc.so ${D}${bindir}/ldd
 	for l in crypt dl m pthread resolv rt util xnet
 	do
-		ln -s libc.so ${D}${libdir}/lib$l.so
+		ln -sf libc.so ${D}${libdir}/lib$l.so
 	done
 }
 
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] musl: prevent errors if do_install is run more than once
  2017-11-30 20:20 [PATCH] musl: prevent errors if do_install is run more than once Andre McCurdy
@ 2017-11-30 21:51 ` Khem Raj
  2017-11-30 22:59   ` Andre McCurdy
  0 siblings, 1 reply; 8+ messages in thread
From: Khem Raj @ 2017-11-30 21:51 UTC (permalink / raw)
  To: Andre McCurdy; +Cc: Patches and discussions about the oe-core layer

On Thu, Nov 30, 2017 at 12:20 PM, Andre McCurdy <armccurdy@gmail.com> wrote:
> Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
> ---
>  meta/recipes-core/musl/musl_git.bb | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-core/musl/musl_git.bb b/meta/recipes-core/musl/musl_git.bb
> index 932c9a2..db26b4f 100644
> --- a/meta/recipes-core/musl/musl_git.bb
> +++ b/meta/recipes-core/musl/musl_git.bb
> @@ -57,10 +57,11 @@ do_install() {
>         oe_runmake install DESTDIR='${D}'
>
>         install -d ${D}${bindir}
> +       rm -f ${D}${bindir}/ldd

Doesn't lnr take care of removing old file ?

>         lnr ${D}${libdir}/libc.so ${D}${bindir}/ldd
>         for l in crypt dl m pthread resolv rt util xnet
>         do
> -               ln -s libc.so ${D}${libdir}/lib$l.so
> +               ln -sf libc.so ${D}${libdir}/lib$l.so

this is ok

>         done
>  }
>
> --
> 1.9.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] musl: prevent errors if do_install is run more than once
  2017-11-30 21:51 ` Khem Raj
@ 2017-11-30 22:59   ` Andre McCurdy
  2017-12-01 11:07     ` Burton, Ross
  0 siblings, 1 reply; 8+ messages in thread
From: Andre McCurdy @ 2017-11-30 22:59 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

On Thu, Nov 30, 2017 at 1:51 PM, Khem Raj <raj.khem@gmail.com> wrote:
> On Thu, Nov 30, 2017 at 12:20 PM, Andre McCurdy <armccurdy@gmail.com> wrote:
>> Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
>> ---
>>  meta/recipes-core/musl/musl_git.bb | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-core/musl/musl_git.bb b/meta/recipes-core/musl/musl_git.bb
>> index 932c9a2..db26b4f 100644
>> --- a/meta/recipes-core/musl/musl_git.bb
>> +++ b/meta/recipes-core/musl/musl_git.bb
>> @@ -57,10 +57,11 @@ do_install() {
>>         oe_runmake install DESTDIR='${D}'
>>
>>         install -d ${D}${bindir}
>> +       rm -f ${D}${bindir}/ldd
>
> Doesn't lnr take care of removing old file ?

Apparently not:

  $ touch foo
  $ lnr xxx foo
  Traceback (most recent call last):
    File "/.../openembedded-core/scripts/lnr", line 21, in <module>
      os.symlink(target, linkname)
  FileExistsError: [Errno 17] File exists: 'xxx' -> 'foo'


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] musl: prevent errors if do_install is run more than once
  2017-11-30 22:59   ` Andre McCurdy
@ 2017-12-01 11:07     ` Burton, Ross
  2017-12-01 19:30       ` Andre McCurdy
  0 siblings, 1 reply; 8+ messages in thread
From: Burton, Ross @ 2017-12-01 11:07 UTC (permalink / raw)
  To: Andre McCurdy; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 1387 bytes --]

Extend lnr to have a --force option?

Ross

On 30 November 2017 at 22:59, Andre McCurdy <armccurdy@gmail.com> wrote:

> On Thu, Nov 30, 2017 at 1:51 PM, Khem Raj <raj.khem@gmail.com> wrote:
> > On Thu, Nov 30, 2017 at 12:20 PM, Andre McCurdy <armccurdy@gmail.com>
> wrote:
> >> Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
> >> ---
> >>  meta/recipes-core/musl/musl_git.bb | 3 ++-
> >>  1 file changed, 2 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/meta/recipes-core/musl/musl_git.bb
> b/meta/recipes-core/musl/musl_git.bb
> >> index 932c9a2..db26b4f 100644
> >> --- a/meta/recipes-core/musl/musl_git.bb
> >> +++ b/meta/recipes-core/musl/musl_git.bb
> >> @@ -57,10 +57,11 @@ do_install() {
> >>         oe_runmake install DESTDIR='${D}'
> >>
> >>         install -d ${D}${bindir}
> >> +       rm -f ${D}${bindir}/ldd
> >
> > Doesn't lnr take care of removing old file ?
>
> Apparently not:
>
>   $ touch foo
>   $ lnr xxx foo
>   Traceback (most recent call last):
>     File "/.../openembedded-core/scripts/lnr", line 21, in <module>
>       os.symlink(target, linkname)
>   FileExistsError: [Errno 17] File exists: 'xxx' -> 'foo'
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 2696 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] musl: prevent errors if do_install is run more than once
  2017-12-01 11:07     ` Burton, Ross
@ 2017-12-01 19:30       ` Andre McCurdy
  2017-12-01 20:13         ` Khem Raj
  0 siblings, 1 reply; 8+ messages in thread
From: Andre McCurdy @ 2017-12-01 19:30 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Patches and discussions about the oe-core layer

On Fri, Dec 1, 2017 at 3:07 AM, Burton, Ross <ross.burton@intel.com> wrote:
> Extend lnr to have a --force option?

Is there ever a case where we want lnr to fail if the target already exists?

There are plenty of existing examples in oe-core where rm is run
before lnr (and in the cases where it's not, it's perhaps just a bug
or an oversight).

So I think either leave the v1 patch as-is and run rm before lnr in
musl do_install as we already do elsewhere, or update lnr so that it
unconditionally removes any pre-existing target?


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] musl: prevent errors if do_install is run more than once
  2017-12-01 19:30       ` Andre McCurdy
@ 2017-12-01 20:13         ` Khem Raj
  2017-12-01 21:22           ` Matthew McClintock
  0 siblings, 1 reply; 8+ messages in thread
From: Khem Raj @ 2017-12-01 20:13 UTC (permalink / raw)
  To: Andre McCurdy; +Cc: Patches and discussions about the oe-core layer

On Fri, Dec 1, 2017 at 11:30 AM, Andre McCurdy <armccurdy@gmail.com> wrote:
> On Fri, Dec 1, 2017 at 3:07 AM, Burton, Ross <ross.burton@intel.com> wrote:
>> Extend lnr to have a --force option?
>
> Is there ever a case where we want lnr to fail if the target already exists?
>
> There are plenty of existing examples in oe-core where rm is run
> before lnr (and in the cases where it's not, it's perhaps just a bug
> or an oversight).
>
> So I think either leave the v1 patch as-is and run rm before lnr in
> musl do_install as we already do elsewhere, or update lnr so that it
> unconditionally removes any pre-existing target?

I like Ross'es suggestion to modify lnr implementation as an
independent patch and
rebase your patch on top. Maybe a cleanup later to remove all rm cmds
that are used
before lnr


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] musl: prevent errors if do_install is run more than once
  2017-12-01 20:13         ` Khem Raj
@ 2017-12-01 21:22           ` Matthew McClintock
  2017-12-01 21:53             ` Khem Raj
  0 siblings, 1 reply; 8+ messages in thread
From: Matthew McClintock @ 2017-12-01 21:22 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

On Fri, Dec 1, 2017 at 2:13 PM, Khem Raj <raj.khem@gmail.com> wrote:
> On Fri, Dec 1, 2017 at 11:30 AM, Andre McCurdy <armccurdy@gmail.com> wrote:
>> On Fri, Dec 1, 2017 at 3:07 AM, Burton, Ross <ross.burton@intel.com> wrote:
>>> Extend lnr to have a --force option?
>>
>> Is there ever a case where we want lnr to fail if the target already exists?
>>
>> There are plenty of existing examples in oe-core where rm is run
>> before lnr (and in the cases where it's not, it's perhaps just a bug
>> or an oversight).
>>
>> So I think either leave the v1 patch as-is and run rm before lnr in
>> musl do_install as we already do elsewhere, or update lnr so that it
>> unconditionally removes any pre-existing target?
>
> I like Ross'es suggestion to modify lnr implementation as an
> independent patch and
> rebase your patch on top. Maybe a cleanup later to remove all rm cmds
> that are used
> before lnr

Do we keep the lnr filename? Change to ln-python and add -r and -f?

The above question wasn't answered. Should we just always force it and
emit a WARNING if it's being replaced?

-M


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] musl: prevent errors if do_install is run more than once
  2017-12-01 21:22           ` Matthew McClintock
@ 2017-12-01 21:53             ` Khem Raj
  0 siblings, 0 replies; 8+ messages in thread
From: Khem Raj @ 2017-12-01 21:53 UTC (permalink / raw)
  To: Matthew McClintock; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 1363 bytes --]

On Fri, Dec 1, 2017 at 1:22 PM Matthew McClintock <msm-oss@mcclintock.net>
wrote:

> On Fri, Dec 1, 2017 at 2:13 PM, Khem Raj <raj.khem@gmail.com> wrote:
> > On Fri, Dec 1, 2017 at 11:30 AM, Andre McCurdy <armccurdy@gmail.com>
> wrote:
> >> On Fri, Dec 1, 2017 at 3:07 AM, Burton, Ross <ross.burton@intel.com>
> wrote:
> >>> Extend lnr to have a --force option?
> >>
> >> Is there ever a case where we want lnr to fail if the target already
> exists?
> >>
> >> There are plenty of existing examples in oe-core where rm is run
> >> before lnr (and in the cases where it's not, it's perhaps just a bug
> >> or an oversight).
> >>
> >> So I think either leave the v1 patch as-is and run rm before lnr in
> >> musl do_install as we already do elsewhere, or update lnr so that it
> >> unconditionally removes any pre-existing target?
> >
> > I like Ross'es suggestion to modify lnr implementation as an
> > independent patch and
> > rebase your patch on top. Maybe a cleanup later to remove all rm cmds
> > that are used
> > before lnr
>
> Do we keep the lnr filename? Change to ln-python and add -r and -f?
>
> The above question wasn't answered. Should we just always force it and
> emit a WARNING if it's being replaced?


It’s should force replace it yes a note about replacing an existing file if
any is fine

>
>
> -M
>

[-- Attachment #2: Type: text/html, Size: 2101 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-12-01 21:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-30 20:20 [PATCH] musl: prevent errors if do_install is run more than once Andre McCurdy
2017-11-30 21:51 ` Khem Raj
2017-11-30 22:59   ` Andre McCurdy
2017-12-01 11:07     ` Burton, Ross
2017-12-01 19:30       ` Andre McCurdy
2017-12-01 20:13         ` Khem Raj
2017-12-01 21:22           ` Matthew McClintock
2017-12-01 21:53             ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.