Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 26683 - dev-java/sun-jdk- doesnt have fetch restriction
Summary: dev-java/sun-jdk- doesnt have fetch restriction
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Adrian Almenar
Depends on:
Blocks: 26932
  Show dependency tree
Reported: 2003-08-15 10:43 UTC by Tom Fredrik Blenning Klaussen
Modified: 2004-01-01 12:31 UTC (History)
0 users

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


Note You need to log in before you can comment on or make changes to this bug.
Description Tom Fredrik Blenning Klaussen 2003-08-15 10:43:39 UTC
Problem description:
I'm managing a small group of machines, all running Gentoo, therefore I
run my own distserver. When I get ebuilds with fetch restrictions, I
usually download the files to my distserver, and fixes the ebuilds by
removing the fetch restrictions for the other machines. Howeverer your
ebuild is not using the pkg_nofetch subroutine (which I might add is the
correct way to handle a fetch restricted file), but rather a test for
whether the ".bin" file is present. This makes such a sollution as I use
quite tricky.

I therefore corrected three parts of the ebuild:

  $SRC_URI now equals $At, this has to be so for the pkg_nofetch routine
to function properly. However you should investigate the possibility of
abandoning the $At variable in favour of $SRC_URI

  I have written a pkg_nofetch routine, and removed your test for
missing files.

  I have added an automatic routine for finding the startPoint of the
binary in the ".bin" file. I'm not sure if this is really a good idea,
but at least, the same ebuild will probably work with a new minor

As for changes #1 and #2 I'm convinced they really provide an
enhancemment. As for #3 I'm not so sure, but use your judgement.

These changes are purely cosmetic, and does not provide a reason for a
version bump.

I became aware that the ebuild was bumped to 1.4.2, so I made the same changes
to 1.4.2, available at:

This ebuild however does not build on my machines. But those errors are
happening in the install part. I'll have more details about this later.

As an addition, similar changes should be done to the package
Comment 1 Adrian Almenar 2003-08-16 14:09:02 UTC
Nice solution, for it, i have to review the new ebuild, and then, check some 
erros that are on the ebuild like fixed paths to /usr/portage/distfiles. 
Thanks, for filling the bug. 
Comment 2 Adrian Almenar 2003-08-23 19:36:15 UTC
Fixed for sun-jdk-{|1.4.2}. This will be fixed for sun-jdk-1.3.1 soon. 
So i will not close this bug until its done for that version. 
Comment 3 Tom Fredrik Blenning Klaussen 2003-08-24 16:18:01 UTC
Just felt like being a pain, so I made some further alterations :p

I guess you noticed the fragility of the grep expression:

startAt=`grep -aonm 1 ELF  ${DISTDIR}/${At} | cut -d: -f1`

in case you didn't it lays in the fact that we only match on the three letter word ELF. It's better to match on some binary nonsense, which makes up the ELF header. So what should be done is to replace the line above. With the lines below:

#Match the 8 (Yes it's 8!) first letters in the ELF header:
testExp=`echo -e "\0177\0105\0114\0106\0001\0001\0001"`
startAt=`grep -aonm 1 ${testExp}  ${DISTDIR}/${At} | cut -d: -f1`
Comment 4 Adrian Almenar 2003-09-09 22:09:23 UTC
I Testes your last change and it worked perfect, also i changed sun-jdk-1.3.1 
ebuild to have the fetch restriction, i will commit it tomorrow. 
Comment 5 Adrian Almenar 2003-09-11 21:20:55 UTC
Commited to portage tree 
Comment 6 Tom Fredrik Blenning Klaussen 2004-01-01 12:28:04 UTC
Going to my old bugs, marking this as verified :)
Comment 7 Tom Fredrik Blenning Klaussen 2004-01-01 12:31:56 UTC
Sorry closed is more correct