Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 628652 - Add collision detection for a built package with itself (example: '/usr -> .' symlink)
Summary: Add collision detection for a built package with itself (example: '/usr -> .'...
Status: RESOLVED DUPLICATE of bug 690484
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - External Interaction (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 627378
  Show dependency tree
 
Reported: 2017-08-22 21:19 UTC by Sergei Trofimovich (RETIRED)
Modified: 2019-11-03 22:39 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***