All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [meta-java][PATCH] java.bbclass: oe_makeclasspath does nothing without -s
@ 2020-01-20 20:28 Davis, Michael
  2020-01-21  6:44 ` Richard Leitner
  0 siblings, 1 reply; 4+ messages in thread
From: Davis, Michael @ 2020-01-20 20:28 UTC (permalink / raw
  To: openembedded-devel@lists.openembedded.org

oe_makeclasspath is supposed to output for the target platform by default and the staging platform with -s.
However it checks if the file exists even if -s is not defined which is always false.
Additionaly remove comment around an error that never occurs.

Signed-off-by: Michael Davis <michael.davis@essvote.com>
---
 classes/java.bbclass | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/classes/java.bbclass b/classes/java.bbclass
index fc97295..7b9677a 100644
--- a/classes/java.bbclass
+++ b/classes/java.bbclass
@@ -80,8 +80,6 @@ oe_makeclasspath() {
   # in variable "bootcp".
   # 
   # Provide the -s at the beginning otherwise strange things happen.
-  # If -s is given the function checks whether the requested jar file exists
-  # and exits with an error message if it cannot be found.
   #
   # Note: In order to encourage usage of the DEPENDS variable, the function
   # can accept recipe names. If a recipe has no corresponding Jar file it
@@ -91,6 +89,7 @@ oe_makeclasspath() {
   classpath=
   delimiter=
   retval=$1
+  staging=false
 
   shift
 
@@ -106,6 +105,7 @@ oe_makeclasspath() {
                   dir=${STAGING_DATADIR_JAVA}
                   ;;
               esac
+              staging=true
               ;;
           -*)
               bbfatal "oe_makeclasspath: unknown option: $1"
@@ -113,9 +113,9 @@ oe_makeclasspath() {
           *)
               file=$dir/$1.jar
 
-              if [ -e $file ]; then
-                  classpath=$classpath$delimiter$file
-                  delimiter=":"
+              if [ $staging == false ] || [ -e $file ]; then
+                classpath=$classpath$delimiter$file
+                delimiter=":"
               fi
 
           ;;
-- 
2.24.1

Disclaimer

The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.

This email has been scanned for viruses and malware, and may have been automatically archived by Mimecast Ltd, an innovator in Software as a Service (SaaS) for business. Providing a safer and more useful place for your human generated data. Specializing in; Security, archiving and compliance. To find out more visit the Mimecast website.


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

* Re: [meta-java][PATCH] java.bbclass: oe_makeclasspath does nothing without -s
  2020-01-20 20:28 [meta-java][PATCH] java.bbclass: oe_makeclasspath does nothing without -s Davis, Michael
@ 2020-01-21  6:44 ` Richard Leitner
  2020-01-21  8:46   ` André Draszik
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Leitner @ 2020-01-21  6:44 UTC (permalink / raw
  To: Davis, Michael; +Cc: openembedded-devel@lists.openembedded.org

Hi,
this is a note to let you know that I've just added this patch to the
master-next branch of the meta-java repository at
     git://git.yoctoproject.org/meta-java

As soon as it has gone through some more testing it will likely be
merged to the master branch.

If you have any questions, please let me know.

regards;Richard.L

On Mon, Jan 20, 2020 at 08:28:31PM +0000, Davis, Michael wrote:
> oe_makeclasspath is supposed to output for the target platform by default and the staging platform with -s.
> However it checks if the file exists even if -s is not defined which is always false.
> Additionaly remove comment around an error that never occurs.
> 
> Signed-off-by: Michael Davis <michael.davis@essvote.com>
> ---
>  classes/java.bbclass | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/classes/java.bbclass b/classes/java.bbclass
> index fc97295..7b9677a 100644
> --- a/classes/java.bbclass
> +++ b/classes/java.bbclass
> @@ -80,8 +80,6 @@ oe_makeclasspath() {
>    # in variable "bootcp".
>    # 
>    # Provide the -s at the beginning otherwise strange things happen.
> -  # If -s is given the function checks whether the requested jar file exists
> -  # and exits with an error message if it cannot be found.
>    #
>    # Note: In order to encourage usage of the DEPENDS variable, the function
>    # can accept recipe names. If a recipe has no corresponding Jar file it
> @@ -91,6 +89,7 @@ oe_makeclasspath() {
>    classpath=
>    delimiter=
>    retval=$1
> +  staging=false
>  
>    shift
>  
> @@ -106,6 +105,7 @@ oe_makeclasspath() {
>                    dir=${STAGING_DATADIR_JAVA}
>                    ;;
>                esac
> +              staging=true
>                ;;
>            -*)
>                bbfatal "oe_makeclasspath: unknown option: $1"
> @@ -113,9 +113,9 @@ oe_makeclasspath() {
>            *)
>                file=$dir/$1.jar
>  
> -              if [ -e $file ]; then
> -                  classpath=$classpath$delimiter$file
> -                  delimiter=":"
> +              if [ $staging == false ] || [ -e $file ]; then
> +                classpath=$classpath$delimiter$file
> +                delimiter=":"
>                fi
>  
>            ;;
> -- 
> 2.24.1
> 


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

* Re: [meta-java][PATCH] java.bbclass: oe_makeclasspath does nothing without -s
  2020-01-21  6:44 ` Richard Leitner
@ 2020-01-21  8:46   ` André Draszik
  2020-01-21  8:57     ` Richard Leitner
  0 siblings, 1 reply; 4+ messages in thread
From: André Draszik @ 2020-01-21  8:46 UTC (permalink / raw
  To: Richard Leitner, Davis, Michael; +Cc: openembedded-devel@lists.openembedded.org

On Tue, 2020-01-21 at 07:44 +0100, Richard Leitner wrote:
> Hi,
> this is a note to let you know that I've just added this patch to the
> master-next branch of the meta-java repository at
>      git://git.yoctoproject.org/meta-java
> 
> As soon as it has gone through some more testing it will likely be
> merged to the master branch.
> 
> If you have any questions, please let me know.
> 
> regards;Richard.L
> 
> On Mon, Jan 20, 2020 at 08:28:31PM +0000, Davis, Michael wrote:
> > oe_makeclasspath is supposed to output for the target platform by default and the staging platform with -s.
> > However it checks if the file exists even if -s is not defined which is always false.
> > Additionaly remove comment around an error that never occurs.
> > 
> > Signed-off-by: Michael Davis <michael.davis@essvote.com>
> > ---
> >  classes/java.bbclass | 10 +++++-----
> >  1 file changed, 5 insertions(+), 5 deletions(-)
> > 
> > diff --git a/classes/java.bbclass b/classes/java.bbclass
> > index fc97295..7b9677a 100644
> > --- a/classes/java.bbclass
> > +++ b/classes/java.bbclass
> > @@ -80,8 +80,6 @@ oe_makeclasspath() {
> >    # in variable "bootcp".
> >    # 
> >    # Provide the -s at the beginning otherwise strange things happen.
> > -  # If -s is given the function checks whether the requested jar file exists
> > -  # and exits with an error message if it cannot be found.
> >    #
> >    # Note: In order to encourage usage of the DEPENDS variable, the function
> >    # can accept recipe names. If a recipe has no corresponding Jar file it
> > @@ -91,6 +89,7 @@ oe_makeclasspath() {
> >    classpath=
> >    delimiter=
> >    retval=$1
> > +  staging=false
> >  
> >    shift
> >  
> > @@ -106,6 +105,7 @@ oe_makeclasspath() {
> >                    dir=${STAGING_DATADIR_JAVA}
> >                    ;;
> >                esac
> > +              staging=true
> >                ;;
> >            -*)
> >                bbfatal "oe_makeclasspath: unknown option: $1"
> > @@ -113,9 +113,9 @@ oe_makeclasspath() {
> >            *)
> >                file=$dir/$1.jar
> >  
> > -              if [ -e $file ]; then
> > -                  classpath=$classpath$delimiter$file
> > -                  delimiter=":"
> > +              if [ $staging == false ] || [ -e $file ]; then
                                 ^^
Can you please remove this bashism. One '=' is enough.

Cheers,
Andre'


> > +                classpath=$classpath$delimiter$file
> > +                delimiter=":"
> >                fi
> >  
> >            ;;
> > -- 
> > 2.24.1
> > 



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

* Re: [meta-java][PATCH] java.bbclass: oe_makeclasspath does nothing without -s
  2020-01-21  8:46   ` André Draszik
@ 2020-01-21  8:57     ` Richard Leitner
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Leitner @ 2020-01-21  8:57 UTC (permalink / raw
  To: André Draszik; +Cc: openembedded-devel@lists.openembedded.org

On Tue, Jan 21, 2020 at 08:46:29AM +0000, André Draszik wrote:
> On Tue, 2020-01-21 at 07:44 +0100, Richard Leitner wrote:
> > Hi,
> > this is a note to let you know that I've just added this patch to the
> > master-next branch of the meta-java repository at
> >      git://git.yoctoproject.org/meta-java
> > 
> > As soon as it has gone through some more testing it will likely be
> > merged to the master branch.
> > 
> > If you have any questions, please let me know.
> > 
> > regards;Richard.L
> > 
> > On Mon, Jan 20, 2020 at 08:28:31PM +0000, Davis, Michael wrote:
> > > oe_makeclasspath is supposed to output for the target platform by default and the staging platform with -s.
> > > However it checks if the file exists even if -s is not defined which is always false.
> > > Additionaly remove comment around an error that never occurs.
> > > 
> > > Signed-off-by: Michael Davis <michael.davis@essvote.com>
> > > ---

...

> > > @@ -113,9 +113,9 @@ oe_makeclasspath() {
> > >            *)
> > >                file=$dir/$1.jar
> > >  
> > > -              if [ -e $file ]; then
> > > -                  classpath=$classpath$delimiter$file
> > > -                  delimiter=":"
> > > +              if [ $staging == false ] || [ -e $file ]; then
>                                  ^^
> Can you please remove this bashism. One '=' is enough.

Sure. Thanks for the catch.
I'll push an update to master-next in the next minutes.

> 
> Cheers,
> Andre'

regards;rl


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

end of thread, other threads:[~2020-01-21  8:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-20 20:28 [meta-java][PATCH] java.bbclass: oe_makeclasspath does nothing without -s Davis, Michael
2020-01-21  6:44 ` Richard Leitner
2020-01-21  8:46   ` André Draszik
2020-01-21  8:57     ` Richard Leitner

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.