public inbox for gentoo-java@lists.gentoo.org
 help / color / mirror / Atom feed
From: Alistair Bush <ali_bush@gentoo.org>
To: gentoo-java@lists.gentoo.org
Subject: [gentoo-java] Bug 225659: java-pkg_jarfrom --virtual virtual-name jarname.jar fails with JVM providers.
Date: Wed, 29 Apr 2009 23:30:18 +1200	[thread overview]
Message-ID: <49F83A4A.6060907@gentoo.org> (raw)

I would like the discuss the solutions to bug 225659 [1]

When using jar-from with a virtual that can return both a jar or a "vm
provider" there is no way to specify a target_jar when calling jar from.
basically jar-from calls java-config -p virtual with may or may not
return a string with paths to jars within it.  In the case of there
being a vm provider java-config will return an empty string.   Currently
jar-from errors as it is unable to find the target_jar from returned
string and is therefore unable to link to that jar.

Now we can fix this issue but simply ignoring the fact that we didn't
find the target_jar when --virtual is specified.  Basically see [2].
This will therefore never error, even when the virtual does not have vm
providers and is only ever satisfied by a package.
as an example

java-pkg_jar-from --virtual javamail
target_vm_which_is_not_provided_by_anything.jar

would not error,  it also wouldn't create the link it is meant to.

So Questions:

Should jar-from maintain its current behavour?
Are there any other solutions to this issue?
Any other comments?

[1] https://bugs.gentoo.org/225659

[2]
Index: java-utils-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v
retrieving revision 1.126
diff -u -b -B -r1.126 java-utils-2.eclass
--- java-utils-2.eclass 31 Mar 2009 19:19:20 -0000      1.126
+++ java-utils-2.eclass 29 Apr 2009 11:13:07 -0000
@@ -965,9 +965,10 @@
        if [[ -z "${target_jar}" ]] ; then
                return 0
        # otherwise, die bitterly
-       else
+       elif [[ ! -z "${virtual}" ]]
                die "Failed to find ${target_jar:-jar} in ${target_pkg}"
        fi
+       return 0
 }

 #
------------------------------------------------------------------------------



                 reply	other threads:[~2009-04-29 11:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49F83A4A.6060907@gentoo.org \
    --to=ali_bush@gentoo.org \
    --cc=gentoo-java@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox