Re: [gentoo-dev] Re: News Item v2: Portage rsync tree verification unstable

2018-03-11 Thread M. J. Everitt
On 12/03/18 04:53, Duncan wrote:
> Zac Medico posted on Sun, 11 Mar 2018 19:57:31 -0700 as excerpted:
>
>> I really don't want to spend a lot of time making revisions, and I think
>> "unstable" communicates well enough in this case.
> Very well then.  With robbat2's already accepted first paragraph changes 
> it's acceptable as-is.
>
> Thanks.  You put an awful lot of work into portage, and I'm sure I'm not 
> the only one who's thankful there's a steady hand at the portage wheel, 
> even if it doesn't always come thru.  Your efforts certainly make the 
> gentoo experience a better one! =:^)
>
+1 to that .. particularly through choppy waters lately .. keep up the
good work!



signature.asc
Description: OpenPGP digital signature


[gentoo-dev] Re: News Item v2: Portage rsync tree verification unstable

2018-03-11 Thread Duncan
Zac Medico posted on Sun, 11 Mar 2018 19:57:31 -0700 as excerpted:

> I really don't want to spend a lot of time making revisions, and I think
> "unstable" communicates well enough in this case.

Very well then.  With robbat2's already accepted first paragraph changes 
it's acceptable as-is.

Thanks.  You put an awful lot of work into portage, and I'm sure I'm not 
the only one who's thankful there's a steady hand at the portage wheel, 
even if it doesn't always come thru.  Your efforts certainly make the 
gentoo experience a better one! =:^)

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman




[gentoo-dev] Re: How to deal with git sources?

2018-03-11 Thread Duncan
Mike Auty posted on Sun, 11 Mar 2018 19:19:00 + as excerpted:

> tldr; Github will tarball up specific commits (or master) for you to add
> to SRC_URI.
> 
> I ended up using the github API to pull down a tarball of the git repo,
> rather than using git to pull it down.  I suppose that offers the
> ability to Manifest it and check for changes, but I now have to encode
> the fixed commit into every version of the ebuild because the only
> location it's recorded is in the submodule commit hash of the package's
> repo.

Please check...

If I'm recalling correctly a warning posted on this list, repeated calls 
to the github tarballing API for the same commit will result in delivery 
of tarballs with differing checksums.  How/why wasn't explained as I 
recall, possibly part of the reason I'm not sure I'm recalling things 
correctly as that would have internally flagged it as unreliable/needing-
verification, but that was the warning as I remember it.

If it's correct, you can pull the tarball from github to store on devspace 
and link it as the checksummed tarball, as that's static and won't 
change, but you can't link the github tarballing API directly, as that 
/will/ change and thus will fail sources checksum verification at least 
some of the time.

But (assuming avoiding linking devspace is worth the trouble in the first 
place if possible) either verify it yourself or wait for verification/
negation from others, as I'm not entirely sure I'm recalling that warning 
post correctly.  It might have been for other than github, or I might 
have misunderstood, or maybe they've fixed that problem by now, or...

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman




Re: [gentoo-dev] Re: News Item v2: Portage rsync tree verification unstable

2018-03-11 Thread Zac Medico
On 03/10/2018 05:38 PM, Duncan wrote:
> Zac Medico posted on Sat, 10 Mar 2018 15:16:29 -0800 as excerpted:
> 
>> Changes:
>>   * First paragraph rewritten by Robin Johnson 
>>   * Fixes spelling of 'following' reported by Michael Everitt
>>
>>
>> Title: Portage rsync tree verification unstable
>> Author: Zac Medico 
>> Posted: 2018-03-13
>> Revision: 1
>> News-Item-Format: 2.0
>> Display-If-Installed: sys-apps/portage
>>
>> Portage rsync tree verification is being temporarily turned off by
>> default, starting with sys-apps/portage-2.3.24. This permits
>> stabilization of sys-apps/portage-2.3.24 while still working on bugs
>> relating to tree verification [1]: deadlocks [2] & key fetching [3].
> 
>> [...]
> 
> With robbat2's first paragraph rewrite the effect isn't quite as bad
> as that of the first draft, but the title still refers to "unstable",
> which in addition to the intended package-stability meaning, has a
> number of more severe and thus unnecessarily alarming meanings not
> intended here.
> 
> FWIW, being security minded and knowing verification related to
> security, my own first thought was an app instability due to a
> potentially exploitable buffer-overflow... in code dealing with
> verification and thus potentially remotely triggerable during
> verification itself, definitely more alarming than intended!
> 
> Thankfully robbat2's rewrite clarifies in the body now, but
> I still think the title remains overly alarming.
> 
> Maybe "... remains unstable" or "not yet stable", as in:

Well, "unstable" sounds alarming when used to describe a person's
emotional state, but it then context of software I think it's less
alarming. I've found some discussion here:

https://english.stackexchange.com/questions/8351/what-s-the-etymology-of-the-word-unstable-in-the-context-of-software

> Title: Portage rsync tree verification not yet stable
> 
> Or better, refer to the FEATURE flag "rsync-verify" in the title,
> so it's clear it's not a portage/emerge-executable instability,
> and clarify that it's the stable keyword, something like this
> (but might be too long, do those news item short title limits
> still apply?):
> 
> Title: Portage rsync-verify feature not yet stable-keyworded
> 
> Perhaps omit the -keyworded if that's too long:
> 
> Title: Portage rsync-verify feature not yet stable
> 
> Feel free to revise further...

I really don't want to spend a lot of time making revisions, and I think
"unstable" communicates well enough in this case.
-- 
Thanks,
Zac



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-dev] News Item v2: Portage rsync tree verification unstable

2018-03-11 Thread Zac Medico
On 03/11/2018 12:39 AM, Michał Górny wrote:
> W dniu sob, 10.03.2018 o godzinie 15∶16 -0800, użytkownik Zac Medico
> napisał:
>> Changes:
>>   * First paragraph rewritten by Robin Johnson 
>>   * Fixes spelling of 'following' reported by Michael Everitt
>>
>>
>> Title: Portage rsync tree verification unstable
>> Author: Zac Medico 
>> Posted: 2018-03-13
>> Revision: 1
>> News-Item-Format: 2.0
>> Display-If-Installed: sys-apps/portage
>>
>> Portage rsync tree verification is being temporarily turned off by
>> default, starting with sys-apps/portage-2.3.24. This permits
>> stabilization of sys-apps/portage-2.3.24 while still working on bugs
>> relating to tree verification [1]: deadlocks [2] & key fetching [3].
>>
>> If users wish to enable the 'rsync-verify' USE flag for sys-apps/portage,
>> they need to follow these steps:
>>
>> 1) In order to unmask the 'rsync-verify' USE flag, create a file named
>> /etc/portage/profile/package.use.mask containing a line like the
>> following:
>>
>> sys-apps/portage -rsync-verify
>>
>> 2) Once the 'rsync-verify' USE flag has been unmasked as described
>> in step 1, it can be enabled with a line like the following in
>> /etc/portage/package.use:
>>
>> sys-apps/portage rsync-verify
>>
>> 3) After the configuration changes in steps 1 and 2 have been made, run
>> the following command:
>>
>> emerge --oneshot --newuse '>=sys-apps/portage-2.3.24'
>>
> 
> Not sure if it's for better or worse but I suppose some users would find
> it easier if you provided a copy-paste snippet instead of or in addition
> to detailed instructions, e.g.:
> 
> echo sys-apps/portage -rsync-verify >> /etc/portage/profile/package.use.mask
> echo sys-apps/portage rsync-verify >> /etc/portage/package.use
> emerge -1v
> sys-apps/portage

That's tempting, but I like my version better, and I'd prefer not to
include the shell version in addition since it's redundant and it give
people something more to nitpick.
-- 
Thanks,
Zac



signature.asc
Description: OpenPGP digital signature


[gentoo-dev] Automated Package Removal and Addition Tracker, for the week ending 2018-03-11 23:59 UTC

2018-03-11 Thread Robin H. Johnson
The attached list notes all of the packages that were added or removed
from the tree, for the week ending 2018-03-11 23:59 UTC.

Removals:
app-admin/aws-as-tools20180311-11:02 pacho  b522124233e
app-admin/aws-cw-tools20180311-11:02 pacho  b522124233e
app-admin/aws-iam-tools   20180311-11:02 pacho  b522124233e
app-admin/aws-rds-tools   20180311-11:02 pacho  b522124233e
app-admin/jinit   20180311-11:02 pacho  b522124233e
app-admin/procinfo20180311-11:02 pacho  b522124233e
app-forensics/autopsy 20180311-11:02 pacho  b522124233e
app-misc/activylircd  20180311-11:02 pacho  b522124233e
app-misc/misterhouse  20180311-11:02 pacho  b522124233e
app-misc/specto   20180311-11:02 pacho  b522124233e
app-office/hamster-time-tracker   20180311-11:02 pacho  b522124233e
app-vim/pam-syntax20180311-11:02 pacho  b522124233e
dev-db/lib_mysqludf_fPROJ420180311-11:02 pacho  b522124233e
dev-db/lib_mysqludf_json  20180311-11:02 pacho  b522124233e
dev-db/lib_mysqludf_preg  20180311-11:02 pacho  b522124233e
dev-db/lib_mysqludf_stat  20180311-11:02 pacho  b522124233e
dev-db/lib_mysqludf_str   20180311-11:02 pacho  b522124233e
dev-db/lib_mysqludf_sys   20180311-11:02 pacho  b522124233e
dev-db/lib_mysqludf_ta20180311-11:02 pacho  b522124233e
dev-db/lib_mysqludf_udf   20180311-11:02 pacho  b522124233e
dev-lang/fsharp   20180311-11:02 pacho  b522124233e
dev-libs/dclog20180311-11:02 pacho  b522124233e
dev-libs/libFuzzer20180311-11:02 pacho  b522124233e
games-arcade/bloboats 20180311-11:02 pacho  b522124233e
games-emulation/xe20180311-11:02 pacho  b522124233e
media-plugins/vdr-alcd20180311-11:02 pacho  b522124233e
media-sound/lastfmplayer  20180311-00:36 kensington 56c3b6294bd
media-sound/nted  20180311-11:02 pacho  b522124233e
net-irc/ultimate  20180311-11:02 pacho  b522124233e
net-misc/asterisk-rate_engine 20180311-11:02 pacho  b522124233e
net-misc/bti  20180311-11:02 pacho  b522124233e
net-misc/slimrat  20180311-11:02 pacho  b522124233e
net-nds/ypbind20180311-11:02 pacho  b522124233e
net-nds/ypserv20180311-11:02 pacho  b522124233e
net-news/newsbeuter   20180311-11:02 pacho  b522124233e
net-print/xerox-drivers   20180311-11:02 pacho  b522124233e
net-vpn/htun  20180311-11:02 pacho  b522124233e
sci-chemistry/platon  20180311-11:02 pacho  b522124233e
sys-apps/qdiskusage   20180306-00:10 asturm 76209996a18
sys-apps/raidutils20180311-11:02 pacho  b522124233e
sys-fs/ocfs2-tools20180311-11:02 pacho  b522124233e
sys-power/phctool 20180311-11:02 pacho  b522124233e
x11-libs/libXCalibrate20180311-06:12 mattst88   e65a83b672c
x11-libs/libXfontcache20180311-06:13 mattst88   a91493433e5
x11-misc/xtscal   20180311-06:13 mattst88   0c608ed3294
x11-plugins/thinkhdaps20180311-11:02 pacho  b522124233e
x11-proto/fontcacheproto  20180311-06:14 mattst88   ccf289a0ee4
x11-proto/xcalibrateproto 20180311-06:14 mattst88   a86daf7b818
x11-proto/xf86rushproto   20180311-06:14 mattst88   5bd3eeaa5d3

Additions:
app-admin/bind_exporter   20180309-21:38 mrueg  5a7c743ecf0
app-admin/nginx-vts-exporter  20180309-21:44 mrueg  1da6bec809b
app-crypt/libnitrokey 20180311-10:40 soap   2a697673049
dev-embedded/arduino-builder  20180212-20:23 amynka 6f7c8853423
dev-embedded/arduino-ctags20180212-20:14 amynka bfad65bf874
dev-embedded/arduino-listserialportsc 20180212-20:27 amynka 61cff161fa9
dev-go/goversion  20180309-13:34 mrueg  cc247f17651
dev-libs/cppcodec 20180311-10:40 soap   1e3bbc4851a
dev-libs/xxhash   20180307-13:07 amadio 5344a12960e
dev-perl/Devel-GlobalPhase20180306-05:37 kentnl 09f1c0d78b4
dev-php/geos-php  20180306-20:32 grknight   ff87051bd90
dev-util/kdstatemachineeditor 20180306-14:59 asturm c60bba9bb7a
media-sound/deinvert  20180305-19:08 zerochaos  3165f776ae2
net-analyzer/prometheus-pushgateway   20180309-21:33 zmedico9cdd342bf4a
net-misc/ethertypes   20180307-17:38

Re: [gentoo-dev] Integrating Portage with other package managers

2018-03-11 Thread Benda Xu
Hi anoteros,

anote...@teknik.io writes:

> Having used Gentoo for a few years now, one thing that has been
> annoying to me is the tremendous duplication of effort and uphill
> battle of creating ebuilds (build recipes) for language-specific
> packages that already have their own build systems.
>
> For example, many languages such as Python (pip), Node (npm), Ruby
> (gems), TeXLive (tlmgr), Haskell (cabal), Rust (cargo) have ways of
> redistributing up-to-date dependencies and ensuring that they build
> properly in most environments. Portage, it seems, does not take
> advantage of this at all. If I want to install the package 'foo',
> which has 'bar' as a dependency (which has been installed through
> cabal, for instance). Why should portage download some outdated second
> copy of the sources for 'bar', rebuild it, and scatter it around the
> file system where it cannot be used by other programs installed by
> cabal?

There have been quite a lot of effort before.  What I know are:

* R_Overlay

R_Overlay uses roverlay[1] to generate ebuilds from CRAN and BIOC.  It
works for 90% of the packages, and has a dozen of users.

The biggest burden of maintenance is parsing random strings upstream
would put in the dependency fields (e.g. [6]).


* Maven Overlay

It is based on java-ebuilder[2] to generate ebuilds from Java Maven
repository.  The proof of concept overlay works well for Apache
spark[3].

A bit of scripting resolved the incompatibility of version schemes
mentioned by kentnl[5].

I am proposing a GSOC idea to mentor a student on it,

  
https://wiki.gentoo.org/wiki/Google_Summer_of_Code/2018/Ideas/Maven_Java_overlay

* g-sorcery

A general purpose ebuild generator in Gentoo (app-portage/g-sorcery)[4],
I have been using it for pip (app-portage/gs-pypi) and elpa
(app-portage/gs-elpa).  It works but a bit out-of-date.  Help welcome.


>From my experiences with the ebuild generators, they can be made very
reliable and painless. 

By far IMHO the R Overlay is the most successful.  The overlay is
generated on a server exposed into layman list.  The generation process
needs to be maintained and can have bugs when the upstream evolves.  It
can be a pain for an average user to debug.

Therefore, Gentoo semi-offical automatic overlays from language-specific
repositories provides a promising potential solution.

Yours,
Benda

1. https://github.com/dywisor, developed by dywisor as a GSOC project
   with calchan.

2. https://github.com/gentoo/java-ebuilder, lead by fordfrog of the Java
   Project.

3. https://github.com/heroxbd/maven-overlay

4. developed by jauhien as a GSOC project.

5. 
https://archives.gentoo.org/gentoo-dev/message/487f5eb7b2d1ba00ae607b3f88bbb8c9

6. 
https://github.com/dywisor/roverlay/blob/master/config/simple-deprules.d/dev-libs



Re: [gentoo-dev] Functional portage with namespace

2018-03-11 Thread Benda Xu
Hi Xdej,

X dej  writes:

> If you want to have reproducible binaries, you may also want to alter
> the clock of the sandbox system.

Ha, indeed many packages hardwrites "date of build" alike.  That is a
hard question to define reproducibility.  I would rather ignore the
timestamps when comparing two binaries.

Benda



Re: [gentoo-dev] How to deal with git sources?

2018-03-11 Thread Mike Auty
So,

tldr; Github will tarball up specific commits (or master) for you to add
to SRC_URI.

I ended up using the github API to pull down a tarball of the git repo,
rather than using git to pull it down.  I suppose that offers the
ability to Manifest it and check for changes, but I now have to encode
the fixed commit into every version of the ebuild because the only
location it's recorded is in the submodule commit hash of the package's
repo.

I could have it live in the PV, but I think that'd lead to potential
version sorting errors if people try and use copies of the ebuild.
Making typeshed its own package doesn't help because it's installed
under /usr/share/mypy/typeshed, not /usr/share/typeshed so it really is
part of mypy (for now).  So I'll see how this goes and listen for
feedback...

Mike  5:)

On 11/03/18 18:05, Mike Auty wrote:
> Hiya,
> 
> I'm trying to update/package up mypy for the main tree which, whilst it
> provides a release tarball, relies upon a data library (typeshed) which
> does not provide releases.  The recommended method of installation by
> upstream is to use git submodules (which the ebuild will do happily),
> but repoman rightly complains about LIVEVCS issues.
> 
> Is the current recommended method for dealing with this to manually
> create a tarball and stash it on dev.gentoo.org somewhere accessible or
> are there updated guidelines for this kind of scenario?  If so, where
> would they be documented?  Searching for LIVECVS found a bunch of
> repoman change discussions, but no documentation as to how to deal with
> ebuilds that require this...
> 
> Mike  5:)
> 




signature.asc
Description: OpenPGP digital signature


[gentoo-dev] How to deal with git sources?

2018-03-11 Thread Mike Auty
Hiya,

I'm trying to update/package up mypy for the main tree which, whilst it
provides a release tarball, relies upon a data library (typeshed) which
does not provide releases.  The recommended method of installation by
upstream is to use git submodules (which the ebuild will do happily),
but repoman rightly complains about LIVEVCS issues.

Is the current recommended method for dealing with this to manually
create a tarball and stash it on dev.gentoo.org somewhere accessible or
are there updated guidelines for this kind of scenario?  If so, where
would they be documented?  Searching for LIVECVS found a bunch of
repoman change discussions, but no documentation as to how to deal with
ebuilds that require this...

Mike  5:)



signature.asc
Description: OpenPGP digital signature


[gentoo-portage-dev] [PATCH 2/2] Remove support for PROVIDE virtuals

2018-03-11 Thread Michał Górny
Remove the support for PROVIDE metadata. The aux entry that used to
be assigned to this variable is now reused in the PMS, so we finally
need to clean up.
---
 bin/ebuild.sh  |  2 +-
 bin/phase-functions.sh |  2 +-
 man/ebuild.5   | 10 -
 pym/_emerge/Package.py | 27 ++--
 pym/portage/__init__.py|  2 +-
 pym/portage/_sets/base.py  | 17 +---
 pym/portage/cache/metadata.py  |  4 +-
 pym/portage/dbapi/__init__.py  |  4 +-
 pym/portage/dbapi/bintree.py   |  9 ++--
 pym/portage/dbapi/dep_expand.py|  2 +-
 pym/portage/dbapi/porttree.py  |  4 +-
 pym/portage/dbapi/vartree.py   | 38 ++--
 pym/portage/dep/__init__.py| 20 +
 pym/portage/emaint/modules/move/move.py|  4 +-
 pym/portage/package/ebuild/_config/MaskManager.py  | 10 ++---
 .../package/ebuild/_config/special_env_vars.py |  4 +-
 pym/portage/package/ebuild/config.py   | 43 +++---
 pym/portage/package/ebuild/doebuild.py |  2 +-
 pym/portage/repository/config.py   |  5 +--
 .../tests/resolver/test_virtual_transition.py  | 51 --
 repoman/man/repoman.1  |  7 ---
 .../repoman/modules/scan/depend/_depend_checks.py  |  2 +-
 .../modules/scan/metadata/ebuild_metadata.py   |  8 +---
 repoman/pym/repoman/qa_data.py |  2 -
 repoman/pym/repoman/repos.py   |  3 --
 25 files changed, 43 insertions(+), 239 deletions(-)
 delete mode 100644 pym/portage/tests/resolver/test_virtual_transition.py

diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 67d255f78..9995a2f99 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -728,7 +728,7 @@ if [[ $EBUILD_PHASE = depend ]] ; then
fi
 
auxdbkeys="DEPEND RDEPEND SLOT SRC_URI RESTRICT HOMEPAGE LICENSE
-   DESCRIPTION KEYWORDS INHERITED IUSE REQUIRED_USE PDEPEND 
PROVIDE EAPI
+   DESCRIPTION KEYWORDS INHERITED IUSE REQUIRED_USE PDEPEND 
UNUSED_05 EAPI
PROPERTIES DEFINED_PHASES HDEPEND UNUSED_04
UNUSED_03 UNUSED_02 UNUSED_01"
 
diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh
index 017dc132b..0ceddb451 100644
--- a/bin/phase-functions.sh
+++ b/bin/phase-functions.sh
@@ -9,7 +9,7 @@
 
 PORTAGE_READONLY_METADATA="DEFINED_PHASES DEPEND DESCRIPTION
EAPI HDEPEND HOMEPAGE INHERITED IUSE REQUIRED_USE KEYWORDS LICENSE
-   PDEPEND PROVIDE RDEPEND REPOSITORY RESTRICT SLOT SRC_URI"
+   PDEPEND RDEPEND REPOSITORY RESTRICT SLOT SRC_URI"
 
 PORTAGE_READONLY_VARS="D EBUILD EBUILD_PHASE EBUILD_PHASE_FUNC \
EBUILD_SH_ARGS EMERGE_FROM FILESDIR MERGE_TYPE \
diff --git a/man/ebuild.5 b/man/ebuild.5
index 71e754d48..eb27d43bb 100644
--- a/man/ebuild.5
+++ b/man/ebuild.5
@@ -726,16 +726,6 @@ A space delimited list of properties, with conditional 
syntax support.
 One or more ebuild phases will produce a prompt that requires user interaction.
 .RE
 .PD 1
-.TP
-.B PROVIDE\fR = \fI"virtual/TARGET"
-This variable should only be used when a package provides a virtual target.
-For example, blackdown\-jdk and sun\-jdk provide \fIvirtual/jdk\fR.  This
-allows for packages to depend on \fIvirtual/jdk\fR rather than on blackdown
-or sun specifically.
-
-The \fBPROVIDE\fR variable has been deprecated. See
-\fIhttps://www.gentoo.org/glep/glep-0037.html\fR for details.
-
 .TP
 .B DOCS
 Beginning with \fBEAPI 4\fR, an array or space\-delimited list of documentation
diff --git a/pym/_emerge/Package.py b/pym/_emerge/Package.py
index cebfd8281..b7911c5f4 100644
--- a/pym/_emerge/Package.py
+++ b/pym/_emerge/Package.py
@@ -1,4 +1,4 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 from __future__ import unicode_literals
@@ -44,7 +44,7 @@ class Package(Task):
metadata_keys = [
"BUILD_ID", "BUILD_TIME", "CHOST", "COUNTER", "DEFINED_PHASES",
"DEPEND", "EAPI", "HDEPEND", "INHERITED", "IUSE", "KEYWORDS",
-   "LICENSE", "MD5", "PDEPEND", "PROVIDE", "PROVIDES",
+   "LICENSE", "MD5", "PDEPEND", "PROVIDES",
"RDEPEND", "repository", "REQUIRED_USE",
"PROPERTIES", "REQUIRES", "RESTRICT", "SIZE",
"SLOT", "USE", "_mtime_"]
@@ -165,17 +165,7 @@ class Package(Task):
 
@property
def provided_cps(self):
-
-   if self._provided_cps is None:
-   provided_cps = [self.cp]
-   for atom in self._metadata["PROVIDE"].split():
-   try:
-   

[gentoo-portage-dev] [PATCH 1/2] _emerge: Remove unused param to show_invalid_depstring_notice()

2018-03-11 Thread Michał Górny
---
 pym/_emerge/BlockerDB.py | 4 ++--
 pym/_emerge/actions.py   | 9 +++--
 pym/_emerge/depgraph.py  | 8 
 pym/_emerge/resolver/output.py   | 4 ++--
 pym/_emerge/show_invalid_depstring_notice.py | 4 ++--
 5 files changed, 13 insertions(+), 16 deletions(-)

diff --git a/pym/_emerge/BlockerDB.py b/pym/_emerge/BlockerDB.py
index 44a70a098..5b3b01c37 100644
--- a/pym/_emerge/BlockerDB.py
+++ b/pym/_emerge/BlockerDB.py
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 import sys
@@ -99,7 +99,7 @@ class BlockerDB(object):
trees=dep_check_trees, myroot=new_pkg.root)
if not success:
# We should never get this far with invalid deps.
-   show_invalid_depstring_notice(new_pkg, depstr, atoms)
+   show_invalid_depstring_notice(new_pkg, atoms)
assert False
 
blocker_atoms = [atom.lstrip("!") for atom in atoms \
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index 2293560c1..455aa7e04 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -816,8 +816,7 @@ def calc_depclean(settings, trees, ldpath_mtimes,
protected_set.add("=" + pkg.cpv)
continue
except portage.exception.InvalidDependString as 
e:
-   show_invalid_depstring_notice(pkg,
-   pkg._metadata["PROVIDE"], 
_unicode(e))
+   show_invalid_depstring_notice(pkg, 
_unicode(e))
del e
protected_set.add("=" + pkg.cpv)
continue
@@ -870,8 +869,7 @@ def calc_depclean(settings, trees, ldpath_mtimes,
protected_set.add("=" + pkg.cpv)
continue
except portage.exception.InvalidDependString as e:
-   show_invalid_depstring_notice(pkg,
-   pkg._metadata["PROVIDE"], _unicode(e))
+   show_invalid_depstring_notice(pkg, _unicode(e))
del e
protected_set.add("=" + pkg.cpv)
continue
@@ -888,8 +886,7 @@ def calc_depclean(settings, trees, ldpath_mtimes,
if excluded_set.findAtomForPackage(pkg):
required_sets['__excluded__'].add("=" + 
pkg.cpv)
except portage.exception.InvalidDependString as e:
-   show_invalid_depstring_notice(pkg,
-   pkg._metadata["PROVIDE"], _unicode(e))
+   show_invalid_depstring_notice(pkg, _unicode(e))
del e
required_sets['__excluded__'].add("=" + pkg.cpv)
 
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 1c47b4b63..747ef1a1a 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 from __future__ import division, print_function, unicode_literals
@@ -7095,7 +7095,7 @@ class depgraph(object):
# matches (this can 
happen if an atom lacks a
# category).

show_invalid_depstring_notice(
-   pkg, depstr, 
"%s" % (e,))
+   pkg, "%s" % 
(e,))
del e
raise
if not success:
@@ -7108,7 +7108,7 @@ class depgraph(object):
# annoy the 
user too much (otherwise they'd be
# forced to 
manually unmerge it first).
continue
-   
show_invalid_depstring_notice(pkg, depstr, atoms)
+   
show_invalid_depstring_notice(pkg, atoms)
return False
   

[gentoo-portage-dev] [PATCH 0/2] Remove most of PROVIDE support

2018-03-11 Thread Michał Górny
EAPI 7 reuses the metadata cache slot that was used for PROVIDE.
Finally remove most of Portage support for PROVIDE to make it UNUSED
once again.

PR: https://github.com/gentoo/portage/pull/266

Michał Górny (2):
  _emerge: Remove unused param to show_invalid_depstring_notice()
  Remove support for PROVIDE virtuals

 bin/ebuild.sh  |  2 +-
 bin/phase-functions.sh |  2 +-
 man/ebuild.5   | 10 -
 pym/_emerge/BlockerDB.py   |  4 +-
 pym/_emerge/Package.py | 27 ++--
 pym/_emerge/actions.py |  9 ++--
 pym/_emerge/depgraph.py|  8 ++--
 pym/_emerge/resolver/output.py |  4 +-
 pym/_emerge/show_invalid_depstring_notice.py   |  4 +-
 pym/portage/__init__.py|  2 +-
 pym/portage/_sets/base.py  | 17 +---
 pym/portage/cache/metadata.py  |  4 +-
 pym/portage/dbapi/__init__.py  |  4 +-
 pym/portage/dbapi/bintree.py   |  9 ++--
 pym/portage/dbapi/dep_expand.py|  2 +-
 pym/portage/dbapi/porttree.py  |  4 +-
 pym/portage/dbapi/vartree.py   | 38 ++--
 pym/portage/dep/__init__.py| 20 +
 pym/portage/emaint/modules/move/move.py|  4 +-
 pym/portage/package/ebuild/_config/MaskManager.py  | 10 ++---
 .../package/ebuild/_config/special_env_vars.py |  4 +-
 pym/portage/package/ebuild/config.py   | 43 +++---
 pym/portage/package/ebuild/doebuild.py |  2 +-
 pym/portage/repository/config.py   |  5 +--
 .../tests/resolver/test_virtual_transition.py  | 51 --
 repoman/man/repoman.1  |  7 ---
 .../repoman/modules/scan/depend/_depend_checks.py  |  2 +-
 .../modules/scan/metadata/ebuild_metadata.py   |  8 +---
 repoman/pym/repoman/qa_data.py |  2 -
 repoman/pym/repoman/repos.py   |  3 --
 30 files changed, 56 insertions(+), 255 deletions(-)
 delete mode 100644 pym/portage/tests/resolver/test_virtual_transition.py

-- 
2.16.2




Re: [gentoo-dev] Project:SuSE without members

2018-03-11 Thread Mike


On 03/11/2018 07:08 AM, Pacho Ramos wrote:
> El dom, 11-03-2018 a las 11:32 +0100, Andreas Sturmlechner escribió:
>> On Samstag, 10. März 2018 14:20:45 CET Pacho Ramos wrote:
>>> From now Project:SuSE has no members anymore, they maintain this packages
>>> (that will go to maintainer-needed in a week if Project is still without
>>> members at that time)
>>
>> Just in case this is the list you use for dropping to maintainer needed as 
>> well - at least
>>
>>> app-backup/kfoldersync
>>> app-text/diction
>>
>> are false positives, and probably several others. Your 'suse' grep matches 
>> packages with opensuse URLs or words like 'misused' in description text.
>>
>> Regards
>>
> 
> Ah, yes, this is the list then
> app-arch/rpm
> app-benchmarks/os-autoinst
> dev-util/hxtools
> dev-util/icemon
> dev-util/obs-service-cpanspec
> dev-util/obs-service-download_files
> dev-util/obs-service-download_src_package
> dev-util/obs-service-download_url
> dev-util/obs-service-extract_file
> dev-util/obs-service-format_spec_file
> dev-util/obs-service-generator_driver_update_disk
> dev-util/obs-service-github_tarballs
> dev-util/obs-service-git_tarballs
> dev-util/obs-service-meta
> dev-util/obs-service-rearchive
> dev-util/obs-service-recompress
> dev-util/obs-service-set_version
> dev-util/obs-service-source_validator
> dev-util/obs-service-tar_scm
> dev-util/obs-service-update_source
> dev-util/obs-service-verify_file
> dev-util/osc
> dev-util/quilt
> dev-util/spec-cleaner
> dev-util/suse-build
> media-fonts/fifth-leg
> sys-devel/icecream
> 

Maybe it's worth filtering out packages that have an active maintainer?
I maintain quilt and will drop the project tag.

Mike



[gentoo-portage-dev] [PATCH 2/2] Strip trailing slash from D, ED, ROOT, EROOT in EAPI 7

2018-03-11 Thread Michał Górny
Bug: https://bugs.gentoo.org/465772
---
 pym/portage/eapi.py  | 7 +++
 pym/portage/package/ebuild/config.py | 5 +
 2 files changed, 12 insertions(+)

diff --git a/pym/portage/eapi.py b/pym/portage/eapi.py
index 5613fb5d2..d1ca299f5 100644
--- a/pym/portage/eapi.py
+++ b/pym/portage/eapi.py
@@ -111,11 +111,16 @@ def eapi_empty_groups_always_true(eapi):
return eapi in ("0", "1", "2", "3", "4", "4-python", "4-slot-abi",
"5", "5-progress", "6")
 
+def eapi_path_variables_end_with_trailing_slash(eapi):
+   return eapi in ("0", "1", "2", "3", "4", "4-python", "4-slot-abi",
+   "5", "5-progress", "6")
+
 _eapi_attrs = collections.namedtuple('_eapi_attrs',
'dots_in_PN dots_in_use_flags exports_EBUILD_PHASE_FUNC '
'exports_PORTDIR exports_ECLASSDIR '
'feature_flag_test feature_flag_targetroot '
'hdepend iuse_defaults iuse_effective posixish_locale '
+   'path_variables_end_with_trailing_slash '
'repo_deps required_use required_use_at_most_one_of slot_operator 
slot_deps '
'src_uri_arrows strong_blocks use_deps use_dep_defaults '
'empty_groups_always_true')
@@ -150,6 +155,8 @@ def _get_eapi_attrs(eapi):
hdepend = (eapi is not None and eapi_has_hdepend(eapi)),
iuse_defaults = (eapi is None or eapi_has_iuse_defaults(eapi)),
iuse_effective = (eapi is not None and 
eapi_has_iuse_effective(eapi)),
+   path_variables_end_with_trailing_slash = (eapi is not None and
+   eapi_path_variables_end_with_trailing_slash(eapi)),
posixish_locale = (eapi is not None and 
eapi_requires_posixish_locale(eapi)),
repo_deps = (eapi is None or eapi_has_repo_deps(eapi)),
required_use = (eapi is None or eapi_has_required_use(eapi)),
diff --git a/pym/portage/package/ebuild/config.py 
b/pym/portage/package/ebuild/config.py
index 10250cf46..898626ecc 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -2804,6 +2804,11 @@ class config(object):
if not eapi_attrs.exports_ECLASSDIR:
mydict.pop("ECLASSDIR", None)
 
+   if not eapi_attrs.path_variables_end_with_trailing_slash:
+   for v in ("D", "ED", "ROOT", "EROOT"):
+   if v in mydict:
+   mydict[v] = 
mydict[v].rstrip(os.path.sep)
+
try:
builddir = mydict["PORTAGE_BUILDDIR"]
distdir = mydict["DISTDIR"]
-- 
2.16.2




[gentoo-portage-dev] [PATCH 1/2] Fix uses of D/ED to account for no trailing slash

2018-03-11 Thread Michał Górny
Fix all uses of D/ED to account for trailing slash not being present
in EAPI 7. While at it, also remove some duplicate slashes.
---
 bin/ebuild-helpers/dobin   |  6 +++---
 bin/ebuild-helpers/dodir   |  4 ++--
 bin/ebuild-helpers/dodoc   |  2 +-
 bin/ebuild-helpers/doexe   |  8 
 bin/ebuild-helpers/dohard  |  6 +++---
 bin/ebuild-helpers/doinfo  |  8 
 bin/ebuild-helpers/doins   |  2 +-
 bin/ebuild-helpers/dolib   |  2 +-
 bin/ebuild-helpers/doman   |  8 
 bin/ebuild-helpers/domo|  6 +++---
 bin/ebuild-helpers/dosbin  |  6 +++---
 bin/ebuild-helpers/dosed   |  4 ++--
 bin/ebuild-helpers/dosym   |  8 
 bin/ebuild-helpers/ecompressdir| 25 ---
 bin/ebuild-helpers/fowners |  4 ++--
 bin/ebuild-helpers/fperms  |  4 ++--
 bin/ebuild-helpers/keepdir |  6 +++---
 bin/ebuild-helpers/prepalldocs |  4 ++--
 bin/ebuild-helpers/prepallinfo |  4 ++--
 bin/ebuild-helpers/prepinfo| 12 +--
 bin/ebuild-helpers/prepman | 10 -
 bin/ebuild-helpers/prepstrip   | 16 +++
 bin/install-qa-check.d/60udev  |  6 +++---
 bin/install-qa-check.d/80libraries | 22 ++--
 bin/misc-functions.sh  | 24 +++---
 bin/phase-helpers.sh   | 42 +++---
 26 files changed, 125 insertions(+), 124 deletions(-)

diff --git a/bin/ebuild-helpers/dobin b/bin/ebuild-helpers/dobin
index f43871f49..975067fb1 100755
--- a/bin/ebuild-helpers/dobin
+++ b/bin/ebuild-helpers/dobin
@@ -21,15 +21,15 @@ else
_E_DESTTREE_=${DESTTREE}
 fi
 
-if [[ ! -d ${ED}${_E_DESTTREE_}/bin ]] ; then
-   install -d "${ED}${_E_DESTTREE_}/bin" || { __helpers_die "${0##*/}: 
failed to install ${ED}${_E_DESTTREE_}/bin"; exit 2; }
+if [[ ! -d ${ED%/}/${_E_DESTTREE_#/}/bin ]] ; then
+   install -d "${ED%/}/${_E_DESTTREE_#/}/bin" || { __helpers_die 
"${0##*/}: failed to install ${ED%/}/${_E_DESTTREE_#/}/bin"; exit 2; }
 fi
 
 ret=0
 
 for x in "$@" ; do
if [[ -e ${x} ]] ; then
-   install -m0755 -o ${PORTAGE_INST_UID:-0} -g 
${PORTAGE_INST_GID:-0} "${x}" "${ED}${_E_DESTTREE_}/bin"
+   install -m0755 -o ${PORTAGE_INST_UID:-0} -g 
${PORTAGE_INST_GID:-0} "${x}" "${ED%/}/${_E_DESTTREE_#/}/bin"
else
echo "!!! ${0##*/}: $x does not exist" 1>&2
false
diff --git a/bin/ebuild-helpers/dodir b/bin/ebuild-helpers/dodir
index eed2c8b8f..9b376c73f 100755
--- a/bin/ebuild-helpers/dodir
+++ b/bin/ebuild-helpers/dodir
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
@@ -8,7 +8,7 @@ if ! ___eapi_has_prefix_variables; then
ED=${D}
 fi
 
-install -d ${DIROPTIONS} "${@/#/${ED}/}"
+install -d ${DIROPTIONS} "${@/#/${ED%/}/}"
 ret=$?
 [[ $ret -ne 0 ]] && __helpers_die "${0##*/} failed"
 exit $ret
diff --git a/bin/ebuild-helpers/dodoc b/bin/ebuild-helpers/dodoc
index 75029eb20..84936e400 100755
--- a/bin/ebuild-helpers/dodoc
+++ b/bin/ebuild-helpers/dodoc
@@ -17,7 +17,7 @@ if ! ___eapi_has_prefix_variables; then
ED=${D}
 fi
 
-dir="${ED}usr/share/doc/${PF}/${_E_DOCDESTTREE_}"
+dir="${ED%/}/usr/share/doc/${PF}/${_E_DOCDESTTREE_#/}"
 if [ ! -d "${dir}" ] ; then
install -d "${dir}"
 fi
diff --git a/bin/ebuild-helpers/doexe b/bin/ebuild-helpers/doexe
index 8c4b9e97c..152c13bf6 100755
--- a/bin/ebuild-helpers/doexe
+++ b/bin/ebuild-helpers/doexe
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
@@ -13,8 +13,8 @@ if ! ___eapi_has_prefix_variables; then
ED=${D}
 fi
 
-if [[ ! -d ${ED}${_E_EXEDESTTREE_} ]] ; then
-   install -d "${ED}${_E_EXEDESTTREE_}"
+if [[ ! -d ${ED%/}/${_E_EXEDESTTREE_#/} ]] ; then
+   install -d "${ED%/}/${_E_EXEDESTTREE_#/}"
 fi
 
 TMP=$(mktemp -d "${T}/.doexe_tmp_XX")
@@ -32,7 +32,7 @@ for x in "$@" ; do
mysrc="${x}"
fi
if [ -e "$mysrc" ] ; then
-   install $EXEOPTIONS "$mysrc" "$ED$_E_EXEDESTTREE_"
+   install ${EXEOPTIONS} "$mysrc" "${ED%/}/${_E_EXEDESTTREE_#/}"
else
echo "!!! ${0##*/}: $mysrc does not exist" 1>&2
false
diff --git a/bin/ebuild-helpers/dohard b/bin/ebuild-helpers/dohard
index 8a93fad4f..66e2604b0 100755
--- a/bin/ebuild-helpers/dohard
+++ b/bin/ebuild-helpers/dohard
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 

Re: [gentoo-dev] Project:SuSE without members

2018-03-11 Thread Pacho Ramos
El dom, 11-03-2018 a las 11:32 +0100, Andreas Sturmlechner escribió:
> On Samstag, 10. März 2018 14:20:45 CET Pacho Ramos wrote:
> > From now Project:SuSE has no members anymore, they maintain this packages
> > (that will go to maintainer-needed in a week if Project is still without
> > members at that time)
> 
> Just in case this is the list you use for dropping to maintainer needed as 
> well - at least
> 
> > app-backup/kfoldersync
> > app-text/diction
> 
> are false positives, and probably several others. Your 'suse' grep matches 
> packages with opensuse URLs or words like 'misused' in description text.
> 
> Regards
> 

Ah, yes, this is the list then
app-arch/rpm
app-benchmarks/os-autoinst
dev-util/hxtools
dev-util/icemon
dev-util/obs-service-cpanspec
dev-util/obs-service-download_files
dev-util/obs-service-download_src_package
dev-util/obs-service-download_url
dev-util/obs-service-extract_file
dev-util/obs-service-format_spec_file
dev-util/obs-service-generator_driver_update_disk
dev-util/obs-service-github_tarballs
dev-util/obs-service-git_tarballs
dev-util/obs-service-meta
dev-util/obs-service-rearchive
dev-util/obs-service-recompress
dev-util/obs-service-set_version
dev-util/obs-service-source_validator
dev-util/obs-service-tar_scm
dev-util/obs-service-update_source
dev-util/obs-service-verify_file
dev-util/osc
dev-util/quilt
dev-util/spec-cleaner
dev-util/suse-build
media-fonts/fifth-leg
sys-devel/icecream



Re: [gentoo-dev] Project:SuSE without members

2018-03-11 Thread Andreas Sturmlechner
On Samstag, 10. März 2018 14:20:45 CET Pacho Ramos wrote:
> From now Project:SuSE has no members anymore, they maintain this packages
> (that will go to maintainer-needed in a week if Project is still without
> members at that time)

Just in case this is the list you use for dropping to maintainer needed as 
well - at least

> app-backup/kfoldersync
> app-text/diction

are false positives, and probably several others. Your 'suse' grep matches 
packages with opensuse URLs or words like 'misused' in description text.

Regards





[gentoo-portage-dev] [PATCH eapi6-pt2 v3 2/5] nonfatal: Implement fallback executable for EAPI 7

2018-03-11 Thread Michał Górny
EAPI 7 specifies that nonfatal has to be implemented both as a bash
function and a fallback executable, so that it can be used e.g. via
find/xargs.

Bug: https://bugs.gentoo.org/622894
---
 bin/ebuild-helpers/nonfatal | 14 ++
 1 file changed, 14 insertions(+)
 create mode 100755 bin/ebuild-helpers/nonfatal

diff --git a/bin/ebuild-helpers/nonfatal b/bin/ebuild-helpers/nonfatal
new file mode 100755
index 0..5da07cc71
--- /dev/null
+++ b/bin/ebuild-helpers/nonfatal
@@ -0,0 +1,14 @@
+#!/bin/bash
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
+
+if ! ___eapi_has_nonfatal; then
+   die "${0##*/} not supported in this EAPI"
+fi
+if [[ $# -lt 1 ]]; then
+   die "${0##*/}: Missing argument"
+fi
+
+PORTAGE_NONFATAL=1 exec "$@"
-- 
2.16.2




[gentoo-portage-dev] [PATCH eapi6-pt2 v3 1/5] Allow package.*, use.* directories in EAPI 7

2018-03-11 Thread Michał Górny
Bug: https://bugs.gentoo.org/282296
---
 pym/portage/eapi.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pym/portage/eapi.py b/pym/portage/eapi.py
index 075f7a59c..092780ded 100644
--- a/pym/portage/eapi.py
+++ b/pym/portage/eapi.py
@@ -85,7 +85,7 @@ def eapi_supports_stable_use_forcing_and_masking(eapi):
return eapi not in ("0", "1", "2", "3", "4", "4-python", "4-slot-abi")
 
 def eapi_allows_directories_on_profile_level_and_repository_level(eapi):
-   return eapi in ("4-python", "5-progress")
+   return eapi not in ("0", "1", "2", "3", "4", "4-slot-abi", "5", "6")
 
 def eapi_has_use_aliases(eapi):
return eapi in ("4-python", "5-progress")
-- 
2.16.2




[gentoo-portage-dev] [PATCH eapi6-pt2 v3 4/5] Support ENV_UNSET for EAPI 7

2018-03-11 Thread Michał Górny
Bug: https://bugs.gentoo.org/499288
---
 bin/eapi.sh| 4 
 bin/ebuild.sh  | 6 ++
 pym/_emerge/actions.py | 4 ++--
 pym/portage/const.py   | 3 ++-
 4 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/bin/eapi.sh b/bin/eapi.sh
index 1d5ea802d..569b8a0de 100644
--- a/bin/eapi.sh
+++ b/bin/eapi.sh
@@ -215,3 +215,7 @@ ___eapi_bash_3_2() {
 ___eapi_bash_4_2() {
! ___eapi_bash_3_2 "$@"
 }
+
+___eapi_has_ENV_UNSET() {
+   [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress|6)$ 
]]
+}
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index d63b0a0ba..67d255f78 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -137,6 +137,12 @@ shift $#
 
 # Unset some variables that break things.
 unset GZIP BZIP BZIP2 CDPATH GREP_OPTIONS GREP_COLOR GLOBIGNORE
+if ___eapi_has_ENV_UNSET; then
+   for x in ${ENV_UNSET}; do
+   unset "${x}"
+   done
+   unset x
+fi
 
 [[ $PORTAGE_QUIET != "" ]] && export PORTAGE_QUIET
 
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index 97df9f716..2293560c1 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 from __future__ import division, print_function, unicode_literals
@@ -1817,7 +1817,7 @@ def action_info(settings, trees, myopts, myfiles):
myvars = list(settings)
else:
myvars = ['GENTOO_MIRRORS', 'CONFIG_PROTECT', 
'CONFIG_PROTECT_MASK',
- 'DISTDIR', 'PKGDIR', 'PORTAGE_TMPDIR',
+ 'DISTDIR', 'ENV_UNSET', 'PKGDIR', 'PORTAGE_TMPDIR',
  'PORTAGE_BUNZIP2_COMMAND',
  'PORTAGE_BZIP2_COMMAND',
  'USE', 'CHOST', 'CFLAGS', 'CXXFLAGS',
diff --git a/pym/portage/const.py b/pym/portage/const.py
index 655be82b1..16922a5e6 100644
--- a/pym/portage/const.py
+++ b/pym/portage/const.py
@@ -1,5 +1,5 @@
 # portage: Constants
-# Copyright 1998-2014 Gentoo Foundation
+# Copyright 1998-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 from __future__ import unicode_literals
@@ -89,6 +89,7 @@ INCREMENTALS = (
"ACCEPT_KEYWORDS",
"CONFIG_PROTECT",
"CONFIG_PROTECT_MASK",
+   "ENV_UNSET",
"FEATURES",
"IUSE_IMPLICIT",
"PRELINK_PATH",
-- 
2.16.2




[gentoo-portage-dev] [PATCH eapi6-pt2 v3 3/5] Add EAPI 7 version comparison & manipulation functions

2018-03-11 Thread Michał Górny
Bug: https://bugs.gentoo.org/482170
---
 bin/eapi.sh   |   4 +
 bin/eapi7-ver-funcs.sh| 191 
 bin/isolated-functions.sh |   4 +
 pym/portage/tests/bin/test_eapi7_ver_funcs.py | 240 ++
 4 files changed, 439 insertions(+)
 create mode 100644 bin/eapi7-ver-funcs.sh
 create mode 100644 pym/portage/tests/bin/test_eapi7_ver_funcs.py

diff --git a/bin/eapi.sh b/bin/eapi.sh
index fa254485c..1d5ea802d 100644
--- a/bin/eapi.sh
+++ b/bin/eapi.sh
@@ -100,6 +100,10 @@ ___eapi_has_in_iuse() {
[[ ! ${1-${EAPI-0}} =~ 
^(0|1|2|3|4|4-python|4-slot-abi|5|5-hdepend|5-progress)$ ]]
 }
 
+___eapi_has_version_functions() {
+   [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress|6)$ 
]]
+}
+
 ___eapi_has_master_repositories() {
[[ ${1-${EAPI-0}} =~ ^(5-progress)$ ]]
 }
diff --git a/bin/eapi7-ver-funcs.sh b/bin/eapi7-ver-funcs.sh
new file mode 100644
index 0..b4e98f4e7
--- /dev/null
+++ b/bin/eapi7-ver-funcs.sh
@@ -0,0 +1,191 @@
+#!/bin/bash
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+__eapi7_ver_parse_range() {
+   local range=${1}
+   local max=${2}
+
+   [[ ${range} == [0-9]* ]] \
+   || die "${FUNCNAME}: range must start with a number"
+   start=${range%-*}
+   [[ ${range} == *-* ]] && end=${range#*-} || end=${start}
+   if [[ ${end} ]]; then
+   [[ ${start} -le ${end} ]] \
+   || die "${FUNCNAME}: end of range must be >= start"
+   [[ ${end} -le ${max} ]] || end=${max}
+   else
+   end=${max}
+   fi
+}
+
+__eapi7_ver_split() {
+   local v=${1} LC_ALL=C
+
+   comp=()
+
+   # get separators and components
+   local s c
+   while [[ ${v} ]]; do
+   # cut the separator
+   s=${v%%[a-zA-Z0-9]*}
+   v=${v:${#s}}
+   # cut the next component; it can be either digits or letters
+   [[ ${v} == [0-9]* ]] && c=${v%%[^0-9]*} || c=${v%%[^a-zA-Z]*}
+   v=${v:${#c}}
+
+   comp+=( "${s}" "${c}" )
+   done
+}
+
+ver_cut() {
+   local range=${1}
+   local v=${2:-${PV}}
+   local start end
+   local -a comp
+
+   __eapi7_ver_split "${v}"
+   local max=$((${#comp[@]}/2))
+   __eapi7_ver_parse_range "${range}" "${max}"
+
+   local IFS=
+   if [[ ${start} -gt 0 ]]; then
+   start=$(( start*2 - 1 ))
+   fi
+   echo "${comp[*]:start:end*2-start}"
+}
+
+ver_rs() {
+   local v
+   (( ${#} & 1 )) && v=${@: -1} || v=${PV}
+   local start end i
+   local -a comp
+
+   __eapi7_ver_split "${v}"
+   local max=$((${#comp[@]}/2 - 1))
+
+   while [[ ${#} -ge 2 ]]; do
+   __eapi7_ver_parse_range "${1}" "${max}"
+   for (( i = start*2; i <= end*2; i+=2 )); do
+   [[ ${i} -eq 0 && -z ${comp[i]} ]] && continue
+   comp[i]=${2}
+   done
+   shift 2
+   done
+
+   local IFS=
+   echo "${comp[*]}"
+}
+
+__eapi7_ver_compare_int() {
+   local a=$1 b=$2 d=$(( ${#1}-${#2} ))
+
+   # Zero-pad to equal length if necessary.
+   if [[ ${d} -gt 0 ]]; then
+   printf -v b "%0${d}d%s" 0 "${b}"
+   elif [[ ${d} -lt 0 ]]; then
+   printf -v a "%0$(( -d ))d%s" 0 "${a}"
+   fi
+
+   [[ ${a} > ${b} ]] && return 3
+   [[ ${a} == "${b}" ]]
+}
+
+__eapi7_ver_compare() {
+   local va=${1} vb=${2} a an al as ar b bn bl bs br re LC_ALL=C
+
+   
re="^([0-9]+(\.[0-9]+)*)([a-z]?)((_(alpha|beta|pre|rc|p)[0-9]*)*)(-r[0-9]+)?$"
+
+   [[ ${va} =~ ${re} ]] || die "${FUNCNAME}: invalid version: ${va}"
+   an=${BASH_REMATCH[1]}
+   al=${BASH_REMATCH[3]}
+   as=${BASH_REMATCH[4]}
+   ar=${BASH_REMATCH[7]}
+
+   [[ ${vb} =~ ${re} ]] || die "${FUNCNAME}: invalid version: ${vb}"
+   bn=${BASH_REMATCH[1]}
+   bl=${BASH_REMATCH[3]}
+   bs=${BASH_REMATCH[4]}
+   br=${BASH_REMATCH[7]}
+
+   # Compare numeric components (PMS algorithm 3.2)
+   # First component
+   __eapi7_ver_compare_int "${an%%.*}" "${bn%%.*}" || return
+
+   while [[ ${an} == *.* && ${bn} == *.* ]]; do
+   # Other components (PMS algorithm 3.3)
+   an=${an#*.}
+   bn=${bn#*.}
+   a=${an%%.*}
+   b=${bn%%.*}
+   if [[ ${a} == 0* || ${b} == 0* ]]; then
+   # Remove any trailing zeros
+   [[ ${a} =~ 0+$ ]] && a=${a%"${BASH_REMATCH[0]}"}
+   [[ ${b} =~ 0+$ ]] && b=${b%"${BASH_REMATCH[0]}"}
+   [[ ${a} > ${b} ]] && return 3
+   [[ ${a} < ${b} ]] && return 1
+   else
+   __eapi7_ver_compare_int "${a}" "${b}" || 

[gentoo-portage-dev] [PATCH eapi6-pt2 v3 5/5] Do not export PORTDIR & ECLASSDIR in EAPI 7

2018-03-11 Thread Michał Górny
Bug: https://bugs.gentoo.org/373349
Bug: https://bugs.gentoo.org/373351
---
 bin/eapi.sh|  4 
 bin/phase-functions.sh |  6 --
 pym/portage/eapi.py| 11 +++
 pym/portage/package/ebuild/config.py   |  5 +
 pym/portage/package/ebuild/doebuild.py |  8 
 5 files changed, 28 insertions(+), 6 deletions(-)

diff --git a/bin/eapi.sh b/bin/eapi.sh
index 569b8a0de..665b6f13e 100644
--- a/bin/eapi.sh
+++ b/bin/eapi.sh
@@ -38,6 +38,10 @@ ___eapi_has_RDEPEND_DEPEND_fallback() {
[[ ${1-${EAPI-0}} =~ ^(0|1|2|3)$ ]]
 }
 
+___eapi_has_PORTDIR_ECLASSDIR() {
+   [[ ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress|6)$ ]]
+}
+
 # HELPERS PRESENCE
 
 ___eapi_has_dohard() {
diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh
index d95012d6b..017dc132b 100644
--- a/bin/phase-functions.sh
+++ b/bin/phase-functions.sh
@@ -12,7 +12,7 @@ PORTAGE_READONLY_METADATA="DEFINED_PHASES DEPEND DESCRIPTION
PDEPEND PROVIDE RDEPEND REPOSITORY RESTRICT SLOT SRC_URI"
 
 PORTAGE_READONLY_VARS="D EBUILD EBUILD_PHASE EBUILD_PHASE_FUNC \
-   EBUILD_SH_ARGS ECLASSDIR EMERGE_FROM FILESDIR MERGE_TYPE \
+   EBUILD_SH_ARGS EMERGE_FROM FILESDIR MERGE_TYPE \
PM_EBUILD_HOOK_DIR \
PORTAGE_ACTUAL_DISTDIR PORTAGE_ARCHLIST PORTAGE_BASHRC  \
PORTAGE_BINPKG_FILE PORTAGE_BINPKG_TAR_OPTS PORTAGE_BINPKG_TMPFILE \
@@ -30,7 +30,6 @@ PORTAGE_READONLY_VARS="D EBUILD EBUILD_PHASE 
EBUILD_PHASE_FUNC \
PORTAGE_SAVED_READONLY_VARS PORTAGE_SIGPIPE_STATUS \
PORTAGE_TMPDIR PORTAGE_UPDATE_ENV PORTAGE_USERNAME \
PORTAGE_VERBOSE PORTAGE_WORKDIR_MODE PORTAGE_XATTR_EXCLUDE \
-   PORTDIR \
REPLACING_VERSIONS REPLACED_BY_VERSION T WORKDIR \
__PORTAGE_HELPER __PORTAGE_TEST_HARDLINK_LOCKS"
 
@@ -106,6 +105,9 @@ __filter_readonly_variables() {
if ___eapi_has_prefix_variables; then
filtered_vars+=" ED EPREFIX EROOT"
fi
+   if ___eapi_has_PORTDIR_ECLASSDIR; then
+   filtered_vars+=" PORTDIR ECLASSDIR"
+   fi
 
if has --filter-sandbox $* ; then
filtered_vars="${filtered_vars} SANDBOX_.*"
diff --git a/pym/portage/eapi.py b/pym/portage/eapi.py
index 092780ded..5613fb5d2 100644
--- a/pym/portage/eapi.py
+++ b/pym/portage/eapi.py
@@ -47,6 +47,14 @@ def eapi_exports_replace_vars(eapi):
 def eapi_exports_EBUILD_PHASE_FUNC(eapi):
return eapi not in ("0", "1", "2", "3", "4", "4-python", "4-slot-abi")
 
+def eapi_exports_PORTDIR(eapi):
+   return eapi in ("0", "1", "2", "3", "4", "4-python", "4-slot-abi",
+   "5", "5-progress", "6")
+
+def eapi_exports_ECLASSDIR(eapi):
+   return eapi in ("0", "1", "2", "3", "4", "4-python", "4-slot-abi",
+   "5", "5-progress", "6")
+
 def eapi_exports_REPOSITORY(eapi):
return eapi in ("4-python", "5-progress")
 
@@ -105,6 +113,7 @@ def eapi_empty_groups_always_true(eapi):
 
 _eapi_attrs = collections.namedtuple('_eapi_attrs',
'dots_in_PN dots_in_use_flags exports_EBUILD_PHASE_FUNC '
+   'exports_PORTDIR exports_ECLASSDIR '
'feature_flag_test feature_flag_targetroot '
'hdepend iuse_defaults iuse_effective posixish_locale '
'repo_deps required_use required_use_at_most_one_of slot_operator 
slot_deps '
@@ -134,6 +143,8 @@ def _get_eapi_attrs(eapi):
dots_in_use_flags = (eapi is None or 
eapi_allows_dots_in_use_flags(eapi)),
empty_groups_always_true = (eapi is not None and 
eapi_empty_groups_always_true(eapi)),
exports_EBUILD_PHASE_FUNC = (eapi is None or 
eapi_exports_EBUILD_PHASE_FUNC(eapi)),
+   exports_PORTDIR = (eapi is not None and 
eapi_exports_PORTDIR(eapi)),
+   exports_ECLASSDIR = (eapi is not None and 
eapi_exports_ECLASSDIR(eapi)),
feature_flag_test = True,
feature_flag_targetroot = (eapi is not None and 
eapi_has_targetroot(eapi)),
hdepend = (eapi is not None and eapi_has_hdepend(eapi)),
diff --git a/pym/portage/package/ebuild/config.py 
b/pym/portage/package/ebuild/config.py
index 432520ba8..10250cf46 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -2799,6 +2799,11 @@ class config(object):
else:
raise AssertionError("C locale did not 
pass the test!")
 
+   if not eapi_attrs.exports_PORTDIR:
+   mydict.pop("PORTDIR", None)
+   if not eapi_attrs.exports_ECLASSDIR:
+   mydict.pop("ECLASSDIR", None)
+
try:
builddir = mydict["PORTAGE_BUILDDIR"]
distdir = mydict["DISTDIR"]
diff --git a/pym/portage/package/ebuild/doebuild.py 
b/pym/portage/package/ebuild/doebuild.py
index 8c8f373bf..ca241aefb 100644
--- 

Re: [gentoo-dev] News Item v2: Portage rsync tree verification unstable

2018-03-11 Thread Michał Górny
W dniu sob, 10.03.2018 o godzinie 15∶16 -0800, użytkownik Zac Medico
napisał:
> Changes:
>   * First paragraph rewritten by Robin Johnson 
>   * Fixes spelling of 'following' reported by Michael Everitt
> 
> 
> Title: Portage rsync tree verification unstable
> Author: Zac Medico 
> Posted: 2018-03-13
> Revision: 1
> News-Item-Format: 2.0
> Display-If-Installed: sys-apps/portage
> 
> Portage rsync tree verification is being temporarily turned off by
> default, starting with sys-apps/portage-2.3.24. This permits
> stabilization of sys-apps/portage-2.3.24 while still working on bugs
> relating to tree verification [1]: deadlocks [2] & key fetching [3].
> 
> If users wish to enable the 'rsync-verify' USE flag for sys-apps/portage,
> they need to follow these steps:
> 
> 1) In order to unmask the 'rsync-verify' USE flag, create a file named
> /etc/portage/profile/package.use.mask containing a line like the
> following:
> 
> sys-apps/portage -rsync-verify
> 
> 2) Once the 'rsync-verify' USE flag has been unmasked as described
> in step 1, it can be enabled with a line like the following in
> /etc/portage/package.use:
> 
> sys-apps/portage rsync-verify
> 
> 3) After the configuration changes in steps 1 and 2 have been made, run
> the following command:
> 
> emerge --oneshot --newuse '>=sys-apps/portage-2.3.24'
> 

Not sure if it's for better or worse but I suppose some users would find
it easier if you provided a copy-paste snippet instead of or in addition
to detailed instructions, e.g.:

echo sys-apps/portage -rsync-verify >> /etc/portage/profile/package.use.mask
echo sys-apps/portage rsync-verify >> /etc/portage/package.use
emerge -1v
sys-apps/portage

-- 
Best regards,
Michał Górny