Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 660974 - dev-lang/rust-bin-1.27.1[-cargo] fails
Summary: dev-lang/rust-bin-1.27.1[-cargo] fails
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal
Assignee: Gentoo Rust Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-11 22:55 UTC by Arfrever Frehtes Taifersar Arahesis
Modified: 2018-07-13 08:58 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arfrever Frehtes Taifersar Arahesis 2018-07-11 22:55:15 UTC
In dev-lang/rust-bin-1.27.1 ebuild:

use cargo && mv "${D}/opt/${P}/bin/cargo" "${D}/opt/${P}/bin/${cargo}" || die

It will call `die` when USE="-cargo".


Ebuild should use:

if use cargo; then
    mv "${D}/opt/${P}/bin/cargo" "${D}/opt/${P}/bin/${cargo}" || die
fi
Comment 1 Ulenrich 2018-07-12 00:08:32 UTC
I confirm. The default IUSE="cargo doc"
is supposed to die when emerging tis ebuild.

Also: You have to simple bump virtual/rust-1.27.1
Comment 2 tt_1 2018-07-12 08:31:06 UTC
dev-lang/rust-bin-1.27.1 with USE="cargo" does still pull in dev-util/cargo, making it an unbreakable circ dep conflict.
Comment 3 Ulenrich 2018-07-12 11:36:44 UTC
If USE=-cargo this is what worked for me:
--- a/dev-lang/rust-bin/rust-bin-1.27.1.ebuild
+++ b/dev-lang/rust-bin/rust-bin-1.27.1.ebuild
@@ -64,7 +64,7 @@
 }
 
 src_install() {
-	local std=$(grep 'std' ./components)
+	local std=$(grep 'std' ./components|grep -v ',cargo')
 	local components="rustc,${std}"
 	use doc && components="${components},rust-docs"
 	use cargo && components="${components},cargo"
@@ -84,7 +84,7 @@
 	mv "${D}/opt/${P}/bin/rustc" "${D}/opt/${P}/bin/${rustc}" || die
 	mv "${D}/opt/${P}/bin/rustdoc" "${D}/opt/${P}/bin/${rustdoc}" || die
 	mv "${D}/opt/${P}/bin/rust-gdb" "${D}/opt/${P}/bin/${rustgdb}" || die
-	use cargo && mv "${D}/opt/${P}/bin/cargo" "${D}/opt/${P}/bin/${cargo}" || die
+	use cargo && mv "${D}/opt/${P}/bin/cargo" "${D}/opt/${P}/bin/${cargo}"
 
 	dosym "../../opt/${P}/bin/${rustc}" "/usr/bin/${rustc}"
 	dosym "../../opt/${P}/bin/${rustdoc}" "/usr/bin/${rustdoc}"
---
Comment 4 Ulenrich 2018-07-12 11:44:45 UTC
(In reply to tt_1 from comment #2)
> dev-lang/rust-bin-1.27.1 with USE="cargo" does still pull in dev-util/cargo,
> making it an unbreakable circ dep conflict.

if USE=cargo

@tt_1, what if you try to comment out in the ebuild this line:
PDEPEND=">=dev-util/cargo-${CARGO_DEPEND_VERSION}"
Comment 5 Larry the Git Cow gentoo-dev 2018-07-12 12:47:08 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b9a8ae66e199136944e2a832a7c7e74cc2af0679

commit b9a8ae66e199136944e2a832a7c7e74cc2af0679
Author:     Dirkjan Ochtman <djc@gentoo.org>
AuthorDate: 2018-07-12 12:46:56 +0000
Commit:     Dirkjan Ochtman <djc@gentoo.org>
CommitDate: 2018-07-12 12:46:56 +0000

    dev-lang/rust-bin: fix issues with cargo USE flag, add rustfmt flag
    
    Fixes: https://bugs.gentoo.org/show_bug.cgi?id=660974
    Package-Manager: Portage-2.3.40, Repoman-2.3.9

 dev-lang/rust-bin/metadata.xml              |   1 +
 dev-lang/rust-bin/rust-bin-1.27.1-r1.ebuild | 142 ++++++++++++++++++++++++++++
 2 files changed, 143 insertions(+)
Comment 6 Dirkjan Ochtman (RETIRED) gentoo-dev 2018-07-12 12:48:59 UTC
Oops, sorry about that. This change didn't make sense to me:

--- a/dev-lang/rust-bin/rust-bin-1.27.1.ebuild
+++ b/dev-lang/rust-bin/rust-bin-1.27.1.ebuild
@@ -64,7 +64,7 @@
 }
 
 src_install() {
-	local std=$(grep 'std' ./components)
+	local std=$(grep 'std' ./components|grep -v ',cargo')
 	local components="rustc,${std}"
 	use doc && components="${components},rust-docs"
 	use cargo && components="${components},cargo"

I don't think it's necessary?

I was still working on a bump for dev-lang/rust, will bump virtual/rust after that.
Comment 7 Ulenrich 2018-07-12 15:11:48 UTC
(In reply to Dirkjan Ochtman from comment #6)
> Oops, sorry about that. This change didn't make sense to me:
> 
> --- a/dev-lang/rust-bin/rust-bin-1.27.1.ebuild
> +++ b/dev-lang/rust-bin/rust-bin-1.27.1.ebuild
> @@ -64,7 +64,7 @@
>  }
>  
>  src_install() {
> -	local std=$(grep 'std' ./components)
> +	local std=$(grep 'std' ./components|grep -v ',cargo')
>  	local components="rustc,${std}"
>  	use doc && components="${components},rust-docs"
>  	use cargo && components="${components},cargo"
> 
> I don't think it's necessary?
> 
> I was still working on a bump for dev-lang/rust, will bump virtual/rust
> after that.

- Is it needed that virtual/rust is sensible to the minor bug fixing number?

- OK, just in case upstream thinks cargo is "std", I wanted through away cargo.

- I did not trust fully your new ebuild, so I just tested:
dev-lang/rust-bin-1.27.1-r1:stable::gentoo USE="-cargo doc* rustfmt%*" 0 KiB
But that merge worked with having USE="-cargo rustfmt" 
But I wonder if this makes sense and works together with installed
dev-util/cargo-0.28.0
Comment 8 Dirkjan Ochtman (RETIRED) gentoo-dev 2018-07-12 21:05:18 UTC
I've now added the virtual/rust-1.27.1 bump. This should pick up the -r1 automatically.

Did you see any results from your merge did you did not expect/that you think are wrong? I'm not sure what you're trying to say here. I've added blocking to the rust and rust-bin ebuilds such that building with +cargo should block if dev-util/cargo is already installed.
Comment 9 Ulenrich 2018-07-13 08:58:23 UTC
Phantastic,no, 
I did not see any results not expected: I tested "But that merge worked"

Sorry, my bad english! Thank you for your work!