Summary: | sys-apps/portage-9999: erroneous LIVEVCS.unmasked warnings from repoman | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Coacher <itumaykin+gentoo> |
Component: | Core | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | InVCS |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 573774 | ||
Attachments: |
emerge --info
Gzipped contents of xfce-base/garcon directory |
Description
Coacher
2016-04-29 23:51:14 UTC
Created attachment 432612 [details]
emerge --info
Created attachment 432614 [details]
Gzipped contents of xfce-base/garcon directory
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 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. 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 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. $ 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!" 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? 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 (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. 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. ;) 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. (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! (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. Brian, thank you very much for all your help and answers to my questions! Released in portage-2.3.0 |