-
Notifications
You must be signed in to change notification settings - Fork 37
Home
- implemented
comps.Langpacks
,comps.Blacklist
andcomps.Whiteout
-
comps.Blacklist
andcomps.Whiteout
iscomps.MDict
class so when you get item from mentioned class instance you get libcomps.StrSeq which is simple string list. When you set item to libcomps.Comps instance, you could use libcomps.StrSeq instance or python list containing only string or unicode objects
-
added missing basearchonly to DocGroupPackage
-
added xml output options
comps.xml_f()
andcomps.xml_str()
are now supporting optional parameter options which is dictionary of xml output options:xml_options = {"empty_groups" = false, "empty_categories" = false, "empty_environments" = false, "empty_langpacks" = false, "empty_blacklist" = false, "empty_whiteout" = false, "empty_packages" = false, "empty_grouplist" = false, "empty_optionlist" = false, "uservisible_explicit" = false, "default_explicit" = false, "gid_default_explicit" = false, "bao_explicit" = false};
not set options are considered as default value. See https://github.com/midnightercz/libcomps/blob/master/libcomps/src/comps_types.c for default xml output options and explanation.
-
alias comps.xml_* as comps.toxml_*
-
added arch filter support
- Libcomps parser is now able to parse attribute
_arch = "arch1 arch2 arch3"
in category, group, environment, packagereq and groupid elements. This attribute contains all architectures where concrete object belongs. After parsing you can call filtered_comps = comps.arch_filter(["arch1", "arch2"]), where filtered_comps will be new libcomps.Comps object will filtered content. Direct access to architectures attribute is not supported yet neighter generating comps.xml with_arch
attribute.
- Libcomps parser is now able to parse attribute
-
New unioning policy Append-Replace-Append. Append-Replace-Append means
- all sub-object from first object is appended to result object
- if some sub-object from second object is same as sub-object in result object - replace sub-object in result object with sub-object from second object
- other sub-objects from second append to result object
-
Dictionaries are now stored in alphabetical order
-
Validity check
- validity check for object's (category, group, environment, package - name instead of id, groupid - name instead of id) id is executed before
libcomps.Sequence.append
andlibcomps.Sequence.set_item()
- in case of category, group, environment validity check for duplicates in lists is executed. This means there cannot be two identical packages/group_ids in objects lists (package_list, option_list, group_ids, ..)
- separate method .validate is also provided for object with validity check
- validity check for object's (category, group, environment, package - name instead of id, groupid - name instead of id) id is executed before
-
Implemented def_options which is defaults values options for COMPS parser and COMPS XML generation
comps.xml_f(fname, def_option={})
,comps.xml_str(def_options={})
comps.fromxml_str(options={})
comps.fromxml_f(fname, options={})
- list of defaults values options can be found here: https://github.com/midnightercz/libcomps/blob/master/libcomps/src/comps_default.h
- default 'defaults' (when you don't explicitly specify def_options argument) is here: https://github.com/midnightercz/libcomps/blob/master/libcomps/src/comps_default.c
-
libcomps.CategoryList, libcomps.EnvList, libcomps.GroupList has now accepting object id in _getitem_ function. Code bellow is now working:
list = libcomps.CategoryList()
list.append(libcomps.Category(id="cat1"))
list.append(libcomps.Category(id="cat2"))
list.append(libcomps.Category(id="cat3"))
cat1 = list["cat1"]
__getitem__(id)
returns first object with specified id in list (unique id in list enforcement planned to future)
- display_order attribute for
libcomps.Group
andlibcomps.Environment
is optional now and won't be included in xml output if wasn't setter before -
libcomps.Group
,libcomps.Category
,libcomps.Environment
won't appear in xml output if don't contain any packages/group_id/option_id -
remove
method added for libcomps sequence types (groups, categories, environments, packages, group_list, option_list). Method remove exact object by reference from list.
-
libcomps.Package
default type is mandatory now and attribute won't appear in xml output if mandatory. - option_list and group_list won't appear in xml output if empty.
- complete C-objects memory management redesign
- PyCOMPS_Dict.get() doesn't throw KeyError exception anymore. Change was made additionaly in https://github.com/midnightercz/libcomps/tree/keyerror-bugfix-0.1.4-3 and merge with master in libcomps-0.1.6 https://github.com/midnightercz/libcomps/commit/a76bbc0f613f16b362584e8ed3f70e584fb9c79e
-
libcomps.GroupId
has 'default' boolean attribute now.
-
libcomps.Dict
has_key method and get() alias added -
libcomps.Package
requires attribute added