New upstream release
Jonathan Carter
5 years ago
0 | 0 |
language: python
|
1 | 1 |
python:
|
2 | 2 |
- 2.7
|
3 | |
- 3.4
|
4 | 3 |
- 3.5
|
5 | 4 |
- 3.6
|
|
5 |
- 3.7
|
|
6 |
matrix: # 3.4 is only available on trusty
|
|
7 |
include:
|
|
8 |
- python: 3.4
|
|
9 |
dist: trusty
|
|
10 |
exclude:
|
|
11 |
- python: 3.4
|
|
12 |
dist: xenial
|
|
13 |
dist: xenial # required for Python 3.7 https://github.com/travis-ci/travis-ci/issues/9815
|
6 | 14 |
services:
|
7 | 15 |
- postgresql
|
8 | 16 |
install:
|
|
0 |
# 3.5.1
|
|
1 |
|
|
2 |
2018-07-08
|
|
3 |
|
|
4 |
* added support for Python 3.7
|
|
5 |
* fixed merged metadata not overwriting atomic() values
|
|
6 |
|
|
7 |
|
0 | 8 |
# 3.5.0
|
1 | 9 |
|
2 | 10 |
2018-06-12
|
0 | 0 |
# -*- coding: utf-8 -*-
|
1 | 1 |
from __future__ import unicode_literals
|
2 | 2 |
|
3 | |
VERSION = (3, 5, 0)
|
|
3 |
VERSION = (3, 5, 1)
|
4 | 4 |
VERSION_STRING = ".".join([str(v) for v in VERSION])
|
138 | 138 |
for raw_pattern in ignore_patterns.split(","):
|
139 | 139 |
if raw_pattern:
|
140 | 140 |
patterns.add(compile_regex(raw_pattern))
|
141 | |
found_something = False
|
142 | 141 |
for identifier, call_count in pristine_repo.vault._call_log.items():
|
143 | 142 |
if call_count == 1:
|
144 | |
ignore = False
|
145 | 143 |
for pattern in patterns:
|
146 | 144 |
if pattern.search(identifier):
|
147 | |
ignore = True
|
148 | 145 |
break
|
149 | |
if not ignore:
|
|
146 |
else:
|
150 | 147 |
io.stderr(_(
|
151 | 148 |
"{x} identifier passed only once to repo.vault.[human_]password_for(): {i}"
|
152 | 149 |
).format(
|
153 | 150 |
i=bold(identifier),
|
154 | 151 |
x=red("✘"),
|
155 | 152 |
))
|
156 | |
found_something = True
|
157 | |
if found_something:
|
158 | |
exit(1)
|
159 | |
else:
|
160 | |
io.stdout(_(
|
161 | |
"{x} all arguments to repo.vault.[human_]password_for() used at least twice"
|
162 | |
).format(x=green("✓")))
|
|
153 |
exit(1)
|
|
154 |
io.stdout(_(
|
|
155 |
"{x} all arguments to repo.vault.[human_]password_for() used at least twice"
|
|
156 |
).format(x=green("✓")))
|
163 | 157 |
|
164 | 158 |
|
165 | 159 |
def test_empty_groups(repo):
|
285 | 285 |
for item_type in item_types:
|
286 | 286 |
block_concurrent = [item_type.ITEM_TYPE_NAME]
|
287 | 287 |
block_concurrent.extend(item_type.block_concurrent(node_os, node_os_version))
|
288 | |
found = False
|
289 | 288 |
for blocked_types in chain_groups:
|
290 | 289 |
for blocked_type in block_concurrent:
|
291 | 290 |
if blocked_type in blocked_types:
|
292 | 291 |
blocked_types.extend(block_concurrent)
|
293 | |
found = True
|
294 | 292 |
break
|
295 | |
if not found:
|
|
293 |
else:
|
296 | 294 |
chain_groups.append(block_concurrent)
|
297 | 295 |
|
298 | 296 |
# daisy-chain all items of the chain group while respecting existing
|
157 | 157 |
result = self.node.run("find {} -maxdepth 1 -print0".format(quote(self.name)))
|
158 | 158 |
for line in result.stdout.split(b"\0"):
|
159 | 159 |
line = line.decode('utf-8')
|
160 | |
found = False
|
161 | 160 |
for item_type in ('directory', 'file', 'symlink'):
|
162 | |
if found:
|
163 | |
break
|
164 | 161 |
for item in self.node.items:
|
165 | 162 |
if (
|
166 | 163 |
item.id == "{}:{}".format(item_type, line) or
|
167 | 164 |
item.id.startswith("{}:{}/".format(item_type, line))
|
168 | 165 |
):
|
169 | |
found = True
|
170 | 166 |
break
|
171 | |
if not found:
|
|
167 |
else:
|
|
168 |
continue
|
|
169 |
break
|
|
170 |
else:
|
172 | 171 |
# this file or directory is not managed
|
173 | 172 |
io.debug((
|
174 | 173 |
"found unmanaged path below {dirpath} on {node}, "
|
187 | 187 |
item classes globally.
|
188 | 188 |
"""
|
189 | 189 |
if not isdir(path):
|
190 | |
raise StopIteration()
|
|
190 |
return
|
191 | 191 |
for filename in listdir(path):
|
192 | 192 |
filepath = join(path, filename)
|
193 | 193 |
if not filename.endswith(".py") or \
|
215 | 215 |
merged = base.copy()
|
216 | 216 |
|
217 | 217 |
for key, value in update.items():
|
218 | |
merge = key in base and not isinstance(value, _Atomic)
|
|
218 |
merge = (
|
|
219 |
key in base and
|
|
220 |
not isinstance(value, _Atomic) and
|
|
221 |
not isinstance(base[key], _Atomic)
|
|
222 |
)
|
219 | 223 |
if merge and isinstance(base[key], dict):
|
220 | 224 |
merged[key] = merge_dict(base[key], value)
|
221 | 225 |
elif (
|
210 | 210 |
if not item._deps:
|
211 | 211 |
items_with_no_incoming_or_outgoing_deps.add(item)
|
212 | 212 |
else:
|
213 | |
found_incoming = False
|
214 | 213 |
for other_item in items:
|
215 | 214 |
if item == other_item:
|
216 | 215 |
continue
|
217 | 216 |
if item.id in other_item._deps:
|
218 | |
found_incoming = True
|
219 | 217 |
break
|
220 | |
if not found_incoming:
|
|
218 |
else:
|
221 | 219 |
items_with_no_incoming_or_outgoing_deps.add(item)
|
222 | 220 |
|
223 | 221 |
filtered_items = list(filter(
|
|
0 |
bundlewrap (3.5.1-1) unstable; urgency=medium
|
|
1 |
|
|
2 |
* New upstream release
|
|
3 |
* Update standards version to 4.2.0
|
|
4 |
|
|
5 |
-- Jonathan Carter <jcc@debian.org> Thu, 02 Aug 2018 16:59:09 +0200
|
|
6 |
|
0 | 7 |
bundlewrap (3.5.0-1) unstable; urgency=medium
|
1 | 8 |
|
2 | 9 |
[ Ondřej Nový ]
|
9 | 9 |
python3-setuptools,
|
10 | 10 |
python3-requests,
|
11 | 11 |
python3-cryptography
|
12 | |
Standards-Version: 4.1.4
|
|
12 |
Standards-Version: 4.2.0
|
13 | 13 |
Homepage: http://bundlewrap.org/
|
14 | 14 |
Vcs-Git: https://salsa.debian.org/python-team/applications/bundlewrap.git
|
15 | 15 |
Vcs-Browser: https://salsa.debian.org/python-team/applications/bundlewrap
|
16 | 16 |
|
17 | 17 |
setup(
|
18 | 18 |
name="bundlewrap",
|
19 | |
version="3.5.0",
|
|
19 |
version="3.5.1",
|
20 | 20 |
description="Config management with Python",
|
21 | 21 |
long_description=(
|
22 | 22 |
"By allowing for easy and low-overhead config management, BundleWrap fills the gap between complex deployments using Chef or Puppet and old school system administration over SSH.\n"
|
|
45 | 45 |
"Programming Language :: Python :: 3.4",
|
46 | 46 |
"Programming Language :: Python :: 3.5",
|
47 | 47 |
"Programming Language :: Python :: 3.6",
|
|
48 |
"Programming Language :: Python :: 3.7",
|
48 | 49 |
"Topic :: System :: Installation/Setup",
|
49 | 50 |
"Topic :: System :: Systems Administration",
|
50 | 51 |
],
|
1 | 1 |
from __future__ import unicode_literals
|
2 | 2 |
|
3 | 3 |
from bundlewrap.utils.dicts import merge_dict
|
4 | |
from bundlewrap.metadata import blame_changed_paths
|
|
4 |
from bundlewrap.metadata import atomic, blame_changed_paths
|
|
5 |
|
|
6 |
|
|
7 |
def test_atomic_no_merge_base():
|
|
8 |
assert merge_dict(
|
|
9 |
{1: atomic([5])},
|
|
10 |
{1: [6, 7]},
|
|
11 |
) == {1: [6, 7]}
|
|
12 |
|
|
13 |
|
|
14 |
def test_atomic_no_merge_update():
|
|
15 |
assert merge_dict(
|
|
16 |
{1: [5]},
|
|
17 |
{1: atomic([6, 7])},
|
|
18 |
) == {1: [6, 7]}
|
5 | 19 |
|
6 | 20 |
|
7 | 21 |
def test_blame_and_merge():
|