Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 628652

Summary: Add collision detection for a built package with itself (example: '/usr -> .' symlink)
Product: Portage Development Reporter: Sergei Trofimovich (RETIRED) <slyfox>
Component: Core - External InteractionAssignee: Portage team <dev-portage>
Status: RESOLVED DUPLICATE    
Severity: normal CC: dennis.lissov, sharpshopter
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 627378    

Description Sergei Trofimovich (RETIRED) gentoo-dev 2017-08-22 21:19:22 UTC
In bug #627378 users have a setup where /lib/ and /usr/lib/ are the same file
via '/usr -> .' link.

The problem is sometimes (bug #627378) packages install files like:
    /usr/lib/foo.so (file)
    /lib/foo.so -> /usr/lib/foo.so (symlink)

It depends on the merge order which of two will survive after package install:
symlink pointing to itself or actual ELF.

Would it be easy for portage to ckeck for package to collide with itself
considering already present symlinks in live system?

Thanks!
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2019-11-03 22:28:47 UTC
Rumors say it was implemented in https://bugs.gentoo.org/690484 . Was it generic enough to cover arbitrary collisions?
Comment 2 Zac Medico gentoo-dev 2019-11-03 22:39:57 UTC
(In reply to Sergei Trofimovich from comment #1)
> Rumors say it was implemented in https://bugs.gentoo.org/690484 . Was it
> generic enough to cover arbitrary collisions?

Yes, it uses a compare_files function to check for all kinds of differences:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=0b7eda500a0dcb98a67f33bf9ef25b202b358986

*** This bug has been marked as a duplicate of bug 690484 ***