Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 581594 - sys-apps/portage-9999: erroneous LIVEVCS.unmasked warnings from repoman
Summary: sys-apps/portage-9999: erroneous LIVEVCS.unmasked warnings from repoman
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: portage-2.3.0
  Show dependency tree
 
Reported: 2016-04-29 23:51 UTC by Coacher
Modified: 2017-03-16 00:06 UTC (History)
0 users

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


Attachments
emerge --info (info,6.30 KB, text/plain)
2016-04-29 23:51 UTC, Coacher
Details
Gzipped contents of xfce-base/garcon directory (garcon.tar.gz,1.20 KB, application/x-gzip)
2016-04-29 23:53 UTC, Coacher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Coacher 2016-04-29 23:51:14 UTC
Hello.

portage-9999 from master @ 75fbbcf.

I have xfce-base/garcon/garcon-0.4.0.ebuild in my overlay, which is not live, has no stable keywords and still repoman shows it under LIVEVCS.unmasked warning. Before repoman rewrite there were no warning re this ebuild.

The relevant files are attached below.

Please fix.

Reproducible: Always
Comment 1 Coacher 2016-04-29 23:51:38 UTC
Created attachment 432612 [details]
emerge --info
Comment 2 Coacher 2016-04-29 23:53:18 UTC
Created attachment 432614 [details]
Gzipped contents of xfce-base/garcon directory
Comment 3 Coacher 2016-04-30 00:15:24 UTC
It is reproducible even with a dummy ebuild that doesn't inherit any eclasses:

$ pwd
/home/coacher/Work/overlay/app-misc/bar

$ cat bar-0.1.ebuild
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=6

DESCRIPTION="Bar"
HOMEPAGE="http://example.com"
SRC_URI=""

LICENSE="HPND"
SLOT="0"
KEYWORDS="~amd64"
IUSE=""

DEPEND=""
RDEPEND="${DEPEND}"

$ repoman -x full
RepoMan scours the neighborhood...
  LIVEVCS.unmasked              1
   app-misc/bar/bar-0.1.ebuild
Comment 4 Brian Dolbec gentoo-dev 2016-04-30 01:04:16 UTC
As stated in irc, I haven't been able to re-produce this error.  Perhaps it is something from one of your other overlays triggering it.
Comment 5 Brian Dolbec gentoo-dev 2016-04-30 02:28:37 UTC
Found it.  When I moved the if statement than ran the live eclass checks to live eclass module check.  I inverted the logic (badly) to no-op and return without performing the check. I restored the original logic and instead split off the check to another function call.

Fixed in git: https://gitweb.gentoo.org/proj/portage.git/commit/?id=8e7971169c23a43696e020433a9f205abf98ee76
Comment 6 Coacher 2016-04-30 10:47:13 UTC
Hmm. It's true that I can no longer reproduce this problem with portage from master @ 9447288. However if I create live ebuild with 9999 in filename, inherit git-r3 in there and define non-empty KEYWORDS there, I have no LIVEVCS warnings. Even worse if I set all keywords to stable ones I don't get LIVEVCS.stable.

To me it looks like LIVEVCS warnings are broken in the opposite way now aka not shown when they should be.

See exmaples below.
Comment 7 Coacher 2016-04-30 10:49:55 UTC
$ pwd
/home/coacher/Work/overlay/dev-libs/uchardet

$ ls -1
metadata.xml
uchardet-9999.ebuild

$ cat uchardet-9999.ebuild
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=6

inherit cmake-utils git-r3

DESCRIPTION="An encoding detector library ported from Mozilla"
HOMEPAGE="https://github.com/BYVoid/uchardet"
EGIT_REPO_URI="git://github.com/BYVoid/${PN}.git"

LICENSE="MPL-1.1"
SLOT="0"
KEYWORDS="~amd64 ~arm ~hppa ~ppc64 ~x86"
IUSE="static-libs test"

src_prepare() {
        use test || cmake_comment_add_subdirectory test
        cmake-utils_src_prepare
}

src_configure() {
        local mycmakeargs=(
                -DBUILD_STATIC=$(usex static-libs)
        )
        cmake-utils_src_configure
}

$ repoman -x full
[...]
RepoMan sez: "If everyone were like you, I'd be out of business!"

$ ekeyword all uchardet-9999.ebuild

$ repoman -x full
[...]
RepoMan sez: "If everyone were like you, I'd be out of business!"
Comment 8 Coacher 2016-04-30 11:03:40 UTC
If I read the portage code right it's expected to skip LIVEVCS checks in any repo that's not named 'gentoo': https://github.com/gentoo/portage/blob/94472883f86338c8c877bfc3af57d4d6815915ed/pym/repoman/modules/scan/eclasses/live.py#L37

Why?
Comment 9 Coacher 2016-04-30 11:53:04 UTC
I've tried to reproduce this with git clone of the main Gentoo repo and the same ebuild from bug 581594#c7:

$ pwd
/home/coacher/Work/gentoo/repo/dev-libs/uchardet

$ git remote -v
origin  https://anongit.gentoo.org/git/repo/gentoo.git (fetch)
origin  https://anongit.gentoo.org/git/repo/gentoo.git (push)

$ cat ../../.git/refs/heads/master
1dd403ca0b3ce09ac43eec8ee7d11c167acc85f0

$ repoman -x full
RepoMan scours the neighborhood...
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.4/repoman", line 37, in <module>
    repoman_main(sys.argv[1:])
  File "/usr/lib64/python3.4/site-packages/repoman/main.py", line 117, in repoman_main
    scanner.scan_pkgs(can_force)
  File "/usr/lib64/python3.4/site-packages/repoman/scanner.py", line 356, in scan_pkgs
    self._scan_ebuilds(ebuildlist, dynamic_data)
  File "/usr/lib64/python3.4/site-packages/repoman/scanner.py", line 390, in _scan_ebuilds
    _continue = func(**self.set_func_kwargs(mod[0], dynamic_data))
  File "/usr/lib64/python3.4/site-packages/repoman/modules/scan/eclasses/live.py", line 38, in check
    return self.check_live(pkg, package, ebuild, y_ebuild)
TypeError: check_live() takes 4 positional arguments but 5 were given
Comment 10 Coacher 2016-04-30 12:00:38 UTC
(In reply to Coacher from comment #9)
> I've tried to reproduce this with git clone of the main Gentoo repo and the
> same ebuild from bug 581594#c7:
> 
> $ pwd
> /home/coacher/Work/gentoo/repo/dev-libs/uchardet
> 
> $ git remote -v
> origin  https://anongit.gentoo.org/git/repo/gentoo.git (fetch)
> origin  https://anongit.gentoo.org/git/repo/gentoo.git (push)
> 
> $ cat ../../.git/refs/heads/master
> 1dd403ca0b3ce09ac43eec8ee7d11c167acc85f0
> 
> $ repoman -x full
> RepoMan scours the neighborhood...
> Traceback (most recent call last):
>   File "/usr/lib/python-exec/python3.4/repoman", line 37, in <module>
>     repoman_main(sys.argv[1:])
>   File "/usr/lib64/python3.4/site-packages/repoman/main.py", line 117, in
> repoman_main
>     scanner.scan_pkgs(can_force)
>   File "/usr/lib64/python3.4/site-packages/repoman/scanner.py", line 356, in
> scan_pkgs
>     self._scan_ebuilds(ebuildlist, dynamic_data)
>   File "/usr/lib64/python3.4/site-packages/repoman/scanner.py", line 390, in
> _scan_ebuilds
>     _continue = func(**self.set_func_kwargs(mod[0], dynamic_data))
>   File
> "/usr/lib64/python3.4/site-packages/repoman/modules/scan/eclasses/live.py",
> line 38, in check
>     return self.check_live(pkg, package, ebuild, y_ebuild)
> TypeError: check_live() takes 4 positional arguments but 5 were given

This is because check_live definition misses self as the first argument: https://github.com/gentoo/portage/commit/8e7971169c23a43696e020433a9f205abf98ee76#diff-be0bfa46b77cb7c6f5da2eadedc6b160R41

After manually adding it I have:
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.4/repoman", line 37, in <module>
    repoman_main(sys.argv[1:])
  File "/usr/lib64/python3.4/site-packages/repoman/main.py", line 117, in repoman_main
    scanner.scan_pkgs(can_force)
  File "/usr/lib64/python3.4/site-packages/repoman/scanner.py", line 356, in scan_pkgs
    self._scan_ebuilds(ebuildlist, dynamic_data)
  File "/usr/lib64/python3.4/site-packages/repoman/scanner.py", line 390, in _scan_ebuilds
    _continue = func(**self.set_func_kwargs(mod[0], dynamic_data))
  File "/usr/lib64/python3.4/site-packages/repoman/modules/scan/eclasses/live.py", line 38, in check
    return self.check_live(pkg, package, ebuild, y_ebuild)
  File "/usr/lib64/python3.4/site-packages/repoman/modules/scan/eclasses/live.py", line 43, in check_live
    bad_stable_keywords = list(filter(is_stable, keywords))
NameError: name 'keywords' is not defined

Because keywords is now out of scope of check_live: https://github.com/gentoo/portage/commit/8e7971169c23a43696e020433a9f205abf98ee76#diff-be0bfa46b77cb7c6f5da2eadedc6b160R35

After moving it inside check_live I finally have:

RepoMan scours the neighborhood...
  LIVEVCS.unmasked              1
   dev-libs/uchardet/uchardet-9999.ebuild

This is the expected behaviour.
Comment 11 Coacher 2016-04-30 12:04:46 UTC
After ekeyword all uchardet-9999.ebuild I have:

RepoMan scours the neighborhood...
  LIVEVCS.stable                1
   dev-libs/uchardet/uchardet-9999.ebuild with stable keywords :['amd64', 'arm', 'hppa', 'ppc64', 'x86']

Again the expected baheviour. So LIVEVCS checks indeed are skipped when not in 'gentoo' repository.

Please note that space in LIVEVCS.stable warning is before colon, not after. ;)
Comment 12 Brian Dolbec gentoo-dev 2016-04-30 16:25:30 UTC
That's what I get for rushing yesterday.  I clearly was not up to the challenge, making several rooky mistakes like that, right down to misreading your irc note about the space around the colon...

I've pushed tested fixes for these mistakes:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=59014f2da612d09d0f969216e68cada91c19853d

https://gitweb.gentoo.org/proj/portage.git/commit/?id=a2ee8a9a3c25723f0501286adee8e42a4f323aca

This should be good now.
Comment 13 Coacher 2016-04-30 21:36:18 UTC
(In reply to Brian Dolbec from comment #12)
> That's what I get for rushing yesterday.  I clearly was not up to the
> challenge, making several rooky mistakes like that, right down to misreading
> your irc note about the space around the colon...
> 
> I've pushed tested fixes for these mistakes:
> 
> https://gitweb.gentoo.org/proj/portage.git/commit/
> ?id=59014f2da612d09d0f969216e68cada91c19853d
> 
> https://gitweb.gentoo.org/proj/portage.git/commit/
> ?id=a2ee8a9a3c25723f0501286adee8e42a4f323aca
> 
> This should be good now.

Yes, I can confirm that repoman no longer crashes and the message has proper spacing. Thank you very much!
Comment 14 Coacher 2016-05-01 13:36:37 UTC
(In reply to Coacher from comment #8)
> If I read the portage code right it's expected to skip LIVEVCS checks in any
> repo that's not named 'gentoo':
> https://github.com/gentoo/portage/blob/
> 94472883f86338c8c877bfc3af57d4d6815915ed/pym/repoman/modules/scan/eclasses/
> live.py#L37
> 
> Why?

As was discussed in #gentoo-portage IRC channel, this is because other repos may not have policies similar to Gentoo ones. There are plans to make these checks available for any repo when desired.
Comment 15 Coacher 2016-05-01 13:37:32 UTC
Brian, thank you very much for all your help and answers to my questions!
Comment 16 Brian Dolbec gentoo-dev 2017-03-16 00:06:27 UTC
Released in portage-2.3.0