Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
08370b3c
Commit
08370b3c
authored
Jun 25, 2014
by
sid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed FreeBSD ports install issue
parent
375edbd0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
library/packaging/portinstall
+5
-6
No files found.
library/packaging/portinstall
View file @
08370b3c
...
...
@@ -99,15 +99,14 @@ def query_package(module, name):
def
matching_packages
(
module
,
name
):
ports_glob_path
=
module
.
get_bin_path
(
'ports_glob'
,
True
)
rc
,
out
,
err
=
module
.
run_command
(
"
%
s
%
s
| wc
"
%
(
ports_glob_path
,
name
))
parts
=
out
.
split
()
occurrences
=
int
(
parts
[
0
]
)
rc
,
out
,
err
=
module
.
run_command
(
"
%
s
%
s"
%
(
ports_glob_path
,
name
))
#counts the numer of packages found
occurrences
=
out
.
count
(
'
\n
'
)
if
occurrences
==
0
:
name_without_digits
=
re
.
sub
(
'[0-9]'
,
''
,
name
)
if
name
!=
name_without_digits
:
rc
,
out
,
err
=
module
.
run_command
(
"
%
s
%
s | wc"
%
(
ports_glob_path
,
name_without_digits
))
parts
=
out
.
split
()
occurrences
=
int
(
parts
[
0
])
rc
,
out
,
err
=
module
.
run_command
(
"
%
s
%
s"
%
(
ports_glob_path
,
name_without_digits
))
occurrences
=
out
.
count
(
'
\n
'
)
return
occurrences
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment