From: "André Erdmann" <dywi@mailerd.de>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/R_overlay:master commit in: roverlay/setupscript/
Date: Fri, 21 Feb 2014 17:36:55 +0000 (UTC) [thread overview]
Message-ID: <1392931228.796c1d77dafadccc44e028d91366228502af4416.dywi@gentoo> (raw)
commit: 796c1d77dafadccc44e028d91366228502af4416
Author: André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Thu Feb 20 21:20:28 2014 +0000
Commit: André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Thu Feb 20 21:20:28 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=796c1d77
roverlay-setup, config import: minor improvement
fs_ops.unlink() always succeeds in --pretend mode (no-op), so "roverlay-setup
--pretend" gives misleading output when user_config_root==config_root.
=> do not reset user_conf_root in --pretend mode if it isn't a symlink.
---
roverlay/setupscript/initenv.py | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/roverlay/setupscript/initenv.py b/roverlay/setupscript/initenv.py
index 58677e1..ef06436 100644
--- a/roverlay/setupscript/initenv.py
+++ b/roverlay/setupscript/initenv.py
@@ -186,15 +186,11 @@ class SetupInitEnvironment (
# assert os.path.isdir ( os.path.dirname(user_conf_root) == work_root )
if user_conf_root is None and (
- fs_ops.unlink ( setup_env.user_conf_root )
+ not pretend or os.path.islink ( setup_env.user_conf_root )
):
- # config_root was a symlink
-
- if pretend:
- user_conf_root = setup_env.user_conf_root
- else:
+ if fs_ops.unlink ( setup_env.user_conf_root ):
+ # user_conf_root was a symlink
user_conf_root = setup_env.get_user_config_root()
-
# -- end if
next reply other threads:[~2014-02-21 17:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-21 17:36 André Erdmann [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-04-01 16:38 [gentoo-commits] proj/R_overlay:master commit in: roverlay/setupscript/ André Erdmann
2014-02-22 14:56 André Erdmann
2014-02-17 17:22 André Erdmann
2014-02-17 17:10 André Erdmann
2013-09-19 15:00 André Erdmann
2013-09-18 15:24 André Erdmann
2013-09-13 15:20 André Erdmann
2013-09-13 15:10 André Erdmann
2013-09-13 15:10 André Erdmann
2013-09-12 16:36 André Erdmann
2013-09-11 14:50 André Erdmann
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=1392931228.796c1d77dafadccc44e028d91366228502af4416.dywi@gentoo \
--to=dywi@mailerd.de \
--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