[gentoo-portage-dev] [PATCH 2/2 v4] Update /usr/portage references (bug 378603)
Update all relevant references in docs, messages, and comments to refer to /var/db/repos/gentoo instead of /usr/portage. Also update DISTDIR and PKGDIR references to refer to the new /var/cache/{distfiles,binpkgs} locations. Bug: https://bugs.gentoo.org/378603 Signed-off-by: Zac Medico --- [PATCH 2/2 v4] Misc fixes suggested by Ulrich Müller cnf/make.conf.example | 16 -- lib/portage/__init__.py | 6 ++-- lib/portage/cache/flat_hash.py| 4 +-- lib/portage/tests/news/test_NewsItem.py | 4 +-- .../tests/resolver/ResolverPlayground.py | 4 +-- lib/portage/xml/metadata.py | 6 ++-- man/ebuild.5 | 9 +++--- man/emerge.1 | 8 ++--- man/make.conf.5 | 26 ++- man/portage.5 | 32 +-- man/quickpkg.1| 4 +-- repoman/lib/repoman/__init__.py | 4 +-- 12 files changed, 57 insertions(+), 66 deletions(-) diff --git a/cnf/make.conf.example b/cnf/make.conf.example index 70cb8b19b..94210faa9 100644 --- a/cnf/make.conf.example +++ b/cnf/make.conf.example @@ -14,7 +14,7 @@ # https://wiki.gentoo.org/wiki/Handbook:X86/Working/USE # # The available list of use flags with descriptions is in the ebuild repository. -# Use 'less' to view them: --> less /usr/portage/profiles/use.desc <-- +# Use 'less' to view them: --> less /var/db/repos/gentoo/profiles/use.desc <-- # # 'ufed' is an ncurses/dialog interface available in portage to make handling # useflags for you. 'emerge app-portage/ufed' @@ -111,24 +111,20 @@ # will protect the default locations of DISTDIR and PKGDIR, but users are # warned that any other locations inside PORTDIR are not necessarily safe # for data storage. -#PORTDIR=/usr/portage +#PORTDIR=/var/db/repos/gentoo # # DISTDIR is where all of the source code tarballs will be placed for # emerges. After packages are built, it is safe to remove any and # all files from this directory since they will be automatically # fetched on demand for a given build. If you would like to # selectively prune obsolete files from this directory, see -# eclean from the gentoolkit package. Note that locations under -# /usr/portage are not necessarily safe for data storage. See the -# PORTDIR documentation for more information. -#DISTDIR=/usr/portage/distfiles +# eclean from the gentoolkit package. +#DISTDIR=/var/cache/distfiles # # PKGDIR is the location of binary packages that you can have created # with '--buildpkg' or '-b' while emerging a package. This can get -# up to several hundred megs, or even a few gigs. Note that -# locations under /usr/portage are not necessarily safe for data -# storage. See the PORTDIR documentation for more information. -#PKGDIR=/usr/portage/packages +# up to several hundred megs, or even a few gigs. +#PKGDIR=/var/cache/binpkgs # # PORTAGE_LOGDIR is the location where portage will store all the logs it # creates from each individual merge. They are stored as diff --git a/lib/portage/__init__.py b/lib/portage/__init__.py index 053d197b5..b108ca3e5 100644 --- a/lib/portage/__init__.py +++ b/lib/portage/__init__.py @@ -1,4 +1,4 @@ -# Copyright 1998-2018 Gentoo Foundation +# Copyright 1998-2019 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from __future__ import unicode_literals @@ -132,8 +132,8 @@ except ImportError as e: sys.stderr.write("\n\n") sys.stderr.write("!!! Failed to complete portage imports. There are internal modules for\n") sys.stderr.write("!!! portage and failure here indicates that you have a problem with your\n") - sys.stderr.write("!!! installation of portage. Please try a rescue portage located in the\n") - sys.stderr.write("!!! ebuild repository under '/usr/portage/sys-apps/portage/files/' (default).\n") + sys.stderr.write("!!! installation of portage. Please try a rescue portage located in the ebuild\n") + sys.stderr.write("!!! repository under '/var/db/repos/gentoo/sys-apps/portage/files/' (default).\n") sys.stderr.write("!!! There is a README.RESCUE file that details the steps required to perform\n") sys.stderr.write("!!! a recovery of portage.\n") sys.stderr.write(""+str(e)+"\n\n") diff --git a/lib/portage/cache/flat_hash.py b/lib/portage/cache/flat_hash.py index 79783245b..451ea9e51 100644 --- a/lib/portage/cache/flat_hash.py +++ b/lib/portage/cache/flat_hash.py @@ -1,4 +1,4 @@ -# Copyright 2005-2016 Gentoo Foundation +# Copyright 2005-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # Author(s): Brian Harring (ferri...@gentoo.org) @@ -144,7 +144,7 @@ class database(fs_template.FsBased):
Re: [gentoo-portage-dev] [PATCH 2/2 v3] Update /usr/portage references (bug 378603)
On 4/18/19 10:28 AM, Ulrich Mueller wrote: >> On Thu, 18 Apr 2019, Zac Medico wrote: > >> --- a/man/ebuild.5 >> +++ b/man/ebuild.5 >> [...] >> @@ -553,8 +554,8 @@ usage. >> .B LICENSE >> This should be a space delimited list of licenses that the package falls >> under. This \fB_must_\fR be set to a matching license in >> -/usr/portage/licenses/. If the license does not exist in portage yet, you >> -must add it first. >> +/var/db/repos/gentoo/licenses/. If the license does not exist in portage >> +yet, you must add it first. > > s/in portage/in the repository/ Fixed in v4. >> --- a/man/portage.5 >> +++ b/man/portage.5 >> @@ -13,7 +13,7 @@ https://wiki.gentoo.org/wiki/Profile_(Portage) >> .IP Note: >> If you are looking for information on how to emerge something, please see >> .BR emerge (1). >> -.SH "SYNOPSIS" >> +.SH "SYNOPSIS"/var/db/repos/gentoo > > This change looks strange. Fixed in v4. >> [...] >> @@ -251,7 +251,7 @@ explaining how they can upgrade. >> default-linux/x86/2005.0 >> # emerge -n '>=sys-apps/portage-2.0.51' >> # rm -f /etc/portage/make.profile >> -# ln -s /usr/portage/profiles/default-linux/alpha/2005.0 \ >> +# ln -s /var/db/repos/gentoo/profiles/default-linux/alpha/2005.0 \ >> /etc/portage/make.profile > > Update the example? Updated in v4. > > Ulrich > -- Thanks, Zac signature.asc Description: OpenPGP digital signature
Re: [gentoo-portage-dev] [PATCH 2/2 v3] Update /usr/portage references (bug 378603)
> On Thu, 18 Apr 2019, Zac Medico wrote: > --- a/man/ebuild.5 > +++ b/man/ebuild.5 > [...] > @@ -553,8 +554,8 @@ usage. > .B LICENSE > This should be a space delimited list of licenses that the package falls > under. This \fB_must_\fR be set to a matching license in > -/usr/portage/licenses/. If the license does not exist in portage yet, you > -must add it first. > +/var/db/repos/gentoo/licenses/. If the license does not exist in portage > +yet, you must add it first. s/in portage/in the repository/ > --- a/man/portage.5 > +++ b/man/portage.5 > @@ -13,7 +13,7 @@ https://wiki.gentoo.org/wiki/Profile_(Portage) > .IP Note: > If you are looking for information on how to emerge something, please see > .BR emerge (1). > -.SH "SYNOPSIS" > +.SH "SYNOPSIS"/var/db/repos/gentoo This change looks strange. > [...] > @@ -251,7 +251,7 @@ explaining how they can upgrade. > default-linux/x86/2005.0 > # emerge -n '>=sys-apps/portage-2.0.51' > # rm -f /etc/portage/make.profile > -# ln -s /usr/portage/profiles/default-linux/alpha/2005.0 \ > +# ln -s /var/db/repos/gentoo/profiles/default-linux/alpha/2005.0 \ > /etc/portage/make.profile Update the example? Ulrich signature.asc Description: PGP signature
[gentoo-portage-dev] [PATCH 2/2 v3] Update /usr/portage references (bug 378603)
Update all relevant references in docs, messages, and comments to refer to /var/db/repos/gentoo instead of /usr/portage. Also update DISTDIR and PKGDIR references to refer to the new /var/cache/{distfiles,binpkgs} locations. Bug: https://bugs.gentoo.org/378603 --- [PATCH 2/2 v3] Remove "Note that locations under /var/db/repos/gentoo are not necessarily safe for data storage.", as suggested by Ulrich Müller cnf/make.conf.example | 16 --- lib/portage/__init__.py | 4 +-- lib/portage/cache/flat_hash.py| 2 +- lib/portage/tests/news/test_NewsItem.py | 2 +- .../tests/resolver/ResolverPlayground.py | 2 +- lib/portage/xml/metadata.py | 4 +-- man/ebuild.5 | 7 +++-- man/emerge.1 | 6 ++-- man/make.conf.5 | 24 ++-- man/portage.5 | 28 +-- man/quickpkg.1| 2 +- repoman/lib/repoman/__init__.py | 4 +-- 12 files changed, 46 insertions(+), 55 deletions(-) diff --git a/cnf/make.conf.example b/cnf/make.conf.example index 70cb8b19b..94210faa9 100644 --- a/cnf/make.conf.example +++ b/cnf/make.conf.example @@ -14,7 +14,7 @@ # https://wiki.gentoo.org/wiki/Handbook:X86/Working/USE # # The available list of use flags with descriptions is in the ebuild repository. -# Use 'less' to view them: --> less /usr/portage/profiles/use.desc <-- +# Use 'less' to view them: --> less /var/db/repos/gentoo/profiles/use.desc <-- # # 'ufed' is an ncurses/dialog interface available in portage to make handling # useflags for you. 'emerge app-portage/ufed' @@ -111,24 +111,20 @@ # will protect the default locations of DISTDIR and PKGDIR, but users are # warned that any other locations inside PORTDIR are not necessarily safe # for data storage. -#PORTDIR=/usr/portage +#PORTDIR=/var/db/repos/gentoo # # DISTDIR is where all of the source code tarballs will be placed for # emerges. After packages are built, it is safe to remove any and # all files from this directory since they will be automatically # fetched on demand for a given build. If you would like to # selectively prune obsolete files from this directory, see -# eclean from the gentoolkit package. Note that locations under -# /usr/portage are not necessarily safe for data storage. See the -# PORTDIR documentation for more information. -#DISTDIR=/usr/portage/distfiles +# eclean from the gentoolkit package. +#DISTDIR=/var/cache/distfiles # # PKGDIR is the location of binary packages that you can have created # with '--buildpkg' or '-b' while emerging a package. This can get -# up to several hundred megs, or even a few gigs. Note that -# locations under /usr/portage are not necessarily safe for data -# storage. See the PORTDIR documentation for more information. -#PKGDIR=/usr/portage/packages +# up to several hundred megs, or even a few gigs. +#PKGDIR=/var/cache/binpkgs # # PORTAGE_LOGDIR is the location where portage will store all the logs it # creates from each individual merge. They are stored as diff --git a/lib/portage/__init__.py b/lib/portage/__init__.py index 053d197b5..5e9fabeca 100644 --- a/lib/portage/__init__.py +++ b/lib/portage/__init__.py @@ -132,8 +132,8 @@ except ImportError as e: sys.stderr.write("\n\n") sys.stderr.write("!!! Failed to complete portage imports. There are internal modules for\n") sys.stderr.write("!!! portage and failure here indicates that you have a problem with your\n") - sys.stderr.write("!!! installation of portage. Please try a rescue portage located in the\n") - sys.stderr.write("!!! ebuild repository under '/usr/portage/sys-apps/portage/files/' (default).\n") + sys.stderr.write("!!! installation of portage. Please try a rescue portage located in the ebuild\n") + sys.stderr.write("!!! repository under '/var/db/repos/gentoo/sys-apps/portage/files/' (default).\n") sys.stderr.write("!!! There is a README.RESCUE file that details the steps required to perform\n") sys.stderr.write("!!! a recovery of portage.\n") sys.stderr.write(""+str(e)+"\n\n") diff --git a/lib/portage/cache/flat_hash.py b/lib/portage/cache/flat_hash.py index 79783245b..1ec32fb5b 100644 --- a/lib/portage/cache/flat_hash.py +++ b/lib/portage/cache/flat_hash.py @@ -144,7 +144,7 @@ class database(fs_template.FsBased): # Only recurse 1 deep, in order to avoid iteration over # entries from another nested cache instance. This can # happen if the user nests an overlay inside - # /usr/portage/local as in bug #302764. + #