Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 619472 - app-portage/gentoolkit - equery check incorrectly reports broken symlinks as "does not exist"
Summary: app-portage/gentoolkit - equery check incorrectly reports broken symlinks as ...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords: InVCS
: 629948 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-05-23 18:57 UTC by Francesco Turco
Modified: 2020-01-03 14:58 UTC (History)
2 users (show)

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


Attachments
emerge --info (emerge-info.txt,6.27 KB, text/plain)
2017-05-23 18:57 UTC, Francesco Turco
Details
patch (0001-equery-check-use-os.path.lexists.patch,976 bytes, patch)
2017-05-23 22:52 UTC, Mike Gilbert
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Francesco Turco 2017-05-23 18:57:02 UTC
Created attachment 473976 [details]
emerge --info

On my systems equery warns me that one file from systemd is missing:

# equery check systemd
!!! /usr/lib/environment.d/99-environment.conf does not exist
* Checking sys-apps/systemd-233-r1 ...
   1207 out of 1208 files passed

This happens even immediately after emerging systemd.
Comment 1 Mike Gilbert gentoo-dev 2017-05-23 21:21:14 UTC
Is it actually missing? Have you checked with tools other than equery (like ls)?

It should be a symlink to a file that may or may not exist in /etc.
Comment 2 Mike Gilbert gentoo-dev 2017-05-23 22:39:50 UTC
I can confirm this as a bug in equery check.

> floppym@naomi ~ % equery check sys-apps/systemd
> !!! /usr/lib/environment.d/99-environment.conf does not exist
> !!! /etc/systemd/logind.conf has incorrect MD5sum
> !!! /etc/systemd/system.conf has incorrect MD5sum
> * Checking sys-apps/systemd-9999 ...
>    1413 out of 1416 files passed
> 
> floppym@naomi ~ % ls -l /usr/lib/environment.d/99-environment.conf
> lrwxrwxrwx 1 root root 24 May 14 20:01 /usr/lib/environment.d/99-environment.conf -> ../../../etc/environment
> floppym@naomi ~ % ls -l /etc/environment
> ls: cannot access '/etc/environment': No such file or directory
Comment 3 Mike Gilbert gentoo-dev 2017-05-23 22:52:07 UTC
Created attachment 473992 [details, diff]
patch

This should fix it.
Comment 4 Francesco Turco 2017-05-24 09:16:42 UTC
On my system:

# file /usr/lib/environment.d/99-environment.conf /etc/environment
/usr/lib/environment.d/99-environment.conf: broken symbolic link to ../../../etc/environment
/etc/environment:                           cannot open `/etc/environment' (No such file or directory)

After applying your patch the problem disappears. Thanks!
Comment 5 Paul Varner (RETIRED) gentoo-dev 2017-05-25 13:00:55 UTC
(In reply to Mike Gilbert from comment #3)
> Created attachment 473992 [details, diff] [details, diff]
> patch
> 

Looks good to me, go ahead and push it.
Comment 6 Mike Gilbert gentoo-dev 2017-09-05 15:30:19 UTC
*** Bug 629948 has been marked as a duplicate of this bug. ***