Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 653526

Summary: =sci-chemistry/vmd-1.9.3 - DISTDIR problems
Product: Gentoo Linux Reporter: George Tarasov <george.v.tarasov>
Component: Current packagesAssignee: Alexey Shvetsov <alexxy>
Status: RESOLVED DUPLICATE    
Severity: normal CC: fio2003, sci-chemistry
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info
make.conf

Description George Tarasov 2018-04-19 04:22:23 UTC
Created attachment 528026 [details]
emerge --info

During the installation of the VMD package, I encountered with several errors.

--- How to reproduce ---

I have made installation in a stadard way.
1. Setup ~amd64 flag in package.accept_keywords
2. Add USE-flags (in my setup only the "xinerama" flag was used)
3. Prepend install conditions

host ~ # emerge -pv vmd

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] sci-biology/stride-20011129-r1::gentoo  61 KiB
[ebuild  N    ~] sci-chemistry/surf-1.0::gentoo  73 KiB
[ebuild  N     ] dev-lang/tcl-8.6.6:0/8.6::gentoo  USE="threads -debug" ABI_X86="(64) -32 (-x32)" 0 KiB
[ebuild  N     ] dev-lang/tk-8.6.6:0/8.6::gentoo  USE="threads (-aqua) -debug {-test} -truetype -xscreensaver" ABI_X86="(64) -32 (-x32)" 0 KiB
[ebuild  N     ] x11-libs/fltk-1.3.3-r3:1::gentoo  USE="opengl threads xft xinerama -cairo -debug -doc -examples -games -static-libs" 4 870 KiB
[ebuild  N F  ~] sci-chemistry/vmd-1.9.3::gentoo  USE="xinerama -cuda -gromacs -msms -povray -sqlite -tachyon" PYTHON_TARGETS="python2_7" 126 530 KiB

Total: 6 packages (6 new), Size of downloads: 131 533 KiB
Fetch Restriction: 1 package (1 unsatisfied)

Fetch instructions for sci-chemistry/vmd-1.9.3:
 * Please download vmd-1.9.3.src.tar.gz from
 * http://www.ks.uiuc.edu/Development/Download/download.cgi?PackageName=VMD
 * after agreeing to the license and get
 * https://dev.gentoo.org/~jlec/distfiles/vmd-1.9.3-gentoo-patches.tar.xz
 * Place both in /var/tmp/tmpfzilo8tq/portage/sci-chemistry/vmd-1.9.3/distdir

4. Look on fetch instructions and download mentioned VMD sources and patches
5. Put downloaded files into /usr/portage/distfiles (my default location from DISTDIR variable)
6. Start installation ...

host ~ # emerge --quiet-build=y vmd

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] sci-biology/stride-20011129-r1::gentoo  61 KiB
[ebuild  N    ~] sci-chemistry/surf-1.0::gentoo  73 KiB
[ebuild  N     ] dev-lang/tcl-8.6.6:0/8.6::gentoo  USE="threads -debug" ABI_X86="(64) -32 (-x32)" 0 KiB
[ebuild  N     ] dev-lang/tk-8.6.6:0/8.6::gentoo  USE="threads (-aqua) -debug {-test} -truetype -xscreensaver" ABI_X86="(64) -32 (-x32)" 0 KiB
[ebuild  N     ] x11-libs/fltk-1.3.3-r3:1::gentoo  USE="opengl threads xft xinerama -cairo -debug -doc -examples -games -static-libs" 4 870 KiB
[ebuild  N F  ~] sci-chemistry/vmd-1.9.3::gentoo  USE="xinerama -cuda -gromacs -msms -povray -sqlite -tachyon" PYTHON_TARGETS="python2_7" 126 530 KiB

Total: 6 packages (6 new), Size of downloads: 131 533 KiB
Fetch Restriction: 1 package (1 unsatisfied)

Fetch instructions for sci-chemistry/vmd-1.9.3:
 * Please download vmd-1.9.3.src.tar.gz from
 * http://www.ks.uiuc.edu/Development/Download/download.cgi?PackageName=VMD
 * after agreeing to the license and get
 * https://dev.gentoo.org/~jlec/distfiles/vmd-1.9.3-gentoo-patches.tar.xz
 * Place both in /var/tmp/tmpfzilo8tq/portage/sci-chemistry/vmd-1.9.3/distdir

7. ... and look Fetch Restriction again. 

Expected behaviour: installation should be contiunued as usual.

--- Workaround #1 ---

Rename vmd-1.9.3.src.tar.gz to vmd-1.9.3.src.tar because
in vmd-1.9.3.ebuild SRC_URI is pointed on "${P}.src.tar"
Someone missed ".gz" extension??!

SRC_URI="
    https://dev.gentoo.org/~jlec/distfiles/${P}-gentoo-patches.tar.xz
    ${P}.src.tar"     <----- ERROR, AM I RIGHT??

--- Workaround #2 ---

Modify ebuild (add ".gz" extension to SRC_URI), and update manifest.

-----------------------
And, there is yet another error! I see strange value for DISTDIR
in fetch instrcution that is shown during prepend installation when
no files have been fetching yet.

Fetch instructions for sci-chemistry/vmd-1.9.3:
 * Please download vmd-1.9.3.src.tar.gz from
 * http://www.ks.uiuc.edu/Development/Download/download.cgi?PackageName=VMD
 * after agreeing to the license and get
 * https://dev.gentoo.org/~jlec/distfiles/vmd-1.9.3-gentoo-patches.tar.xz
 * Place both in /var/tmp/tmpfzilo8tq/portage/sci-chemistry/vmd-1.9.3/distdir
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                 
In vmd-1.9.3.ebuild DISTDIR variable is in this place.

pkg_nofetch() {
    elog "Please download ${P}.src.tar.gz from"
    elog "${VMD_DOWNLOAD}"
    elog "after agreeing to the license and get"
    elog "https://dev.gentoo.org/~jlec/distfiles/${P}-gentoo-patches.tar.xz"
    elog "Place both in ${DISTDIR}"
}

I don't understand, why DISTDIR has such temporary value? Is it correct
or wrong behaviour? May be there is a problem on my site.
Anyway i had no pay an attention on this temporary directory
and had moved downloaded sources and patchet to default location
(/usr/portage/distfile on my site).

Thanks.
Comment 1 George Tarasov 2018-04-19 04:23:26 UTC
Created attachment 528028 [details]
make.conf
Comment 2 fio2003 2018-06-01 02:03:41 UTC
I have the same problem.
Renaming does not help.
Comment 3 fio2003 2018-06-01 04:00:45 UTC
Helped renaming inside /usr/portage/distfiles
I just ignored wrong /var/tmp/tmp_bla_bla folder and /var/tmp/.../vmd-1.9.3/distdir
Comment 4 Alexey Shvetsov archtester gentoo-dev 2018-06-20 15:27:30 UTC

*** This bug has been marked as a duplicate of bug 640440 ***
Comment 5 George Tarasov 2018-07-23 09:58:59 UTC
In spite of this bug is resolved and closed, let me leave a short comment
about DISTDIR value in pkg_nofetch log message.

In documentation on ebuild creation there is the following note

Note: The DISTDIR variable is not valid in pkg_* phases, so it must not be referenced. 
https://devmanual.gentoo.org/ebuild-writing/functions/pkg_nofetch/index.html

So, the comment partially explains the incorrect value that we see in log message.
But i have no idea why the meaning of DISTDIR variable is changed inside installation phases.
What to do?? May be it is a good idea to replace DISTDIR variable substitution expression
on plain text DISTDIR in elog messages due to developer's comment and not mislead
ordinary users.