From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/_emirrordist/
Date: Sat, 12 Oct 2019 06:40:46 +0000 (UTC) [thread overview]
Message-ID: <1570862429.8c92c14269dfadc87413ebd952397021b1c4dcc7.mgorny@gentoo> (raw)
commit: 8c92c14269dfadc87413ebd952397021b1c4dcc7
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 11 21:24:12 2019 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Oct 12 06:40:29 2019 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=8c92c142
emirrordist: Support specifying custom --layout-conf
Support specifying custom layout.conf file to use. This makes it
possible to start propagating new mirror layout without exposing it
to users.
Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>
Closes: https://github.com/gentoo/portage/pull/465
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
lib/portage/_emirrordist/Config.py | 6 ++++--
lib/portage/_emirrordist/main.py | 6 ++++++
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/lib/portage/_emirrordist/Config.py b/lib/portage/_emirrordist/Config.py
index ace3b0a6a..c1f59f725 100644
--- a/lib/portage/_emirrordist/Config.py
+++ b/lib/portage/_emirrordist/Config.py
@@ -74,8 +74,10 @@ class Config(object):
options.deletion_db, 'deletion')
self.layout_conf = MirrorLayoutConfig()
- self.layout_conf.read_from_file(
- os.path.join(self.distfiles, 'layout.conf'))
+ if options.layout_conf is None:
+ options.layout_conf = os.path.join(self.distfiles,
+ 'layout.conf')
+ self.layout_conf.read_from_file(options.layout_conf)
self.layouts = self.layout_conf.get_all_layouts()
def _open_log(self, log_desc, log_path, mode):
diff --git a/lib/portage/_emirrordist/main.py b/lib/portage/_emirrordist/main.py
index 0ae45ab6f..ce0c2929f 100644
--- a/lib/portage/_emirrordist/main.py
+++ b/lib/portage/_emirrordist/main.py
@@ -193,6 +193,12 @@ common_options = (
"distfiles between layouts",
"action" : "store_true"
},
+ {
+ "longopt" : "--layout-conf",
+ "help" : "specifies layout.conf file to use instead of "
+ "the one present in the distfiles directory",
+ "metavar" : "FILE"
+ },
)
def parse_args(args):
next reply other threads:[~2019-10-12 6:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-12 6:40 Michał Górny [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-10-13 19:39 [gentoo-commits] proj/portage:master commit in: lib/portage/_emirrordist/ Michał Górny
2019-10-17 18:09 Michał Górny
2019-10-21 7:40 Michał Górny
2019-10-21 8:09 Michał Górny
2019-10-21 13:38 Michał Górny
2019-11-05 19:16 Zac Medico
2019-11-06 20:04 Zac Medico
2019-11-07 6:29 Zac Medico
2020-08-03 19:30 Zac Medico
2020-08-03 21:42 Zac Medico
2021-01-22 7:27 Zac Medico
2021-02-27 3:57 Zac Medico
2021-05-24 5:25 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=1570862429.8c92c14269dfadc87413ebd952397021b1c4dcc7.mgorny@gentoo \
--to=mgorny@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-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