Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 591820 - "cave" throws alerts about QA violations in package.mask
Summary: "cave" throws alerts about QA violations in package.mask
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Profiles (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Pacho Ramos
URL:
Whiteboard:
Keywords:
: 591846 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-08-21 17:23 UTC by Georgi Georgiev
Modified: 2016-08-22 10:37 UTC (History)
3 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 Georgi Georgiev 2016-08-21 17:23:12 UTC
Paludis user here. With the current tree, I get the following warnings on almost any paludis command trying to read the Gentoo repo.

    cave@1471799044: [QA e.mask.malformed] (same context) Line 'net-wireless/portapack-firmware #591114' in '/var/db/paludis/repositories/gentoo/profiles/package.mask' contains tokens after the spec; ignoring
    cave@1471799044: [QA e.mask.malformed] (same context) Line 'app-arch/threadzip #591118' in '/var/db/paludis/repositories/gentoo/profiles/package.mask' contains tokens after the spec; ignoring
    cave@1471799044: [QA e.mask.malformed] (same context) Line 'media-video/pgcedit # 591122' in '/var/db/paludis/repositories/gentoo/profiles/package.mask' contains multiple tokens; ignoring
    cave@1471799044: [QA e.mask.malformed] (same context) Line 'dev-python/remoteobjects #591124' in '/var/db/paludis/repositories/gentoo/profiles/package.mask' contains tokens after the spec; ignoring
    cave@1471799044: [QA e.mask.malformed] (same context) Line 'net-dns/hesinfo #591126' in '/var/db/paludis/repositories/gentoo/profiles/package.mask' contains tokens after the spec; ignoring
    cave@1471799044: [QA e.mask.malformed] (same context) Line 'app-text/lodgeit #591466' in '/var/db/paludis/repositories/gentoo/profiles/package.mask' contains tokens after the spec; ignoring
    cave@1471799044: [QA e.mask.malformed] (same context) Line 'dev-util/metro #591470' in '/var/db/paludis/repositories/gentoo/profiles/package.mask' contains tokens after the spec; ignoring

This seems to be introduced by the most recent commit to that file:
https://gitweb.gentoo.org/repo/gentoo.git/commit/profiles/package.mask?id=3a30ebdc0a01c42142ce36e690b405c687eae157

I checked the PMS, it doesn't say anything about allowing anything but a package spec on the line, and it does say that a package manager must warn on "non-compliant input" and that's what I guess was done here.

...

5.2.8 package.mask

package.mask is used to prevent packages from being installed on a given profile. Each line contains one package dependency specification; anything matching this specification will not be installed unless unmasked by the user’s configuration.

...

8.2.6 Package Dependency Specifications

A package dependency can be in one of the following base formats. A package manager must warn or error on non-compliant input.

A simple category/package name.
An operator, as described in section 8.2.6.1, followed immediately by category/package, followed by a hyphen, followed by a version specification.
In EAPIs shown in table 8.4 as supporting SLOT dependencies, either of the above formats may additionally be suffixed by a :slot restriction, as described in section 8.2.6.3. A package manager must warn or error if slot dependencies are used with an EAPI not supporting SLOT dependencies.
Comment 1 Pacho Ramos gentoo-dev 2016-08-22 09:13:08 UTC
Why it doesn't treat the comments as comments? 
[master 71bc44e] package.mask: prevent cave warnings (#591820)
 1 file changed, 34 insertions(+), 17 deletions(-)
Comment 2 Ulrich Müller gentoo-dev 2016-08-22 09:53:03 UTC
(In reply to Pacho Ramos from comment #1)
> Why it doesn't treat the comments as comments?

Comment syntax is defined in section 5.2.5 "Simple line-based files":
https://projects.gentoo.org/pms/6/pms.html#x1-510005.2.5

| These files are a simple one-item-per-line list, which is inherited
| in the following manner: the parent profile’s list is taken, and the
| current profile’s list appended. If any line begins with a hyphen, then
| any lines previous to it whose contents are equal to the remainder of
| that line are removed from the list. Once again, blank lines and those
| beginning with a # are discarded.

That is, comments can only start with a # at the beginning of the line.
Comment 3 Alex Legler (RETIRED) archtester gentoo-dev Security 2016-08-22 10:06:02 UTC
*** Bug 591846 has been marked as a duplicate of this bug. ***
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2016-08-22 10:07:47 UTC
(In reply to Pacho Ramos from comment #1)
> Why it doesn't treat the comments as comments? 

Because it's not a bash script.
Comment 5 Pacho Ramos gentoo-dev 2016-08-22 10:37:54 UTC
(In reply to Ulrich Müller from comment #2)
> (In reply to Pacho Ramos from comment #1)
> > Why it doesn't treat the comments as comments?
> 
> Comment syntax is defined in section 5.2.5 "Simple line-based files":
> https://projects.gentoo.org/pms/6/pms.html#x1-510005.2.5
> 
> | These files are a simple one-item-per-line list, which is inherited
> | in the following manner: the parent profile’s list is taken, and the
> | current profile’s list appended. If any line begins with a hyphen, then
> | any lines previous to it whose contents are equal to the remainder of
> | that line are removed from the list. Once again, blank lines and those
> | beginning with a # are discarded.
> 
> That is, comments can only start with a # at the beginning of the line.

Thanks Ulrich for the explanation