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

Bug 645466

Summary: dev-lang/rust-1.23 mv: cannot stat '/tmp/portage/dev-lang/rust-1.23.0/image//usr/share/doc/rust/*': No such file or directory
Product: Gentoo Linux Reporter: Oleg <O01eg>
Component: Current packagesAssignee: Gentoo Rust Project <rust>
Status: RESOLVED FIXED    
Severity: major CC: grozin, lkd-gentoo, marien.zwart, O01eg, rose
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log.gz
usr/lib64/rustlib/install.log written by Rust build system

Description Oleg 2018-01-23 18:06:23 UTC
When I builds =dev-lang/rust-1.23.0 with "doc" enabled I gets error:

< Rustc { stage: 2, target: "x86_64-unknown-linux-gnu", host: "x86_64-unknown-linux-gnu" }
Build completed successfully in 0:04:28
mv: cannot stat '/tmp/portage/dev-lang/rust-1.23.0/image//usr/share/doc/rust/*': No such file or directory

As I see the documentation is already placed in ${D}/usr/share/doc/rust-1.23.0/ so it shouldn't be moved. I deleted lines from ebuild and dev-lang/rust-1.23.0 installed correctly.
Comment 1 Dirkjan Ochtman (RETIRED) gentoo-dev 2018-01-24 08:55:24 UTC
Thanks for the report!

What lines did you remove, exactly? If you can provide a unified diff, that would be helpful.
Comment 2 Oleg 2018-01-24 17:55:40 UTC
I removed next lines from src_install:

        if use doc ; then
                dodir "/usr/share/doc/rust-${PV}/"
                mv "${D}/usr/share/doc/rust"/* "${D}/usr/share/doc/rust-${PV}/" || die
                rmdir "${D}/usr/share/doc/rust/" || die
        fi
Comment 3 Juergen Rose 2018-01-25 07:39:32 UTC
I have the same issue.
Comment 4 Marien Zwart 2018-01-25 10:49:28 UTC
Created attachment 516534 [details]
build.log.gz
Comment 5 Marien Zwart 2018-01-25 11:11:10 UTC
Created attachment 516536 [details]
usr/lib64/rustlib/install.log written by Rust build system
Comment 6 Marien Zwart 2018-01-25 11:12:59 UTC
Same here :)

After the build has failed, image/usr/share/doc/rust-1.23.0 contains a few README/LICENSE/COPYRIGHT files and an "html" directory containing 123M of documentation. So it looks like Rust's build system already put the documentation where we want it, and comment #2 has it right (that part of src_install breaks everyone with USE=doc set).

I suspect this happens because src_configure adds the following lines to config.toml:

		docs = $(toml_usex doc)

		docdir = "share/doc/${P}"

...and those are all we need to install documentation to the correct directory and make USE=doc work.

Also note the docdir looks new to this ebuild (rust-1.19.0.ebuild set a different one).
Comment 7 Andrey Grozin gentoo-dev 2018-01-25 16:25:19 UTC
(In reply to Oleg from comment #2)
> I removed next lines from src_install:
> 
>         if use doc ; then
>                 dodir "/usr/share/doc/rust-${PV}/"
>                 mv "${D}/usr/share/doc/rust"/*
> "${D}/usr/share/doc/rust-${PV}/" || die
>                 rmdir "${D}/usr/share/doc/rust/" || die
>         fi
I confirm that removing these lines resolves the problem
Comment 8 Dirkjan Ochtman (RETIRED) gentoo-dev 2018-01-27 13:25:55 UTC
I've removed the offending lines from rust-1.23.0-r1, thanks!