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
b2aed1a4
Commit
b2aed1a4
authored
Jan 25, 2013
by
Shaun Zinck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pkgin: add stdout to error message when shell commands fail
parent
e9ca9605
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
library/pkgin
+5
-5
No files found.
library/pkgin
View file @
b2aed1a4
...
...
@@ -63,7 +63,7 @@ def query_package(module, name, state="installed"):
if
state
==
"installed"
:
(
rc
,
stdout
,
stderr
)
=
module
.
run_command
(
"
%
s list | grep ^
%
s"
%
(
PKGIN_PATH
,
name
))
rc
,
out
,
err
=
module
.
run_command
(
"
%
s list | grep ^
%
s"
%
(
PKGIN_PATH
,
name
))
if
rc
==
0
:
return
True
...
...
@@ -80,10 +80,10 @@ def remove_packages(module, packages):
if
not
query_package
(
module
,
package
):
continue
module
.
run_command
(
"
%
s -y remove
%
s"
%
(
PKGIN_PATH
,
package
))
rc
,
out
,
err
=
module
.
run_command
(
"
%
s -y remove
%
s"
%
(
PKGIN_PATH
,
package
))
if
query_package
(
module
,
package
):
module
.
fail_json
(
msg
=
"failed to remove
%
s
"
%
(
package
))
module
.
fail_json
(
msg
=
"failed to remove
%
s
:
%
s"
%
(
package
,
out
))
remove_c
+=
1
...
...
@@ -102,10 +102,10 @@ def install_packages(module, packages):
if
query_package
(
module
,
package
):
continue
module
.
run_command
(
"
%
s -y install
%
s"
%
(
PKGIN_PATH
,
package
))
rc
,
out
,
err
=
module
.
run_command
(
"
%
s -y install
%
s"
%
(
PKGIN_PATH
,
package
))
if
not
query_package
(
module
,
package
):
module
.
fail_json
(
msg
=
"failed to install
%
s
"
%
(
package
))
module
.
fail_json
(
msg
=
"failed to install
%
s
:
%
s"
%
(
package
,
out
))
install_c
+=
1
...
...
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