mirror of
https://github.com/archlinux/aur.git
synced 2026-02-06 12:02:21 +01:00
update to v0.2.7
This commit is contained in:
parent
3c767c4511
commit
4f4d6f8268
3 changed files with 137 additions and 15 deletions
22
.SRCINFO
22
.SRCINFO
|
|
@ -1,8 +1,8 @@
|
|||
# Generated by makepkg 5.1.3
|
||||
# Wed Mar 13 21:54:40 UTC 2019
|
||||
# Mon May 27 13:48:07 UTC 2019
|
||||
pkgbase = mitogen
|
||||
pkgdesc = Distributed self-replicating programs in Python
|
||||
pkgver = 0.2.6
|
||||
pkgver = 0.2.7
|
||||
pkgrel = 1
|
||||
url = https://mitogen.readthedocs.io/
|
||||
arch = any
|
||||
|
|
@ -10,12 +10,18 @@ pkgbase = mitogen
|
|||
makedepends = python-setuptools
|
||||
depends = python
|
||||
optdepends = ansible: for using the ansible strategy plugin
|
||||
source = https://github.com/dw/mitogen/archive/v0.2.6.tar.gz
|
||||
md5sums = 80ce1ad816da7c1d872a4b239577b376
|
||||
sha1sums = 055cf847a1896a1b4c7a05c30ab0956836317af6
|
||||
sha256sums = 66d35eb6187f4551158d744d3b83469823846c57f26d13d92f6ee3fb8aa83f33
|
||||
sha384sums = 4ebc9c20e478b75c027d061dad2dba15765a3d82cbb100b81dfacb9debe5636e668d45b5e08f0f8a4e6ac07b61afc464
|
||||
sha512sums = 35b44bf310800c5a22eb4f06133deca0977dea70f1bd564edb092fe9dff3758fcc587e4bca9165143bcf5d4a36de940c6b4e6cd44a78cacbbd707cc1a5a175fe
|
||||
source = https://github.com/dw/mitogen/archive/v0.2.7.tar.gz
|
||||
source = issue587.patch
|
||||
md5sums = b21b4cb198143e7cf98089597e9af237
|
||||
md5sums = bf062429e804d86cfb2d93f4fb8e045f
|
||||
sha1sums = 096ca59a8d5a96f9d579840940ca9edfa0abdcb7
|
||||
sha1sums = 63cab394110c84b27dceed3ed424b3ab7bdc9e69
|
||||
sha256sums = ecc861794577963fc7b703b2fa03a3aff3e02ab94d09d870465413ac7bea9934
|
||||
sha256sums = fb62e672ae12e67b4b895a4867db766c93092b58ef895c6de52904d7b49edacb
|
||||
sha384sums = ffce55e4737b5654fc1990770c10d06a493a9804582fe4f3563ca5f210b5cafb224b702ddf432f32b921f12cfd07465c
|
||||
sha384sums = 0f23ab92f36b578abfcca0d0fb74a50d1d9efc83878cd50009d5e6cac7b9eb5dbd3412184b0bd173f0a2303442193120
|
||||
sha512sums = 463a311b4c4c8285da582f7cb92b322c42107d6b4a906b2dc0221ba7e9620312f9b30ddf718c39d925be7985df9b7e830b1d864e39c758db3e443e83e33ee9e5
|
||||
sha512sums = 0fc09e417de2a2603ae84464515fddd9a67548fdaf15de2ab31961c20bcff61cb64f48142628339e7075667b4670aa7ac79db793dc5dfe86c645ef723bddcb32
|
||||
|
||||
pkgname = mitogen
|
||||
|
||||
|
|
|
|||
26
PKGBUILD
26
PKGBUILD
|
|
@ -1,5 +1,5 @@
|
|||
pkgname=mitogen
|
||||
pkgver=0.2.6
|
||||
pkgver=0.2.7
|
||||
pkgrel=1
|
||||
pkgdesc="Distributed self-replicating programs in Python"
|
||||
license=("BSD")
|
||||
|
|
@ -7,9 +7,16 @@ url="https://mitogen.readthedocs.io/"
|
|||
depends=('python')
|
||||
makedepends=('python-setuptools')
|
||||
optdepends=('ansible: for using the ansible strategy plugin')
|
||||
source=("https://github.com/dw/mitogen/archive/v${pkgver}.tar.gz")
|
||||
source=("https://github.com/dw/mitogen/archive/v${pkgver}.tar.gz"
|
||||
"issue587.patch")
|
||||
arch=('any')
|
||||
|
||||
# branch snapshot fixes incompatibilities with ansible v2.8
|
||||
prepare() {
|
||||
cd "$srcdir/$pkgname-$pkgver"
|
||||
patch -p1 < "$srcdir/issue587.patch"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir/$pkgname-$pkgver"
|
||||
python setup.py build
|
||||
|
|
@ -21,8 +28,13 @@ package() {
|
|||
install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||||
}
|
||||
|
||||
md5sums=('80ce1ad816da7c1d872a4b239577b376')
|
||||
sha1sums=('055cf847a1896a1b4c7a05c30ab0956836317af6')
|
||||
sha256sums=('66d35eb6187f4551158d744d3b83469823846c57f26d13d92f6ee3fb8aa83f33')
|
||||
sha384sums=('4ebc9c20e478b75c027d061dad2dba15765a3d82cbb100b81dfacb9debe5636e668d45b5e08f0f8a4e6ac07b61afc464')
|
||||
sha512sums=('35b44bf310800c5a22eb4f06133deca0977dea70f1bd564edb092fe9dff3758fcc587e4bca9165143bcf5d4a36de940c6b4e6cd44a78cacbbd707cc1a5a175fe')
|
||||
md5sums=('b21b4cb198143e7cf98089597e9af237'
|
||||
'bf062429e804d86cfb2d93f4fb8e045f')
|
||||
sha1sums=('096ca59a8d5a96f9d579840940ca9edfa0abdcb7'
|
||||
'63cab394110c84b27dceed3ed424b3ab7bdc9e69')
|
||||
sha256sums=('ecc861794577963fc7b703b2fa03a3aff3e02ab94d09d870465413ac7bea9934'
|
||||
'fb62e672ae12e67b4b895a4867db766c93092b58ef895c6de52904d7b49edacb')
|
||||
sha384sums=('ffce55e4737b5654fc1990770c10d06a493a9804582fe4f3563ca5f210b5cafb224b702ddf432f32b921f12cfd07465c'
|
||||
'0f23ab92f36b578abfcca0d0fb74a50d1d9efc83878cd50009d5e6cac7b9eb5dbd3412184b0bd173f0a2303442193120')
|
||||
sha512sums=('463a311b4c4c8285da582f7cb92b322c42107d6b4a906b2dc0221ba7e9620312f9b30ddf718c39d925be7985df9b7e830b1d864e39c758db3e443e83e33ee9e5'
|
||||
'0fc09e417de2a2603ae84464515fddd9a67548fdaf15de2ab31961c20bcff61cb64f48142628339e7075667b4670aa7ac79db793dc5dfe86c645ef723bddcb32')
|
||||
|
|
|
|||
104
issue587.patch
Normal file
104
issue587.patch
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
diff --git a/.ci/azure-pipelines.yml b/.ci/azure-pipelines.yml
|
||||
index dc5f716..588a3b8 100644
|
||||
--- a/.ci/azure-pipelines.yml
|
||||
+++ b/.ci/azure-pipelines.yml
|
||||
@@ -87,3 +87,9 @@ jobs:
|
||||
#VER: 2.6.2
|
||||
#DISTROS: debian
|
||||
#STRATEGY: linear
|
||||
+
|
||||
+ Vanilla_280_27:
|
||||
+ python.version: '2.7'
|
||||
+ MODE: ansible
|
||||
+ VER: 2.8.0
|
||||
+ DISTROS: debian
|
||||
diff --git a/ansible_mitogen/strategy.py b/ansible_mitogen/strategy.py
|
||||
index b9211fc..b6b9aaf 100644
|
||||
--- a/ansible_mitogen/strategy.py
|
||||
+++ b/ansible_mitogen/strategy.py
|
||||
@@ -40,9 +40,15 @@ import ansible_mitogen.process
|
||||
import ansible
|
||||
import ansible.executor.process.worker
|
||||
|
||||
+try:
|
||||
+ # 2.8+ has a standardized "unset" object.
|
||||
+ from ansible.utils.sentinel import Sentinel
|
||||
+except ImportError:
|
||||
+ Sentinel = None
|
||||
+
|
||||
|
||||
ANSIBLE_VERSION_MIN = '2.3'
|
||||
-ANSIBLE_VERSION_MAX = '2.7'
|
||||
+ANSIBLE_VERSION_MAX = '2.8'
|
||||
NEW_VERSION_MSG = (
|
||||
"Your Ansible version (%s) is too recent. The most recent version\n"
|
||||
"supported by Mitogen for Ansible is %s.x. Please check the Mitogen\n"
|
||||
@@ -115,7 +121,11 @@ def wrap_action_loader__get(name, *args, **kwargs):
|
||||
This is used instead of static subclassing as it generalizes to third party
|
||||
action modules outside the Ansible tree.
|
||||
"""
|
||||
- klass = action_loader__get(name, class_only=True)
|
||||
+ get_kwargs = {'class_only': True}
|
||||
+ if ansible.__version__ >= '2.8':
|
||||
+ get_kwargs['collection_list'] = kwargs.pop('collection_list', None)
|
||||
+
|
||||
+ klass = action_loader__get(name, **get_kwargs)
|
||||
if klass:
|
||||
bases = (ansible_mitogen.mixins.ActionModuleMixin, klass)
|
||||
adorned_klass = type(str(name), bases, {})
|
||||
@@ -261,14 +271,17 @@ class StrategyMixin(object):
|
||||
name=task.action,
|
||||
mod_type='',
|
||||
)
|
||||
- ansible_mitogen.loaders.connection_loader.get(
|
||||
- name=play_context.connection,
|
||||
- class_only=True,
|
||||
- )
|
||||
ansible_mitogen.loaders.action_loader.get(
|
||||
name=task.action,
|
||||
class_only=True,
|
||||
)
|
||||
+ if play_context.connection is not Sentinel:
|
||||
+ # 2.8 appears to defer computing this until inside the worker.
|
||||
+ # TODO: figure out where it has moved.
|
||||
+ ansible_mitogen.loaders.connection_loader.get(
|
||||
+ name=play_context.connection,
|
||||
+ class_only=True,
|
||||
+ )
|
||||
|
||||
return super(StrategyMixin, self)._queue_task(
|
||||
host=host,
|
||||
diff --git a/ansible_mitogen/transport_config.py b/ansible_mitogen/transport_config.py
|
||||
index ad1cab3..d5f15b1 100644
|
||||
--- a/ansible_mitogen/transport_config.py
|
||||
+++ b/ansible_mitogen/transport_config.py
|
||||
@@ -380,8 +380,9 @@ class PlayContextSpec(Spec):
|
||||
for term in ansible.utils.shlex.shlex_split(
|
||||
first_true((
|
||||
self._play_context.become_flags,
|
||||
- self._play_context.sudo_flags,
|
||||
- # Ansible 2.3.
|
||||
+ # Ansible <=2.7.
|
||||
+ getattr(self._play_context, 'sudo_flags', ''),
|
||||
+ # Ansible <=2.3.
|
||||
getattr(C, 'DEFAULT_BECOME_FLAGS', ''),
|
||||
getattr(C, 'DEFAULT_SUDO_FLAGS', '')
|
||||
), default='')
|
||||
diff --git a/tests/ansible/integration/async/runner_one_job.yml b/tests/ansible/integration/async/runner_one_job.yml
|
||||
index ca798a7..3b14fa3 100644
|
||||
--- a/tests/ansible/integration/async/runner_one_job.yml
|
||||
+++ b/tests/ansible/integration/async/runner_one_job.yml
|
||||
@@ -37,7 +37,12 @@
|
||||
- result1.ansible_job_id == job1.ansible_job_id
|
||||
- result1.attempts <= 100000
|
||||
- result1.changed == True
|
||||
- - result1.cmd == "sleep 1;\n echo alldone"
|
||||
+ - |
|
||||
+ # ansible/b72e989e1837ccad8dcdc926c43ccbc4d8cdfe44
|
||||
+ (ansible_version.full >= '2.8' and
|
||||
+ result1.cmd == "sleep 1;\necho alldone\n") or
|
||||
+ (ansible_version.full < '2.8' and
|
||||
+ result1.cmd == "sleep 1;\n echo alldone")
|
||||
- result1.delta|length == 14
|
||||
- result1.start|length == 26
|
||||
- result1.finished == 1
|
||||
Loading…
Add table
Reference in a new issue