public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Zac Medico <zmedico@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Cc: Zac Medico <zmedico@gentoo.org>
Subject: [gentoo-portage-dev] [PATCH 2/2 v2] Update /usr/portage references (bug 378603)
Date: Sun,  5 Aug 2018 22:32:34 -0700	[thread overview]
Message-ID: <20180806053234.24978-1-zmedico@gentoo.org> (raw)
In-Reply-To: <20180806002347.18237-3-zmedico@gentoo.org>

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 v2] fixes DISTDIR and PKGDIR references to rever to the
new /var/cache/{distfiles,binpkgs} locations

 cnf/make.conf.example                            | 12 +++++------
 lib/portage/__init__.py                          |  2 +-
 lib/portage/cache/flat_hash.py                   |  2 +-
 lib/portage/tests/news/test_NewsItem.py          |  2 +-
 lib/portage/tests/resolver/ResolverPlayground.py |  2 +-
 lib/portage/xml/metadata.py                      |  4 ++--
 man/ebuild.5                                     |  4 ++--
 man/emerge.1                                     |  6 +++---
 man/make.conf.5                                  | 20 +++++++++---------
 man/portage.5                                    | 26 ++++++++++++------------
 man/quickpkg.1                                   |  2 +-
 repoman/lib/repoman/__init__.py                  |  2 +-
 repoman/lib/repoman/checks/herds/herdbase.py     |  2 +-
 13 files changed, 43 insertions(+), 43 deletions(-)

diff --git a/cnf/make.conf.example b/cnf/make.conf.example
index 04f3a0274..c16f2afbd 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 your portage tree.
-# 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,7 +111,7 @@
 #     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
@@ -119,16 +119,16 @@
 #     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
+#     /var/db/repos/gentoo are not necessarily safe for data storage. See the
 #     PORTDIR documentation for more information.
-#DISTDIR=/usr/portage/distfiles
+#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
+#     locations under /var/db/repos/gentoo are not necessarily safe for data
 #     storage. See the PORTDIR documentation for more information.
-#PKGDIR=/usr/portage/packages
+#PKGDIR=/var/cache/binpkgs
 #
 # PORT_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 166bfc700..61a240100 100644
--- a/lib/portage/__init__.py
+++ b/lib/portage/__init__.py
@@ -133,7 +133,7 @@ except ImportError as e:
 	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("!!! portage tree under '/usr/portage/sys-apps/portage/files/' (default).\n")
+	sys.stderr.write("!!! portage tree 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.
+					# /var/db/repos/gentoo/local as in bug #302764.
 					if depth < 1:
 						dirs.append((depth+1, p))
 					continue
diff --git a/lib/portage/tests/news/test_NewsItem.py b/lib/portage/tests/news/test_NewsItem.py
index 2f183a7e0..411b8d36d 100644
--- a/lib/portage/tests/news/test_NewsItem.py
+++ b/lib/portage/tests/news/test_NewsItem.py
@@ -43,7 +43,7 @@ against YourSQL:
 The revdep-rebuild tool is provided by app-portage/gentoolkit.
 """
 	def setUp(self):
-		self.profile = "/usr/portage/profiles/default-linux/x86/2007.0/"
+		self.profile = "/var/db/repos/gentoo/profiles/default-linux/x86/2007.0/"
 		self.keywords = "x86"
 		# Use fake/test dbapi to avoid slow tests
 		self.vardb = testdbapi()
diff --git a/lib/portage/tests/resolver/ResolverPlayground.py b/lib/portage/tests/resolver/ResolverPlayground.py
index e2e061669..c0fbb541b 100644
--- a/lib/portage/tests/resolver/ResolverPlayground.py
+++ b/lib/portage/tests/resolver/ResolverPlayground.py
@@ -350,7 +350,7 @@ class ResolverPlayground(object):
 					f.write("masters =\n")
 
 			if repo == "test_repo":
-				#Create a minimal profile in /usr/portage
+				#Create a minimal profile in /var/db/repos/gentoo
 				sub_profile_dir = os.path.join(profile_dir, "default", "linux", "x86", "test_profile")
 				os.makedirs(sub_profile_dir)
 
diff --git a/lib/portage/xml/metadata.py b/lib/portage/xml/metadata.py
index 9e48dddde..8e82df0d0 100644
--- a/lib/portage/xml/metadata.py
+++ b/lib/portage/xml/metadata.py
@@ -5,9 +5,9 @@
 
 	Example usage:
 		>>> from portage.xml.metadata import MetaDataXML
-		>>> pkg_md = MetaDataXML('/usr/portage/app-misc/gourmet/metadata.xml')
+		>>> pkg_md = MetaDataXML('/var/db/repos/gentoo/app-misc/gourmet/metadata.xml')
 		>>> pkg_md
-		<MetaDataXML '/usr/portage/app-misc/gourmet/metadata.xml'>
+		<MetaDataXML '/var/db/repos/gentoo/app-misc/gourmet/metadata.xml'>
 		>>> pkg_md.herds()
 		['no-herd']
 		>>> for maint in pkg_md.maintainers():
diff --git a/man/ebuild.5 b/man/ebuild.5
index 9f491dd73..e6660c283 100644
--- a/man/ebuild.5
+++ b/man/ebuild.5
@@ -569,7 +569,7 @@ being submitted for inclusion, it must have ~arch set for architectures
 where it has been PROVEN TO WORK.  (Packages KEYWORDed this way may be
 unmasked for testing by setting ACCEPT_KEYWORDS="~arch" on the command
 line, or in \fBmake.conf\fR(5)) For an authoritative list please review
-/usr/portage/profiles/arch.list.  Please keep this list in alphabetical order.
+/var/db/repos/gentoo/profiles/arch.list.  Please keep this list in alphabetical order.
 .TP
 .B SLOT
 This sets the SLOT for packages that may need to have multiple versions
@@ -592,7 +592,7 @@ 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
+/var/db/repos/gentoo/licenses/. If the license does not exist in portage yet, you
 must add it first.
 .TP
 .B IUSE
diff --git a/man/emerge.1 b/man/emerge.1
index f53ba92f5..21c3b854c 100644
--- a/man/emerge.1
+++ b/man/emerge.1
@@ -43,7 +43,7 @@ as \fBsys\-apps/portage\fR or \fB=python\-2.2.1\-r2\fR.
 \fBemerge\fR
 ignores a trailing slash so that filename completion can be used.
 The \fIebuild\fR may also be an actual filename, such as
-\fB/usr/portage/app\-admin/python/python\-2.2.1\-r2.ebuild\fR.
+\fB/var/db/repos/gentoo/app\-admin/python/python\-2.2.1\-r2.ebuild\fR.
 \fBWARNING:\fR The implementation of \fBemerge /path/to/ebuild\fR is broken and
 so this syntax shouldn't be used.
 .TP
@@ -1280,7 +1280,7 @@ avoid dependency conflicts and/or unsatisfied dependencies.
 .BR package.mask
 The \fBpackage.mask\fR file primarily blocks the use of packages that cause
 problems or are known to have issues on different systems.  It resides in
-\fI/usr/portage/profiles\fR.
+\fI/var/db/repos/gentoo/profiles\fR.
 .TP
 .BR CHOST
 Use the \fBACCEPT_CHOSTS\fR variable in \fBmake.conf\fR(5) to control
@@ -1426,7 +1426,7 @@ files.
 Contains profile\-specific variables for the build process.  \fBDo not
 edit this file\fR.
 .TP
-.B /usr/portage/profiles/use.desc
+.B /var/db/repos/gentoo/profiles/use.desc
 Contains the master list of USE flags with descriptions of their
 functions.  \fBDo not edit this file\fR.
 .TP
diff --git a/man/make.conf.5 b/man/make.conf.5
index a4e33923c..ba5b8573e 100644
--- a/man/make.conf.5
+++ b/man/make.conf.5
@@ -219,10 +219,10 @@ Use the \fBPORTAGE_RO_DISTDIRS\fR variable to specify one or
 more read-only directories containing distfiles.
 
 Note
-that locations under /usr/portage are not necessarily safe for data storage.
+that locations under /var/db/repos/gentoo are not necessarily safe for data storage.
 See the \fBPORTDIR\fR documentation for more information.
 .br
-Defaults to /usr/portage/distfiles.
+Defaults to /var/cache/distfiles.
 .TP
 .B DOC_SYMLINKS_DIR
 If this variable contains a directory then symlinks to html documentation will
@@ -800,10 +800,10 @@ to it's category. However, for backward compatibility with the layout
 used by older versions of portage, if the \fI${PKGDIR}/All\fR directory
 exists then all packages will be stored inside of it and symlinks to
 the packages will be created in the category subdirectories. Note
-that locations under /usr/portage are not necessarily safe for data storage.
+that locations under /var/db/repos/gentoo are not necessarily safe for data storage.
 See the \fBPORTDIR\fR documentation for more information.
 .br
-Defaults to /usr/portage/packages.
+Defaults to /var/cache/binpkgs.
 .TP
 .B PORT_LOGDIR
 This variable defines the directory in which per\-ebuild logs are kept.
@@ -1033,7 +1033,7 @@ Defines the location of main repository. This variable is deprecated in favor of
 settings in \fBrepos.conf\fR. If you change this, you must update
 your /etc/portage/make.profile symlink accordingly.
 .br
-Defaults to /usr/portage.
+Defaults to /var/db/repos/gentoo.
 .br
 \fB***Warning***\fR
 .br
@@ -1118,7 +1118,7 @@ rsync://private\-mirror.com/portage\-module
 .br
 rsync://rsync\-user@private\-mirror.com:873/gentoo\-portage
 .br
-ssh://ssh\-user@192.168.0.1:22/usr/portage
+ssh://ssh\-user@192.168.0.1:22/var/db/repos/gentoo
 .br
 ssh://ssh\-user@192.168.0.1:22/\\${HOME}/portage\-storage
 .TP
@@ -1136,7 +1136,7 @@ Defaults to "/lib/modules/*".
 \fBUSE\fR = \fI[space delimited list of USE items]\fR
 This variable contains options that control the build behavior of several
 packages.  More information in \fBebuild\fR(5).  Possible USE values
-can be found in \fI/usr/portage/profiles/use.desc\fR.
+can be found in \fI/var/db/repos/gentoo/profiles/use.desc\fR.
 .TP
 \fBUSE_ORDER\fR = \fI"env:pkg:conf:defaults:pkginternal:features:repo:env.d"\fR
 Determines the precedence of layers in the incremental stacking of the USE
@@ -1173,7 +1173,7 @@ for FEATURES=\fBtest\fR.
 .TP
 .B repo
 USE from make.defaults and package.use in the repo's profiles/ top dir
-(e.g. /usr/portage/profiles/package.use) (see \fBportage\fR(5))
+(e.g. /var/db/repos/gentoo/profiles/package.use) (see \fBportage\fR(5))
 .TP
 .B env.d
 USE from the environment variables, such as LINGUAS, defined by files in
@@ -1203,10 +1203,10 @@ Contains the default variables for the build\-process, you should edit
 .B /etc/portage/color.map
 Contains variables customizing colors.
 .TP
-.B /usr/portage/profiles/use.desc
+.B /var/db/repos/gentoo/profiles/use.desc
 Contains a list of all global USE flags.
 .TP
-.B /usr/portage/profiles/use.local.desc
+.B /var/db/repos/gentoo/profiles/use.local.desc
 Contains a list of all local USE variables.
 .SH "SEE ALSO"
 .BR emerge (1),
diff --git a/man/portage.5 b/man/portage.5
index cd9d5036d..0db8c5258 100644
--- a/man/portage.5
+++ b/man/portage.5
@@ -77,18 +77,18 @@ site-specific overrides of \fB/etc/portage/make.profile/\fR
 .BR /etc/portage/sets/
 user\-defined package sets
 .TP
-.BR /usr/portage/
+.BR /var/db/repos/gentoo/
 .nf
 sets.conf
 .fi
 .TP
-.BR /usr/portage/metadata/
+.BR /var/db/repos/gentoo/metadata/
 .nf
 layout.conf
 pkg_desc_index
 .fi
 .TP
-.BR /usr/portage/profiles/
+.BR /var/db/repos/gentoo/profiles/
 .nf
 arch.list
 categories
@@ -214,7 +214,7 @@ More reading:
 .TP
 \fB/etc/portage/make.profile/\fR or \fB/etc/make.profile/\fR
 This is usually just a symlink to the correct profile in
-\fB/usr/portage/profiles/\fR.  Since it is part of the portage tree, it
+\fB/var/db/repos/gentoo/profiles/\fR.  Since it is part of the portage tree, it
 may easily be updated/regenerated by running `emerge \-\-sync`.  It defines
 what a profile is (usually arch specific stuff).  If you need a custom
 profile, then you should make your own \fBmake.profile\fR
@@ -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
 .fi
 .TP
@@ -644,7 +644,7 @@ The global custom settings for Portage. See \fBmake.conf\fR(5).
 .BR mirrors
 Whenever portage encounters a mirror:// style URI it will look up the actual
 hosts here.  If the mirror set is not found here, it will check the global
-mirrors file at /usr/portage/profiles/thirdpartymirrors.  You may also set a
+mirrors file at /var/db/repos/gentoo/profiles/thirdpartymirrors.  You may also set a
 special mirror type called "local".  This list of mirrors will be checked
 before GENTOO_MIRRORS and will be used even if the package has
 RESTRICT="mirror" or RESTRICT="fetch".
@@ -1059,7 +1059,7 @@ rsync://private\-mirror.com/portage\-module
 .br
 rsync://rsync\-user@private\-mirror.com:873/gentoo\-portage
 .br
-ssh://ssh\-user@192.168.0.1:22/usr/portage
+ssh://ssh\-user@192.168.0.1:22/var/db/repos/gentoo
 .br
 ssh://ssh\-user@192.168.0.1:22/\\${HOME}/portage\-storage
 .RE
@@ -1178,7 +1178,7 @@ masters =
 
 # Repository 'gentoo' synchronized using CVS
 [gentoo]
-location = /usr/portage
+location = /var/db/repos/gentoo
 sync\-type = cvs
 sync\-uri = :pserver:anonymous@anoncvs.gentoo.org:/var/cvsroot
 sync\-cvs\-repo = gentoo\-x86
@@ -1195,7 +1195,7 @@ auto\-sync = yes
 .TP
 .BR sets.conf
 A package set configuration file. Settings here override settings from
-\fB/usr/portage/sets.conf\fR and \fB/usr/share/portage/config/sets\fR.
+\fB/var/db/repos/gentoo/sets.conf\fR and \fB/usr/share/portage/config/sets\fR.
 The format is described extensively in the
 \fIPackage Set Configuration\fR section of the html documentation which
 is installed with portage when the "doc" USE flag is enabled.
@@ -1256,7 +1256,7 @@ Also see \fB/var/lib/portage/world_sets\fR and the \fBemerge\fR(1)
 \fB\-\-list\-sets\fR option.
 .RE
 .TP
-.BR /usr/portage/
+.BR /var/db/repos/gentoo/
 .RS
 .TP
 .BR sets.conf
@@ -1265,7 +1265,7 @@ which overrides these settings, and
 \fB/usr/share/portage/config/sets\fR which contains default settings.
 .RE
 .TP
-.BR /usr/portage/metadata/
+.BR /var/db/repos/gentoo/metadata/
 .RS
 .TP
 .BR layout.conf
@@ -1432,7 +1432,7 @@ sys-apps/usleep 0.1: A wrapper for usleep
 .fi
 .RE
 .TP
-.BR /usr/portage/profiles/
+.BR /var/db/repos/gentoo/profiles/
 Global Gentoo settings that are controlled by the developers.  To override
 these settings, you can use the files in \fB/etc/portage/\fR.
 .RS
@@ -1643,7 +1643,7 @@ for \fB/etc/portage/repos.conf\fR.
 .TP
 .BR sets
 A directory containing package set configuration files. Also see
-\fB/etc/portage/sets.conf\fR and \fB/usr/portage/sets.conf\fR, both of
+\fB/etc/portage/sets.conf\fR and \fB/var/db/repos/gentoo/sets.conf\fR, both of
 which override values set here. Default set configurations are installed
 in \fB/usr/share/portage/config/sets/portage.conf\fR.
 .RE
diff --git a/man/quickpkg.1 b/man/quickpkg.1
index 06a1f0b6e..9ed366878 100644
--- a/man/quickpkg.1
+++ b/man/quickpkg.1
@@ -17,7 +17,7 @@ modified since they were first installed.
 .br
 The packages, after being created, will be placed in \fBPKGDIR\fR.
 This variable is defined in \fBmake.conf\fR(5) and defaults to
-/usr/portage/packages.
+/var/cache/binpkgs.
 .SH OPTIONS
 .TP
 .B <list of packages or package\-sets>
diff --git a/repoman/lib/repoman/__init__.py b/repoman/lib/repoman/__init__.py
index 89779b95c..d1312a267 100644
--- a/repoman/lib/repoman/__init__.py
+++ b/repoman/lib/repoman/__init__.py
@@ -14,7 +14,7 @@ except ImportError as e:
 	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("!!! portage tree under '/usr/portage/sys-apps/portage/files/' (default).\n")
+	sys.stderr.write("!!! portage tree 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/repoman/lib/repoman/checks/herds/herdbase.py b/repoman/lib/repoman/checks/herds/herdbase.py
index ebe6a19b4..1e7c0b27c 100644
--- a/repoman/lib/repoman/checks/herds/herdbase.py
+++ b/repoman/lib/repoman/checks/herds/herdbase.py
@@ -119,7 +119,7 @@ def get_herd_base(repoman_settings):
 
 
 if __name__ == '__main__':
-	h = make_herd_base('/usr/portage/metadata/herds.xml')
+	h = make_herd_base('/var/db/repos/gentoo/metadata/herds.xml')
 
 	assert(h.known_herd('sound'))
 	assert(not h.known_herd('media-sound'))
-- 
2.16.4



  parent reply	other threads:[~2018-08-06  5:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-06  0:23 [gentoo-portage-dev] [PATCH 0/2] Change /usr/portage council approved locations (bug 378603) Zac Medico
2018-08-06  0:23 ` [gentoo-portage-dev] [PATCH 1/2] " Zac Medico
2018-08-06  0:23 ` [gentoo-portage-dev] [PATCH 2/2] Update /usr/portage references " Zac Medico
2018-08-06  4:59   ` Ulrich Mueller
2018-08-06  5:46     ` Zac Medico
2018-08-06  6:03       ` Zac Medico
2018-08-06  7:30       ` Brian Dolbec
2018-08-06 10:29         ` Ulrich Mueller
2018-08-06 18:35         ` Zac Medico
2018-08-06 21:50           ` M. J. Everitt
2018-08-06 22:39             ` Zac Medico
2018-08-06  5:32   ` Zac Medico [this message]
2018-08-06  7:44     ` [gentoo-portage-dev] [PATCH 2/2 v2] " Brian Dolbec
2018-08-06 18:46       ` Zac Medico
2019-04-18 17:03   ` [gentoo-portage-dev] [PATCH 2/2 v3] " Zac Medico
2019-04-18 17:28     ` Ulrich Mueller
2019-04-18 17:54       ` Zac Medico
2019-04-18 17:58   ` [gentoo-portage-dev] [PATCH 2/2 v4] " Zac Medico

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180806053234.24978-1-zmedico@gentoo.org \
    --to=zmedico@gentoo.org \
    --cc=gentoo-portage-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox