Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 521968 - sys-devel/llvm-9999 with sys-apps/portage-2.2.12 - KeyError: '<portage.util._dyn_libs.LinkageMapELF.LinkageMapELF._ObjectKey object at 0x7f5a0a9556e0> (/usr/lib64/libLLVM-3.5svn.so) not in object list'
Summary: sys-devel/llvm-9999 with sys-apps/portage-2.2.12 - KeyError: '<portage.util._...
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: preserve-libs
  Show dependency tree
 
Reported: 2014-09-02 12:48 UTC by Marcin Mirosław
Modified: 2023-12-18 05:11 UTC (History)
9 users (show)

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


Attachments
build.log compressed (build.log.bz2,105.64 KB, application/x-bzip)
2014-09-02 12:49 UTC, Marcin Mirosław
Details
vdb.tar (vdb.tar,70.00 KB, application/x-tar)
2018-05-02 20:37 UTC, eroen
Details
dev-libs/liborcus-0.16.1 build.log (build.log,331.00 KB, text/plain)
2021-10-15 01:08 UTC, Jeffrey Lin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Mirosław 2014-09-02 12:48:50 UTC
[...]
removing executable bit: usr/lib64/libLTO.a
removing executable bit: usr/lib64/libmodernizeCore.a

>>> Installing (1 of 1) sys-devel/llvm-9999::gentoo
Traceback (most recent call last):
  File "/usr/lib64/portage/pym/portage/dbapi/_MergeProcess.py", line 234, in _spawn
    prev_mtimes=self.prev_mtimes, counter=counter)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 4872, in merge
    counter=counter)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 4163, in treewalk
    preserve_paths=preserve_paths)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 1933, in unmerge
    preserve_paths=preserve_paths)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 1773, in _prune_plib_registry
    unmerge_no_replacement)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 3097, in _find_unused_preserved_libs
    for c in self.vartree.dbapi._linkmap.findConsumers(f):
  File "/usr/lib64/portage/pym/portage/util/_dyn_libs/LinkageMapELF.py", line 742, in findConsumers
    raise KeyError("%s (%s) not in object list" % (obj_key, obj))
KeyError: '<portage.util._dyn_libs.LinkageMapELF.LinkageMapELF._ObjectKey object at 0x7f5a0a9556e0> (/usr/lib64/libLLVM-3.5svn.so) not in object list'

>>> Failed to install sys-devel/llvm-9999, Log file:



Reproducible: Always




# emerge --info
!!! Repository 'x-portage' is missing masters attribute in '/usr/local/portage/metadata/layout.conf'
!!! Set 'masters = gentoo' in this file for future compatibility
Portage 2.2.12 (python 3.3.5-final-0, default/linux/amd64/13.0/desktop/kde, gcc-4.8.3, glibc-2.19-r1, 3.16.1-gentoo x86_64)
=================================================================
System uname: Linux-3.16.1-gentoo-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-gentoo-2.2
KiB Mem:     4555256 total,    677404 free
KiB Swap:    6291452 total,   5226584 free
Timestamp of tree: Tue, 02 Sep 2014 05:30:01 +0000
ld GNU gold (GNU Binutils 2.24) 1.11
app-shells/bash:          4.2_p47
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.8, 3.2.5-r6, 3.3.5-r1, 3.4.1
dev-util/cmake:           2.8.12.2-r2
dev-util/pkgconfig:       0.28-r2
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.13.1
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.14.1
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.7.4, 4.8.3
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.16 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -fpeel-loops -frename-registers -frecord-gcc-switches -fno-unwind-tables -fno-asynchronous-unwind-tables           -fpredictive-commoning -fweb -ftree-vectorize -floop-interchange -fivopts -ftree-loop-distribution           -floop-block -floop-strip-mine -fira-loop-pressure -floop-interchange -ftree-loop-linear -Wdisabled-optimization   -fuse-linker-plugin"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -pipe -fpeel-loops -frename-registers -frecord-gcc-switches -fno-unwind-tables -fno-asynchronous-unwind-tables           -fpredictive-commoning -fweb -ftree-vectorize -floop-interchange -fivopts -ftree-loop-distribution           -floop-block -floop-strip-mine -fira-loop-pressure -floop-interchange -ftree-loop-linear -Wdisabled-optimization   -fuse-linker-plugin"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache cgroup collision-protect compressdebug config-protect-if-modified distlocks ebuild-locks fakeroot fixlafiles news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -z relro -Wl,--sort-common -O2 -march=native -pipe -fpeel-loops -frename-registers -frecord-gcc-switches -fno-unwind-tables -fno-asynchronous-unwind-tables           -fpredictive-commoning -fweb -ftree-vectorize -floop-interchange -fivopts -ftree-loop-distribution           -floop-block -floop-strip-mine -fira-loop-pressure -floop-interchange -ftree-loop-linear -Wdisabled-optimization   -fuse-linker-plugin"
MAKEOPTS="-j3 -l4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="-O"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://192.168.138.254/gentoo-portage"
USE="X a52 aac acl acpi aio alsa amd64 apm async bash-completion bittorrent branding bzip2 cairo caps cdda cdr chroot cli consolekit crypt cups cxx dbus declarative dmx dri dvd dvdr emboss encode exif fam firefox ftp gif glibc-omitfp gpm graphite gstreamer iconv idn iproute2 ipv6 ithreads jpeg kde kipi laptop lcms libnotify lightning logrotate mad mmap mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses network-cron nls nptl nsplugin nspluginwrapper objc ogg opengl openmp openssl optimization optimized-qmake pam pango pch pcre pdf phonon plasma png policykit ppds python3 qt3support qt4 readline samba sdl semantic-desktop session sharedmem smp spell sse sse2 sse3 ssl ssse3 startup-notification svg threads threadsafe tiff tools truetype udev udisks unicode unwind upower urandom usb vim vim-pager vim-syntax vorbis wxwidgets x264 xattr xcb xcomposite xinerama xml xscreensaver xv xvid zip zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cgid dav dbd deflate dir env expires ext_filter filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id usertrack vhost_alias" APACHE2_MPMS="worker" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="caps lvm mdraid" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="pl en es es_ES" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4 php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2 python3_3" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON
Comment 1 Marcin Mirosław 2014-09-02 12:49:57 UTC
Created attachment 384116 [details]
build.log compressed
Comment 2 Marcin Mirosław 2014-09-02 13:38:55 UTC
Hmm, I should paste more:

>>> Installing (1 of 1) sys-devel/llvm-9999::gentoo
Traceback (most recent call last):
  File "/usr/lib64/portage/pym/portage/dbapi/_MergeProcess.py", line 234, in _spawn
    prev_mtimes=self.prev_mtimes, counter=counter)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 4872, in merge
    counter=counter)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 4163, in treewalk
    preserve_paths=preserve_paths)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 1933, in unmerge
    preserve_paths=preserve_paths)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 1773, in _prune_plib_registry
    unmerge_no_replacement)
  File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 3097, in _find_unused_preserved_libs
    for c in self.vartree.dbapi._linkmap.findConsumers(f):
  File "/usr/lib64/portage/pym/portage/util/_dyn_libs/LinkageMapELF.py", line 742, in findConsumers
    raise KeyError("%s (%s) not in object list" % (obj_key, obj))
KeyError: '<portage.util._dyn_libs.LinkageMapELF.LinkageMapELF._ObjectKey object at 0x7f5a0a9556e0> (/usr/lib64/libLLVM-3.5svn.so) not in object list'

>>> Failed to install sys-devel/llvm-9999, Log file:

>>>  '/var/tmp/portage/sys-devel/llvm-9999/temp/build.log'

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

!!! existing preserved libs:
>>> package: sys-devel/llvm-9999
 *  - /usr/lib64/libLLVM-3.5svn.so
 *      used by /usr/lib64/mesa/swrastg_dri.so (media-libs/mesa-10.2.1)
Use emerge @preserved-rebuild to rebuild packages using these libraries
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-09-04 13:21:02 UTC
Hi, Portage team. I guess we want to fix this for the next release.
Comment 4 Marcin Mirosław 2015-01-05 15:34:13 UTC
(In reply to Michał Górny from comment #3)
> Hi, Portage team. I guess we want to fix this for the next release.

I agree it would be nice to have this bug fixed:)
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-03-29 07:46:47 UTC
Ping. Is this still relevant?
Comment 6 Marcin Mirosław 2018-03-29 07:50:08 UTC
Time heals all wounds :/ I didn't saw such error since long time.
Comment 7 Kalin KOZHUHAROV 2018-04-07 06:53:13 UTC
I just hit this bug with experimental libewf ebuild, but it is not always reproducible.
...
>>> Safely unmerging already-installed instance...
Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/portage/dbapi/_MergeProcess.py", line 235, in _spawn
    prev_mtimes=self.prev_mtimes, counter=counter)
  File "/usr/lib64/python3.6/site-packages/portage/dbapi/vartree.py", line 1704, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/lib64/python3.6/site-packages/portage/dbapi/vartree.py", line 5150, in merge
    counter=counter)
  File "/usr/lib64/python3.6/site-packages/portage/dbapi/vartree.py", line 4391, in treewalk
    preserve_paths=preserve_paths)
  File "/usr/lib64/python3.6/site-packages/portage/dbapi/vartree.py", line 1704, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/lib64/python3.6/site-packages/portage/dbapi/vartree.py", line 2127, in unmerge
    preserve_paths=preserve_paths)
  File "/usr/lib64/python3.6/site-packages/portage/dbapi/vartree.py", line 1966, in _prune_plib_registry
    unmerge_no_replacement)
  File "/usr/lib64/python3.6/site-packages/portage/dbapi/vartree.py", line 3297, in _find_unused_preserved_libs
    for c in self.vartree.dbapi._linkmap.findConsumers(f):
  File "/usr/lib64/python3.6/site-packages/portage/util/_dyn_libs/LinkageMapELF.py", line 798, in findConsumers
    raise KeyError("%s (%s) not in object list" % (obj_key, obj))
KeyError: '<portage.util._dyn_libs.LinkageMapELF.LinkageMapELF._ObjectKey object at 0x7fac28391a68> (/usr/lib64/libewf.so.2.0.0) not in object list'


Portage 2.3.24 (python 3.6.3-final-0, default/linux/amd64/17.0, gcc-6.4.0, glibc-2.25-r11, 4.14.32-r11 x86_64)


/usr/lib64/libewf.so.2.0.0 is an old library, the package is installing /usr/lib64/libewf.so.3.0.0
Comment 8 Zac Medico gentoo-dev 2018-04-07 17:46:24 UTC
The _prune_plib_registry method is supposed to index relevant preserved libraries in the LinkageMapELF instance here:

>  self._linkmap_rebuild(exclude_pkgs=exclude_pkgs,
>    include_file=needed, preserve_paths=preserve_paths)

However, the LinkageMapELF method has exclude_pkgs logic that can prevent preserved libraries from being indexed:

>   if self._dbapi._plib_registry and \
>     self._dbapi._plib_registry.hasEntries():
>     for cpv, items in \
>       self._dbapi._plib_registry.getPreservedLibs().items():
>       if exclude_pkgs is not None and cpv in exclude_pkgs:
>         # These preserved libs will either be unmerged,
>         # rendering them irrelevant, or they will be
>         # preserved in the replacement package and are
>         # already represented via the preserve_paths
>         # parameter.
>         continue
>       plibs.update((x, cpv) for x in items)

If _find_unused_preserved_libs calls findConsumers for a preserved library that is not indexed in the LinkageMapELF, findConsumers will raise a KeyError here:

>   obj_key = self._obj_key(obj)
>   if obj_key not in self._obj_properties:
>     raise KeyError("%s (%s) not in object list" % (obj_key, obj))
Comment 9 Zac Medico gentoo-dev 2018-04-07 18:05:17 UTC
Hypothesis:

If the package being replaced has some entries associated with it in the PreservedLibsRegistry, those libraries will not be included in preserve_paths variable here:

> preserve_paths = self._find_libs_to_preserve()

Since those libraries are not included in the preserve_paths variable, they are not indexed when the _prune_plib_registry method is supposed to index relevant preserved libraries in the LinkageMapELF instance here:

>  self._linkmap_rebuild(exclude_pkgs=exclude_pkgs,
>    include_file=needed, preserve_paths=preserve_paths)

When _find_unused_preserved_libs calls findConsumers for one of these preserved libraries that is not been indexed, findConsumers raises the KeyError here:

>   obj_key = self._obj_key(obj)
>   if obj_key not in self._obj_properties:
>     raise KeyError("%s (%s) not in object list" % (obj_key, obj))
Comment 10 Zac Medico gentoo-dev 2018-04-07 18:26:49 UTC
If my hypothesis from comment #9 is correct, then the issue may have been triggered by pointlessly preserved libraries due to bug 637284 (stale NEEDED entries). If that's the case, the problem may not be reproducible now that bug 637284 has been fixed.
Comment 11 eroen 2018-05-02 19:47:46 UTC
Ran into this now with portage 2.3.33. The present dev-haskell/streaming-commons version was built yesterday with portage 2.3.31.

>>> Completed installing streaming-commons-0.1.18 into /var/tmp/portage/dev-haskell/streaming-commons-0.1.18/image/

 * Final size of build directory: 7412 KiB (7.2 MiB)
 * Final size of installed tree:  3472 KiB (3.3 MiB)

strip: x86_64-pc-linux-gnu-strip --strip-unneeded -R .comment -R .GCC.command.line -R .note.gnu.gold-version
   usr/lib64/streaming-commons-0.1.18/ghc-8.0.2/libHSstreaming-commons-0.1.18-Kw68jneom70DHtUWGw1HR4.a
   usr/lib64/x86_64-linux-ghc-8.0.2/libHSstreaming-commons-0.1.18-Kw68jneom70DHtUWGw1HR4-ghc8.0.2.so
installsources: rsyncing source files
ecompressdir: bzip2 -9 //usr/share/doc
>>> needed    obj /usr/lib64/x86_64-linux-ghc-8.0.2/libHSstreaming-commons-0.1.18-lXuy6setVwA1liovC4Peu-ghc8.0.2.so
Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/portage/dbapi/_MergeProcess.py", line 224, in _spawn
    prev_mtimes=self.prev_mtimes, counter=counter)
  File "/usr/lib64/python3.6/site-packages/portage/dbapi/vartree.py", line 1676, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/lib64/python3.6/site-packages/portage/dbapi/vartree.py", line 5132, in merge
    counter=counter)
  File "/usr/lib64/python3.6/site-packages/portage/dbapi/vartree.py", line 4373, in treewalk
    preserve_paths=preserve_paths)
  File "/usr/lib64/python3.6/site-packages/portage/dbapi/vartree.py", line 1676, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/lib64/python3.6/site-packages/portage/dbapi/vartree.py", line 2099, in unmerge
    preserve_paths=preserve_paths)
  File "/usr/lib64/python3.6/site-packages/portage/dbapi/vartree.py", line 1938, in _prune_plib_registry
    unmerge_no_replacement)
  File "/usr/lib64/python3.6/site-packages/portage/dbapi/vartree.py", line 3270, in _find_unused_preserved_libs
    for c in self.vartree.dbapi._linkmap.findConsumers(f):
  File "/usr/lib64/python3.6/site-packages/portage/util/_dyn_libs/LinkageMapELF.py", line 798, in findConsumers
    raise KeyError("%s (%s) not in object list" % (obj_key, obj))
KeyError: '<portage.util._dyn_libs.LinkageMapELF.LinkageMapELF._ObjectKey object at 0x7f0aa4f75b58> (/usr/lib64/x86_64-linux-ghc-8.0.2/libHSstreaming-commons-0.1.18-7JipNjl0dYr9UZDg1zBcy3-ghc8.0.2.so) not in object list'
Comment 12 eroen 2018-05-02 20:37:08 UTC
Created attachment 529486 [details]
vdb.tar

I can reproduce the error with just the vdb for the package and none of the actual files, and using 'ebuild' command to merge an empty image directory. I have attached a tarball of the package's vdb.
Comment 13 Zac Medico gentoo-dev 2018-05-03 08:55:21 UTC
(In reply to eroen from comment #11)
> >>> needed    obj /usr/lib64/x86_64-linux-ghc-8.0.2/libHSstreaming-commons-0.1.18-lXuy6setVwA1liovC4Peu-ghc8.0.2.so

I can see why this would happen when rebuilding a package after a ghc upgrade. Since the ghc version is encoded in the soname, the installed instance of streaming-commons-0.1.18 provides a different soname that the rebuilt instance of streaming-commons-0.1.18, therefore the library belonging to the installed instance needs to be preserved. The exclude_pkgs logic prevents this preserved library from being indexed by LinkageMapELF, ultimately leading to the KeyError.
Comment 14 Zac Medico gentoo-dev 2018-05-03 09:55:58 UTC
I tried to reproduce it with dev-haskell/hashable-1.2.4.0 by removing the library from the image directory and then merging with the ebuild command, but I wasn't able to trigger the KeyError. The exclude_pkgs logic did not prevent the library from being indexed, since the library was passed in via the preserve_paths variable.

Looking again at the output from comment #11, I see that the ghc version is unchanged, but the library name changes from libHSstreaming-commons-0.1.18-lXuy6setVwA1liovC4Peu-ghc8.0.2.so to libHSstreaming-commons-0.1.18-7JipNjl0dYr9UZDg1zBcy3-ghc8.0.2.so. I guess this probably occurs because the package has been rebuilt a second time, and when the KeyError occurs there are actually three different instances of the library:

1) The instance preserved during the previous upgrade.
2) The instance preserved during the current upgrade.
3) The instance built for the current upgrade.
Comment 15 Zac Medico gentoo-dev 2018-05-03 16:20:24 UTC
I plan to create unit tests that call the doebuild function using a mock derived from LinkageMapELF. This will allow for efficient testing of changes and detection of regressions.
Comment 16 Zac Medico gentoo-dev 2018-05-03 16:47:40 UTC
This comment in the code from bug 286714 is relevant:

>    # Preserve old libs if they are still in use
>    # TODO: Handle cases where the previous instance
>    # has already been uninstalled but it still has some
>    # preserved libraries in the registry that we may
>    # want to preserve here.
>    preserve_paths = self._find_libs_to_preserve()

If the previous instance of streaming-commons-0.1.18 happens to have a preserved library, or the library is preserved because the previous instance of streaming-commons-0.1.18 was unmerged, we can add that library to preserve_paths in order to include it in the files to be indexed by LinkageMapELF in _prune_plib_registry here:

>  self._linkmap_rebuild(exclude_pkgs=exclude_pkgs,
>    include_file=needed, preserve_paths=preserve_paths)
Comment 17 Zac Medico gentoo-dev 2018-05-03 16:57:34 UTC
If we add the previously preserved library to preserve_paths, then the _add_preserve_libs_to_contents method will have to be adjusted to handle cases where the previous instance was unmerged, since it currently assumes that there's an installed instance with a matching contents_entry.
Comment 18 Jeffrey Lin 2021-10-15 01:08:22 UTC
Created attachment 744978 [details]
dev-libs/liborcus-0.16.1 build.log

I am able to reproduce with dev-libs/liborcus-0.16.1.
Comment 19 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-12-15 07:35:27 UTC
Someone reported this bug again on IRC although didn't give any output.

(In reply to Zac Medico from comment #15)
> I plan to create unit tests that call the doebuild function using a mock
> derived from LinkageMapELF. This will allow for efficient testing of changes
> and detection of regressions.

Yeah, I noticed the lack of coverage we have atm when someone mentioned the preserved-libs cycles w/ e.g. freetype again the other day.