From: "André Erdmann" <dywi@mailerd.de>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/R_overlay:master commit in: roverlay/config/
Date: Thu, 2 Aug 2012 15:14:16 +0000 (UTC) [thread overview]
Message-ID: <1343919424.37545b5c22386e42805c644bab9c2ea7952ccf17.dywi@gentoo> (raw)
commit: 37545b5c22386e42805c644bab9c2ea7952ccf17
Author: André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Thu Aug 2 14:57:04 2012 +0000
Commit: André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Thu Aug 2 14:57:04 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=37545b5c
config: update entry map comment
---
roverlay/config/entrymap.py | 15 +++++----------
roverlay/config/tree.py | 19 +++++++------------
2 files changed, 12 insertions(+), 22 deletions(-)
diff --git a/roverlay/config/entrymap.py b/roverlay/config/entrymap.py
index 078ddfe..0119983 100644
--- a/roverlay/config/entrymap.py
+++ b/roverlay/config/entrymap.py
@@ -1,6 +1,4 @@
-# <header!!>
-
-# TODO/FIXME comments
+# R Overlay -- config entry map
# the map of config entries (keep keys in lowercase)
# format is config_entry = None|''|str|dict(...), where
@@ -10,10 +8,10 @@
# dict() means that config_entry has options / diverts from defaults.
#
# known dict keys are:
-# * path = str | list of str -- path of this entry in the config tree
+# * path = str | list of str -- path of this entry in the config tree
+# * description = str -- description
#
# * value_type, you can specify:
-# ** slist -- value is a whitespace-separated list (replaced by list)
# ** list -- value is a whitespace-separated list
# ** int -- integer
# ** str -- [explicit string conversion]
@@ -23,14 +21,13 @@
# (pwd + path)
# ** fs_dir -- fs_abs and value must be a dir if it exists
# ** fs_file -- fs_abs and value must be a file if it exists
-# TODO** fs_prog -- fs_file (and fs_path) and value must be executable (TODO)
# ** regex -- value is a regex and will be compiled (re.compile(..))
#
# multiple types are generally not supported ('this is an int or a str'),
# but subtypes are ('list of yesno'), which can be specified by either
# using a list of types ['list', 'yesno'] or by separating the types
# with a colon 'list:yesno', which is parsed in a left-to-right order.
-# Nested subtypes such as list:slist:int:fs_file:list may lead to errors.
+# Nested subtypes such as list:int:fs_file:list may lead to errors.
#
fs_file = 'fs_file'
@@ -173,7 +170,7 @@ CONFIG_ENTRY_MAP = dict (
# == overlay ==
- # FIXME key is not in use
+ # COULDFIX key is not in use
ebuild_header = dict (
value_type = fs_file,
description = '''NOT IN USE.
@@ -312,5 +309,3 @@ def prune_description():
del entry ['description']
elif 'desc' in entry:
del entry ['desc']
-
-
diff --git a/roverlay/config/tree.py b/roverlay/config/tree.py
index dd14fb7..dfc6289 100644
--- a/roverlay/config/tree.py
+++ b/roverlay/config/tree.py
@@ -59,21 +59,16 @@ class ConfigTree ( object ):
# strategy = theirs
# unsafe operation (empty values,...)
- if not _dict:
- pass
+ if _dict and isinstance ( _dict, dict ):
- elif not isinstance ( _dict, dict ):
- raise Exception ( "bad usage" )
+ u = { k : v for ( k, v ) in _dict.items() if v or v == 0 }
+ merge_dict ( self._config, u )
- else:
- if sys.version_info >= ( 2, 7 ):
- u = { k : v for ( k, v ) in _dict.items() if v or v == 0 }
- else:
- # FIXME remove < 2.7 statement, roverlay (probably) doesn't work
- # with python version prior to 2.7
- u = dict ( kv for kv in _dict.items() if kv [1] or kv [1] == 0 )
+ elif not _dict:
+ pass
- merge_dict ( self._config, u )
+ else:
+ raise Exception ( "bad usage" )
# --- end of merge_with (...) ---
next reply other threads:[~2012-08-02 15:15 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-02 15:14 André Erdmann [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-05-30 5:31 [gentoo-commits] proj/R_overlay:master commit in: roverlay/config/ Benda XU
2018-05-28 8:41 Benda XU
2014-08-23 19:03 André Erdmann
2014-08-23 19:03 André Erdmann
2014-04-01 16:38 André Erdmann
2014-04-01 16:38 André Erdmann
2014-04-01 16:38 André Erdmann
2014-01-26 19:06 André Erdmann
2013-09-13 15:10 André Erdmann
2013-09-11 11:14 André Erdmann
2013-09-11 10:30 André Erdmann
2013-09-11 10:27 André Erdmann
2013-09-11 10:27 André Erdmann
2013-09-10 14:40 André Erdmann
2013-09-10 14:40 André Erdmann
2013-09-06 17:27 André Erdmann
2013-09-04 10:16 André Erdmann
2013-08-14 14:56 André Erdmann
2013-08-12 8:18 André Erdmann
2013-08-09 15:27 André Erdmann
2013-08-09 15:27 André Erdmann
2013-08-06 10:58 André Erdmann
2013-08-05 11:44 André Erdmann
2013-08-02 13:39 André Erdmann
2013-07-30 18:40 André Erdmann
2013-07-29 14:56 André Erdmann
2013-07-24 17:45 André Erdmann
2013-07-16 16:36 André Erdmann
2013-07-12 13:57 André Erdmann
2013-07-12 13:57 [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
2013-07-12 13:57 ` [gentoo-commits] proj/R_overlay:master " André Erdmann
2013-07-11 16:29 André Erdmann
2013-07-10 15:10 [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
2013-07-10 16:16 ` [gentoo-commits] proj/R_overlay:master " André Erdmann
2013-06-30 15:58 André Erdmann
2013-06-19 18:59 André Erdmann
2013-06-13 16:34 [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
2013-06-18 14:12 ` [gentoo-commits] proj/R_overlay:master " André Erdmann
2013-06-04 21:06 André Erdmann
2013-02-09 20:45 André Erdmann
2013-02-09 20:45 André Erdmann
2013-02-09 20:45 André Erdmann
2013-01-28 23:54 André Erdmann
2013-01-28 23:54 André Erdmann
2012-08-09 9:26 André Erdmann
2012-08-08 23:46 André Erdmann
2012-08-01 21:10 André Erdmann
2012-07-11 18:43 André Erdmann
2012-07-06 22:19 André Erdmann
2012-07-06 22:19 André Erdmann
2012-07-05 16:00 André Erdmann
2012-07-03 17:48 André Erdmann
2012-06-29 22:48 André Erdmann
2012-06-26 15:42 André Erdmann
2012-06-25 18:19 André Erdmann
2012-06-25 18:19 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=1343919424.37545b5c22386e42805c644bab9c2ea7952ccf17.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