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] package.env VM variable
Date: Wed, 14 Nov 2007 22:26:39 +1300	[thread overview]
Message-ID: <473ABF4F.3030609@gentoo.org> (raw)

Firstly I will ask a question

*****QUESTION*********

Basically, I want to know what it is for.  What does it mean? what is it
meant to tell us?

**********************

And now I will ramble on....

****RAMBLE************

java-config-2 doesn't seem to use the VM var at all.

basically the reason I ask is that I want to (and already have a proof
of concept for) update java-config-2 to use the package.env VM var
instead of TARGET to figure out the virtual machine a package requires.

to explain.

java-config currently does this:
	1) Find the highest target of package and dep's
	2) Find VM that matches >=virtual/[jre|jdk]-${highest_target}

I have implemented a java-config that

	1) Finds a Set of packages (and deps) VM package.env vars. *
	2) Finds a VM that satisfies the Set. *

(see * for further explaination)

This actually allows us to (by just using RDEPEND) have a packages VM as
<virtual/jre-1.6 for example. (or possible =virtual/jre-1.5
=virtual/jre-1.4 )  In both situations the package will not use a 1.6 vm.

What is the use for this?  Well I have think of one package, jdictrayapi
(i believe) that can't run on java6 at least.  Are there any more?

Now to completely lose everyone

Currently java-util-2.eclass does
echo "VM=\"$(echo ${RDEPEND} ${DEPEND} | sed -e 's/ /\n/g' | sed -n -e
'/virtual\/\(jre\|jdk\)/ { p;q }')\""

to calculate the VM var.  basically that will just find the first
virtual/[jre|jdk] listed in RDEPEND/DEPEND.  I will need this to be
1) use flag aware.
2) and any other combo of || ( .. )  !flag? () etc etc.

That will have to be implemented within java-config-2.  I think most if
not all of that is already exists.  There are also some packages will be
effected by the eclass change. **

Anyway.  Feedback ppl.  Have I gone mad?

ali_bush

ps.
* This is meant as an explanation of how/what im doing, read only if
your interested.

If we assume that we have a package and 1 dep with the following VM var
set in there package.env files

package: VM=">=virtual/jre-1.4"
dep:	 VM="=virtual/jre-1.5 =virtual/jre-1.4" being derived from a
RDEPEND of "|| ( =virtual/jre-1.5 =virtual/jre-1.4 )"

In step 1 above the following set is created

Set('>=virtual/jre-1.4', Set('=virtual/jre-1.5', '=virtual/jre-1.4'))

which corresponds logically to in step 2 to..

Find a VM that meets the following
'>=virtual/jre-1.4' AND (=virtual/jre-1.5 OR =virtual/jre-1.4 )

This also make is possible to have a RDEPEND=">=virtual/jdk-1.5" and
have java-config only pick jdk's for the package. (whether there is a
situation have calls for this but doesn't require a java-virtual.  Im
not sure).

** By using !rdep virtual/jre and !rdep virtual/jdk
and running the following on the resulting lists

cat duplicate-jre.txt duplicate-jdk.txt | sort | uniq -d

I get the following list of ebuilds with duplicate virtual/[jdk|jre]
RDEPENDS.

dev-db/monetdb-5.2.0:java
dev-db/xindice-1.0-r4
dev-java/axion-1.0_rc2-r3
dev-java/jmp-0.51
dev-util/subversion-1.3.2-r3:java
net-analyzer/neti-2.0:java
net-misc/tightvnc-1.3.9:java
net-misc/tightvnc-1.3.9-r1:java

I believe that list to be correct
-- 
gentoo-java@gentoo.org mailing list



                 reply	other threads:[~2007-11-14  9:26 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=473ABF4F.3030609@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