Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 158137 - check bytecode version of installed jar files in java-utils-2.eclass
Summary: check bytecode version of installed jar files in java-utils-2.eclass
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-14 06:30 UTC by Vlastimil Babka (Caster) (RETIRED)
Modified: 2007-01-30 13:30 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
proposed patch (java-utils-2.eclass-check-bytecode.patch,1.87 KB, patch)
2007-01-03 01:52 UTC, Vlastimil Babka (Caster) (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-12-14 06:30:56 UTC
We really need it (see bug 155889 for example). IIRC nichoj wanted some postinst hook that would scan whole image, but portage people were against more hooks. But I think 99% of the cases could be catched right in dojar/newjar calls.
Nichoj was also afraid of packages that mix bytecode, I think those have already special manual care so automatic checking doesn't have to be that smart. As long as TARGET in package.env equals to the highest bytecode used (not lowest) the package would pass this check.

So what I propose is adding a check (triggered by JAVA_PKG_STRICT probably) into dojar/newjar that scans the jar against version obtained by java-pkg_get-target(). Will try to do a patch later.
Comment 1 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2007-01-03 01:52:24 UTC
Created attachment 105273 [details, diff]
proposed patch

In the end, checks and eventual die() are performed only with JAVA_PKG_STRICT, because announcing java QA notices is normally also done only with strict... so for user without STRICT won't do anything.
Comment 2 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2007-01-30 13:30:49 UTC
Fixed with different patch from ali_bush on gentoo-java ML. Don't worry, I already learned that eclass stuff belongs there, not bugzilla.