Created attachment 435256 [details]
emerge --info ghc
Here's the qcheck output on my machine:
$ qcheck ghc
Checking dev-lang/ghc-7.10.3 ...
* 5697 out of 5714 files are good
I've run all the rebuilds after ghc update. @preserved-rebuild and revdep-rebuild are both clean.
The similar problem affects multiple Haskell packages installed on my machine:
The problem is again missing files in /usr/lib64/ghc-7.8.4/.
Created attachment 435260 [details]
equery files ghc
Please describe what exactly you did with files on your filesystem
around package manager.
Especially /usr/lib64/ghc-7.8.4/ contents. It looks like you've
manually wiped out files preserved by portage.
And please post contents of
and other packages that are affected.
Created attachment 435374 [details]
I didn't do any manual operations with the haskell toolchain or packages.
They are only updated via portage on my machine.
$ ls -laR /usr/lib64/ghc-7.8.4/
drwxr-xr-x 3 root root 4096 May 16 00:37 ./
drwxr-xr-x 118 root root 135168 May 25 16:05 ../
drwxr-xr-x 2 root root 4096 May 16 00:37 gentoo/
drwxr-xr-x 2 root root 4096 May 16 00:37 ./
drwxr-xr-x 3 root root 4096 May 16 00:37 ../
-rw-r--r-- 1 root root 0 Aug 18 2015 haskell-updater-1.2.9.conf
Created attachment 435376 [details]
Here's CONTENTS from one of the affected haskell packages.
There are about ten of them if you need those too I'll attach them.
(In reply to Coacher from comment #3)
> Created attachment 435374 [details]
Interesting. I think it's a portage bug of not cleaning up CONTENTS
files when @preserved-rebuild deleted empty directories with unused
My speculation of seqence of actions is:
1. dev-lang/ghc-7.8.4 gets installed onto the system and installs dynamic libraries
in non-standard directoryies
/usr/lib64/ghc-7.8.4/array-0.5.0.0/array.so # the real hames are a bit longer
2. dev-haskell/transformers-0.4.3.0 gets installed and links against those libraries
3. dev-lang/ghc-7.10.3 gets installed but preserved-libs attributes
7.8.4 libraries to new package
4. emerge @preserved-rebuild rebuilds dev-haskell/transformers-0.4.3.0
and relinks it against /usr/lib64/ghc-7.10.3/array-0.6.0.0/array.so
5. portage tries to cleanup /usr/lib64/ghc-7.8.4/array-0.5.0.0/array.so
from preserved libs, deletes empty directory /usr/lib64/ghc-7.8.4/
but does not emove (now empty) directory from CONTENTS.
We get corrupted CONTENTS.
(In reply to Coacher from comment #4)
> Created attachment 435376 [details]
> Here's CONTENTS from one of the affected haskell packages.
> There are about ten of them if you need those too I'll attach them.
This should be enough. It exibits the same problem as with ghc.
+Zac as he might know more than others about @preserved-libs :)
(In reply to Sergei Trofimovich from comment #5)
> 5. portage tries to cleanup /usr/lib64/ghc-7.8.4/array-0.5.0.0/array.so
> from preserved libs, deletes empty directory /usr/lib64/ghc-7.8.4/
> but does not emove (now empty) directory from CONTENTS.
> We get corrupted CONTENTS.
Yeah, that makes sense, because the vardbapi.removeFromContents method is responsible and it makes no attempt to remove empty directories from CONTENTS.
I've built a small repo-reroducer:
You need to merge an =app/app-0 with and without USE=lib1 in any order.
It triggers the same behaviour:
sudo ACCEPT_KEYWORDS='**' PORTDIR_OVERLAY=. USE=-lib1 emerge -v1 app/app
sudo ACCEPT_KEYWORDS='**' PORTDIR_OVERLAY=. USE=lib1 emerge -v1 app/app
We get the output as:
>>> Emerging (1 of 2) lib/lib-1::portage-bug-583986-repo
>>> Installing (1 of 2) lib/lib-1::portage-bug-583986-repo
>>> Emerging (2 of 2) app/app-0::portage-bug-583986-repo
>>> Installing (2 of 2) app/app-0::portage-bug-583986-repo
Checking lib/lib-1 ...
* 9 out of 10 files are good