Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 699376 - app-portage/portage-utils-0.80/0.81 INSTALL_MASK exclusions broken in qmerge
Summary: app-portage/portage-utils-0.80/0.81 INSTALL_MASK exclusions broken in qmerge
Status: RESOLVED NEEDINFO
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Fabian Groffen
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-05 15:43 UTC by Joakim Tjernlund
Modified: 2020-04-25 17:30 UTC (History)
0 users

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 Joakim Tjernlund 2019-11-05 15:43:09 UTC
for glibc:
INSTALL_MASK=/usr/share/i18n/charmaps
qmerge report /usr/share/i18n/charmaps as INSTALL_MASK

INSTALL_MASK=/usr/share/i18n/charmaps -/usr/share/i18n/charmaps/UTF-8.gz
This cancels out both, no INSTALL_MASK is reported by qmerge

INSTALL_MASK=-/usr/share/i18n/charmaps/UTF-8.gz /usr/share/i18n/charmaps
qmerge reports only /usr/share/i18n/charmaps as INSTALL_MASK

The INSTALL_MASK code is a bit complicated for me to make sense of so
any ideas appreciated
Comment 1 Fabian Groffen gentoo-dev 2019-12-28 09:52:58 UTC
I remember negations can only be applied after the mask it works on is known, so the 3rd case is correct.  1st case too, the 2nd is unexpected, because this was the testing case of that code.
Comment 2 Joakim Tjernlund 2020-01-02 16:06:00 UTC
Not sure case 2 is invalid see:
https://archives.gentoo.org/gentoo-portage-dev/message/7c6e5ec23d9af9ee1f19dd322f2c2e53 :

That won't work since exclusive and inclusive patterns can be stacked, and for this to work they are applied in order.

E.g. /usr/foo -/usr/foo/bar /usr/foo/bar/baz

Should remove all foo subdirectories except for bar, and also baz inside bar.
Comment 3 Fabian Groffen gentoo-dev 2020-01-03 10:37:49 UTC
case 2 is valid, and it's wrong that the entire mask is cancelled.
Comment 4 Fabian Groffen gentoo-dev 2020-01-03 10:40:20 UTC
did you by chance compile the code using -DEBUG=1?  This should make install_mask_pwd output a blurb with computed state.
Comment 5 Fabian Groffen gentoo-dev 2020-01-03 10:50:59 UTC
Ok, I can reproduce, this is messed up, I'm sure it worked (but I guess I should've added a test...)
Comment 6 Larry the Git Cow gentoo-dev 2020-01-03 11:27:48 UTC
The bug has been referenced in the following commit(s):

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

commit 61fdfd4d8cc40da77455c6f8b36a3ec36aa5b146
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2020-01-03 11:26:49 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2020-01-03 11:26:49 +0000

    tests/qmerge: add case for INSTALL_MASK
    
    This tests INSTALL_MASK on a simple and a inversed path, with one level
    difference.
    
    Bug: https://bugs.gentoo.org/699376
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>

 tests/qmerge/dotest | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
Comment 7 Fabian Groffen gentoo-dev 2020-01-03 11:28:25 UTC
I have a feeling the multi-level thing is the problem.
Comment 8 Larry the Git Cow gentoo-dev 2020-01-03 12:39:53 UTC
The bug has been referenced in the following commit(s):

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

commit fbf7ee544f0efeb6f5a8254f6a994d1daa5a4573
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2020-01-03 12:39:02 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2020-01-03 12:39:02 +0000

    tests/qmerge: add 2-level negation INSTALL_MASK test
    
    Bug: https://bugs.gentoo.org/699376
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>

 TODO.md                                              |   3 +++
 qmerge.c                                             |   8 ++++----
 tests/qmerge/dotest                                  |  15 ++++++++++++++-
 tests/qmerge/packages/Packages                       |   6 +++---
 tests/qmerge/packages/sys-devel/qmerge-test-1.3.tbz2 | Bin 7264 -> 7289 bytes
 5 files changed, 24 insertions(+), 8 deletions(-)
Comment 9 Larry the Git Cow gentoo-dev 2020-01-03 12:45:05 UTC
The bug has been referenced in the following commit(s):

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

commit 4d6b231cf0973e1d3b869d98a0e263155f04b20c
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2020-01-03 12:43:49 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2020-01-03 12:43:49 +0000

    tests/qmerge: test masking an intermediate level in INSTALL_MASK
    
    this tests the case from the archives:
      /usr/foo -/usr/foo/bar /usr/foo/bar/baz
    
    Bug: https://bugs.gentoo.org/699376
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>

 tests/qmerge/dotest | 12 ++++++++++++
 1 file changed, 12 insertions(+)
Comment 10 Fabian Groffen gentoo-dev 2020-01-03 12:46:08 UTC
all tests seem conclusive (that it works)

Need to narrow down a case that is wrong.
Comment 11 Fabian Groffen gentoo-dev 2020-01-12 13:03:37 UTC
Can we get an error scenario for 0.84?  I've added some tests which don't seem to indicate any problem for the scenario's you've listed.