View previous topic :: View next topic |
Author |
Message |
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9829 Location: almost Mile High in the USA
|
Posted: Wed Nov 27, 2024 4:41 pm Post subject: rust postinst failed Expected exactly two files but found 1. |
|
|
I tried re-running and appears to have succeeded the second time but this was highly odd:
Code: | >>> Completed installing dev-lang/rust-1.80.1-r100 into /tmp/portage/dev-lang/rust-1.80.1-r100/image
* Final size of build directory: 11271812 KiB ( 10.7 GiB)
* Final size of installed tree: 431924 KiB (421.8 MiB)
* QA Notice: The ebuild is installing to one or more unexpected directories:
*
* /usr/share/doc/rust-1.80.1
*
* Please fix the ebuild to use correct FHS/Gentoo policy paths.
strip: x86_64-pc-linux-gnu-strip --strip-unneeded -N __gentoo_check_ldflags__ -R .comment -R .GCC.command.line -R .note.gnu.gold-version
/usr/lib/rust/1.80.1/bin/rustc
/usr/lib/rust/1.80.1/bin/rustc-1.80.1
/usr/lib/rust/1.80.1/lib/rustlib/i686-unknown-linux-gnu/lib/libstd-0c48060941855a6c.so
/usr/lib/rust/1.80.1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-aa35babf0b4bbde6.so
/usr/lib/rust/1.80.1/bin/rustdoc
/usr/lib/rust/1.80.1/bin/rustdoc-1.80.1
/usr/lib/rust/1.80.1/lib/librustc_driver-06db74bcd3736db8.so
/usr/lib/rust/1.80.1/lib/libstd-aa35babf0b4bbde6.so
/usr/lib/rust/1.80.1/bin/cargo-1.80.1
/usr/lib/rust/1.80.1/bin/cargo
* Found old .rlib and .so files in the old rust lib directory
* ERROR: dev-lang/rust-1.80.1-r100::gentoo failed (postinst phase):
* Expected exactly two files matching /usr/lib/rust/1.80.1/lib/rustlib/i686-unknown-linux-gnu/lib/libcore-\*.rlib, but found 1
*
* Call stack:
* ebuild.sh, line 136: Called pkg_postinst
|
Not sure what to make of the error since I can't reproduce and no longer have the full build log. Perhaps just look the other way? _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
Kangie Developer
Joined: 21 May 2023 Posts: 3 Location: Brisbane, Australia
|
Posted: Wed Nov 27, 2024 9:51 pm Post subject: |
|
|
How interesting.
You seem to have hit an edge case in my attempt to work around breakage where `--keep-going` combined with a build failure could result in installing two copies of rust with the same version over the top of each other, but would leave the old copy installed (the uninstall action doesn't run until the next depclean).
The error here is that we attempt work around that in postinst, however if we don't find a match for a file (in this case we should find two files that match `/usr/lib/rust/1.80.1/lib/rustlib/i686-unknown-linux-gnu/lib/libcore-*`) we bail out rather than continue removing files.
I can't see a reason for you to have encountered this; libcore is not optional. We generate the list of files in preinst so we know it used to exist. Maybe you had a hash collision? Seems very unlikely but it's the best guess I have right now.
Code: | $ equery f dev-lang/rust:1.80.1 | grep -i libcore
/usr/lib/rust/1.80.1/lib/rustlib/i686-unknown-linux-gnu/lib/libcore-df5993c644c6a958.rlib
/usr/lib/rust/1.80.1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-ccfb3e0972f09e06.rlib |
I've just noticed that we say rlib when we also check for a few so files; I should update that.
Long term this needs to be fixed in Portage when someone has time to investigate. Related bugs:
|
|
Back to top |
|
|
|