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
5dbc85e8
Commit
5dbc85e8
authored
Aug 24, 2012
by
Seth Vidal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix up local_nvra
parent
150a47c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
library/yum
+5
-1
No files found.
library/yum
View file @
5dbc85e8
...
@@ -188,7 +188,7 @@ def local_nvra(path):
...
@@ -188,7 +188,7 @@ def local_nvra(path):
"""return nvra of a local rpm passed in"""
"""return nvra of a local rpm passed in"""
cmd
=
[
'/bin/rpm'
,
'-qp'
,
'--qf'
,
cmd
=
[
'/bin/rpm'
,
'-qp'
,
'--qf'
,
'
%
%
{name}-
%%
{version}-
%%
{release}.
%
%
{arch}
\n
'
,
path
]
'
%
{name}-
%
{version}-
%
{release}.
%
{arch}
\n
'
,
path
]
rc
,
out
,
err
=
run
(
cmd
)
rc
,
out
,
err
=
run
(
cmd
)
if
rc
!=
0
:
if
rc
!=
0
:
return
None
return
None
...
@@ -285,6 +285,10 @@ def install(module, items, repoq, yum_basecmd, conf_file):
...
@@ -285,6 +285,10 @@ def install(module, items, repoq, yum_basecmd, conf_file):
# localpkg
# localpkg
if
spec
.
endswith
(
'.rpm'
):
if
spec
.
endswith
(
'.rpm'
):
# get the pkg name-v-r.arch
# get the pkg name-v-r.arch
if
not
os
.
path
.
exists
(
spec
):
res
[
'msg'
]
+=
"No Package file matching '
%
s' found on system"
%
spec
module
.
fail_json
(
**
res
)
nvra
=
local_nvra
(
spec
)
nvra
=
local_nvra
(
spec
)
# look for them in the rpmdb
# look for them in the rpmdb
if
is_installed
(
repoq
,
nvra
,
conf_file
):
if
is_installed
(
repoq
,
nvra
,
conf_file
):
...
...
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