Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 943308 - dev-lang/rust: add workaround for failed keep-going builds in pkg_postinst (was: dev-util/cbindgen-0.27.0-r1: Failed to emerge)
Summary: dev-lang/rust: add workaround for failed keep-going builds in pkg_postinst (w...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal normal
Assignee: Gentoo Rust Project
URL:
Whiteboard:
Keywords:
Depends on: 943143
Blocks:
  Show dependency tree
 
Reported: 2024-11-12 08:42 UTC by migmac
Modified: 2024-11-25 08:50 UTC (History)
7 users (show)

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


Attachments
build.log (build.log,97.42 KB, text/x-log)
2024-11-12 08:42 UTC, migmac
Details
emerge --info (emerge-info,8.27 KB, text/plain)
2024-11-12 08:45 UTC, migmac
Details

Note You need to log in before you can comment on or make changes to this bug.
Description migmac 2024-11-12 08:42:26 UTC
Created attachment 908563 [details]
build.log

Hello,

I tried to compile but failed three times!

Here the emerge --info:

and the build.log:

in attachment.

Thanks,
Michel
Comment 1 migmac 2024-11-12 08:45:11 UTC
Created attachment 908564 [details]
emerge --info
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-11-12 19:00:26 UTC
This is a mix of bug 943143 (which leads to the failure to begin with) combined with the (now-reverted) optimisation from bug 943206 which made it harder to recover from afterwards.

Can you sync and try again please, and if it fails, show the output of emerge -p -uvDU @world too, as well as emerge --info? Thanks.
Comment 3 migmac 2024-11-12 19:33:07 UTC
Hello Sam, 
Few minutes ago I put the following in the gentoo forums the following:

Hello Sam,

Finally I opened a bug, but meanwhile I found the way to solve the issue.

Firstly I did:

[b]emerge -C =dev-lang/rust-1.79.0-r100 =dev-lang/rust-1.81.0-r100
[/b]

Secondly:

[b]emerge -C virtual/rust[/b]
 * This action can remove important packages! In order to be safer, use
 * `emerge -pv --depclean <atom>` to check for reverse dependencies before
 * removing packages.

 virtual/rust
    selected: 1.81.0-r1 
   protected: none 
     omitted: none 

All selected packages: =virtual/rust-1.81.0-r1

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.

>>> Waiting 5 seconds before starting...
>>> (Control-C to abort)...
>>> Unmerging in: 5 4 3 2 1
>>> Unmerging (1 of 1) virtual/rust-1.81.0-r1...

 * GNU info directory index is up-to-date.

Thirdly:

[b]emerge -a cbindgen[/b]

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

Calculating dependencies... done!
Dependency resolution took 35.07 s (backtrack: 0/20).

[ebuild  NS    ] dev-lang/rust-1.81.0-r100 [1.81.0] LLVM_SLOT="18%*" 
[uninstall     ] dev-lang/rust-1.81.0 
[blocks b      ] dev-lang/rust:stable ("dev-lang/rust:stable" is soft blocking dev-lang/rust-1.81.0-r100)
[ebuild     U  ] dev-util/cbindgen-0.27.0-r1 [0.27.0]

Finally all is good now.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-11-12 19:41:20 UTC
Thanks. I'm pretty confident that the change will fix it for now.

Let's keep the bug open for now to track doing a pkg_postinst hack in dev-lang/rust* as a workaround for the Portage bug.
Comment 5 Larry the Git Cow gentoo-dev 2024-11-25 03:41:49 UTC
The bug has been referenced in the following commit(s):

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

commit 8c365d501a904021cb0bd4b81d4bf7e4380702c5
Author:     Matt Jolly <kangie@gentoo.org>
AuthorDate: 2024-11-23 05:00:48 +0000
Commit:     Matt Jolly <kangie@gentoo.org>
CommitDate: 2024-11-25 03:39:22 +0000

    dev-lang/rust: -r100: add postinst workaround for --keep-going
    
    A bug in Portage's --keep-going option can cause it to fail to uninstall
    non-slotted Rust files when resuming an interrupted upgrade. This results
    in a broken Rust installation, preventing compilation and requiring manual
    intervention.
    
    We can work around this by deleting duplicate Rust libraries in postinst.
    
    Bug: https://bugs.gentoo.org/943308
    Signed-off-by: Matt Jolly <kangie@gentoo.org>

 dev-lang/rust/rust-1.71.1-r100.ebuild | 37 +++++++++++++++++++++++++++++++++++
 dev-lang/rust/rust-1.74.1-r100.ebuild | 37 +++++++++++++++++++++++++++++++++++
 dev-lang/rust/rust-1.75.0-r100.ebuild | 37 +++++++++++++++++++++++++++++++++++
 dev-lang/rust/rust-1.77.1-r100.ebuild | 37 +++++++++++++++++++++++++++++++++++
 dev-lang/rust/rust-1.79.0-r100.ebuild | 37 +++++++++++++++++++++++++++++++++++
 dev-lang/rust/rust-1.80.1-r100.ebuild | 37 +++++++++++++++++++++++++++++++++++
 dev-lang/rust/rust-1.81.0-r100.ebuild | 37 +++++++++++++++++++++++++++++++++++
 dev-lang/rust/rust-1.82.0-r100.ebuild | 37 +++++++++++++++++++++++++++++++++++
 8 files changed, 296 insertions(+)
Comment 6 Matt Jolly gentoo-dev 2024-11-25 03:43:28 UTC
That should be the last we hear of this issue, but I'll leave it open for a little while to catch any issues.