This reverts commit de2f4cf04d13b24dc56114da1ab63245c5868c34, reversing
changes made to 2c33737bfa3b2e7286ada2f2f7bba57317f2b885.
... | ... |
@@ -63,7 +63,6 @@ Misc changes: |
63 | 63 |
* Fixes for IPv6 addresses in inventory text files |
64 | 64 |
* name of executable can be passed to pip/gem etc, for installing under *different* interpreters |
65 | 65 |
* copy of ./hacking/env-setup added for fish users, ./hacking/env-setup.fish |
66 |
-* openbsd_pkg can handle "flavoured" packages like vim--no_x11 |
|
67 | 66 |
|
68 | 67 |
1.3.4 "Top of the World" (reprise) - October 29, 2013 |
69 | 68 |
|
... | ... |
@@ -52,9 +52,6 @@ EXAMPLES = ''' |
52 | 52 |
|
53 | 53 |
# Make sure nmap is not installed |
54 | 54 |
- openbsd_pkg: name=nmap state=absent |
55 |
- |
|
56 |
-# Make sure vim is installed using no_x11 flavour |
|
57 |
-- openbsd_pkg name=vim--no_x11 state=present |
|
58 | 55 |
''' |
59 | 56 |
|
60 | 57 |
# Function used for executing commands. |
... | ... |
@@ -84,23 +81,13 @@ def get_current_name(name, specific_version, module): |
84 | 84 |
return current_name |
85 | 85 |
|
86 | 86 |
# Function used to find out if a package is currently installed. |
87 |
-# OpenBSD packages can contain "flavours" |
|
88 |
-# For example vim is distributed as a "gtk2": |
|
89 |
-# - vim--gtk2 |
|
90 |
-# and "no_x11" flavour: |
|
91 |
-# - vim--no_x11 |
|
92 | 87 |
def get_package_state(name, specific_version, module): |
93 | 88 |
info_cmd = 'pkg_info -e' |
94 | 89 |
|
95 | 90 |
if specific_version: |
96 | 91 |
syntax = "%s %s" |
97 | 92 |
else: |
98 |
- if "--" in name: |
|
99 |
- (name, flavour) = name.split("--", 1) |
|
100 | 93 |
syntax = "%s %s-*" |
101 |
- if flavour: |
|
102 |
- syntax += "-%s" % (flavour, ) |
|
103 |
- syntax = "%s-" |
|
104 | 94 |
|
105 | 95 |
rc, stdout, stderr = execute_command(syntax % (info_cmd, name), module) |
106 | 96 |
|