Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 649712 - portage-2.3.24-r1 resolves DISTDIR wrong for fetch restricted files
Summary: portage-2.3.24-r1 resolves DISTDIR wrong for fetch restricted files
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Configuration (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on: 612972
Blocks:
  Show dependency tree
 
Reported: 2018-03-06 06:33 UTC by Ted Rodgers
Modified: 2018-03-06 09:01 UTC (History)
1 user (show)

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


Attachments
output of emerge --info (emerge_info_output.txt,5.39 KB, text/plain)
2018-03-06 06:33 UTC, Ted Rodgers
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ted Rodgers 2018-03-06 06:33:45 UTC
Created attachment 522486 [details]
output of emerge --info

Using portage-2.3.24-r1 the DISTFILES to a random address each time a fetch-restricted package is selected for emerge.

Does not happen with sys-apps/portage-2.3.19-r1

Active version of python (eselect python list) does not effect the behaviour, nor does emerging portage with different versions of python set as active.



Example output from using the effected version of portage:


Fetch instructions for dev-java/oracle-jdk-bin-9.0.4-r1:
 * Please download jdk-9.0.4_linux-x64_bin.tar.gz and move it to
 * /var/tmp/tmpxeghuafm/portage/dev-java/oracle-jdk-bin-9.0.4-r1/distdir


Next emerge attempt:

Fetch instructions for dev-java/oracle-jdk-bin-9.0.4-r1:
 * Please download jdk-9.0.4_linux-x64_bin.tar.gz and move it to
 * /var/tmp/tmpfj_vj5kv/portage/dev-java/oracle-jdk-bin-9.0.4-r1/distdir


... so if stopping to fetch the binary, knowing where to place the downloaded file is not possible.



DISTDIR is not set to anything bizarre:

box ~ # portageq envvar DISTDIR
/usr/portage/distfiles
Comment 1 Ted Rodgers 2018-03-06 06:41:55 UTC
Description field incorrectly says "DISTFILES" when it is "DISTDIR"

lines 80-82 from /usr/portage/dev-java/oracle-jdk-bin/oracle-jdk-bin-9.0.4-r1.ebuild:

pkg_nofetch() {
    einfo "Please download ${ARCH_FILES[${ARCH}]} and move it to"
    einfo "$DISTDIR"


Verified that the inherited eclasses for the jdk do not modify the DISTDIR variable




Other fetch restricted packages as well, for example one amdpro-pro (from overlay) with the following line:

einfo "from ${HOMEPAGE} and place them in ${DISTDIR}"
Comment 2 Zac Medico gentoo-dev 2018-03-06 07:54:58 UTC
The change in behavior is an intended result of bug 612972.

Please file bugs against the ebuilds that give incorrect instructions. They should be fixed to refer to DISTDIR symbolically, as shown in the sample pkg_nofetch here:

https://devmanual.gentoo.org/ebuild-writing/functions/pkg_nofetch/index.html
Comment 3 Ulrich Müller gentoo-dev 2018-03-06 09:01:48 UTC
(In reply to Ted Rodgers from comment #0)
> Fetch instructions for dev-java/oracle-jdk-bin-9.0.4-r1:
>  * Please download jdk-9.0.4_linux-x64_bin.tar.gz and move it to
>  * /var/tmp/tmpxeghuafm/portage/dev-java/oracle-jdk-bin-9.0.4-r1/distdir

The ebuild tries to access DISTDIR in pkg_nofetch() where it has no meaningful value. Please file a bug for the package.

PMS reference: https://projects.gentoo.org/pms/6/pms.html#x1-120002