Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 697094 - app-portage/portage-utils-0.80 incorrect matching of "qfile /usr/lib"
Summary: app-portage/portage-utils-0.80 incorrect matching of "qfile /usr/lib"
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Fabian Groffen
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-09 17:52 UTC by Ben Kohler
Modified: 2019-10-20 10:25 UTC (History)
1 user (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 Ben Kohler gentoo-dev 2019-10-09 17:52:13 UTC
For some reason, "qfile /usr/lib" (I want to see what packages are installing to /usr/lib) is also returning packages which install to simply /lib.  It seems to behave correctly after adding a trailing slash.

$ qfile /usr/lib | tail
sys-libs/talloc: /usr/lib
sys-libs/tdb: /usr/lib
sys-libs/tevent: /usr/lib
sys-power/acpid: /lib
sys-power/cpupower: /lib
sys-process/cronie: /lib
sys-process/iotop: /usr/lib
www-client/pybugz: /usr/lib
www-servers/lighttpd: /usr/lib
www-servers/lighttpd: /lib
$ qfile /usr/lib/ | tail
sys-devel/gcc: /usr/lib
sys-fs/lvm2: /usr/lib
sys-kernel/dracut: /usr/lib
sys-libs/glibc: /usr/lib
sys-libs/talloc: /usr/lib
sys-libs/tdb: /usr/lib
sys-libs/tevent: /usr/lib
sys-process/iotop: /usr/lib
www-client/pybugz: /usr/lib
www-servers/lighttpd: /usr/lib
$
Comment 1 Fabian Groffen gentoo-dev 2019-10-10 05:42:54 UTC
Ok, I can see that's confusing :)  One question, is your /usr/lib symlinked (src or target) to /lib or are they distinct directories?
Comment 2 Ben Kohler gentoo-dev 2019-10-10 13:46:07 UTC
$ file /usr/lib /lib
/usr/lib: directory
/lib:     directory
$ ls -ld /usr/lib /lib
drwxr-xr-x 10 root root 4096 Sep 23 10:48 /lib
drwxr-xr-x 38 root root 4096 Sep 25 13:47 /usr/lib
$

Are you not able to reproduce this locally?
Comment 3 Fabian Groffen gentoo-dev 2019-10-12 11:42:28 UTC
think I found the problem
Comment 4 Larry the Git Cow gentoo-dev 2019-10-12 12:47:47 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=b9eca954b9f0518916f390039b43eff46f0ee67e

commit b9eca954b9f0518916f390039b43eff46f0ee67e
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2019-10-12 12:43:19 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2019-10-12 12:43:19 +0000

    qfile: fix matching of full paths, bug #697094
    
    - properly handle trailing slashes, this is necessary because we use a
      custom basename that doesn't strip it
    - fix bug in creating realpath of dirname, resulting in one path
      component short
    - cleanup some match conditions
    
    Bug: https://bugs.gentoo.org/697094
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>

 qfile.c | 72 ++++++++++++++++++++++++++++++++---------------------------------
 1 file changed, 36 insertions(+), 36 deletions(-)
Comment 5 Larry the Git Cow gentoo-dev 2019-10-20 10:25:52 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b04f542749e2fb95c627364bf58b075c164c4f6

commit 0b04f542749e2fb95c627364bf58b075c164c4f6
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2019-10-20 10:25:14 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2019-10-20 10:25:38 +0000

    app-portage/portage-utils: version bump to v0.81
    
    - 697094: qfile incorrectly matching /usr/lib
    - 697068: qlop -r not showing ongoing merges from parallel merges
    - 696078: qgrep not matching revisioned ebuilds
    - 695586: qpkg double frees and incorrect unpacking
    - 694972: qlop -r/-a speedups
    - 692224: qlop support for alternate ROOT
    - 677982: qfile report matches from prune lib registry
    
    Closes: https://bugs.gentoo.org/697094
    Closes: https://bugs.gentoo.org/697068
    Closes: https://bugs.gentoo.org/696078
    Closes: https://bugs.gentoo.org/695586
    Closes: https://bugs.gentoo.org/694972
    Closes: https://bugs.gentoo.org/692224
    Closes: https://bugs.gentoo.org/677982
    Package-Manager: Portage-2.3.76, Repoman-2.3.16
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>

 app-portage/portage-utils/Manifest                 |  1 +
 .../portage-utils/portage-utils-0.81.ebuild        | 87 ++++++++++++++++++++++
 2 files changed, 88 insertions(+)