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
1c067845
Commit
1c067845
authored
Feb 01, 2013
by
Seth Vidal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't apply enablerepo's to is_installed() to work around yum-utils/repoquery drift from all things
good and proper
parent
5c26805e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
6 deletions
+23
-6
library/yum
+23
-6
No files found.
library/yum
View file @
1c067845
...
...
@@ -168,6 +168,13 @@ def is_available(module, repoq, pkgspec, conf_file, qf=def_qf, en_repos=[], dis_
return
[
po_to_nevra
(
p
)
for
p
in
pkgs
]
else
:
for
repoid
in
en_repos
:
r_cmd
=
[
'--enablerepo'
,
repoid
]
repoq
.
extend
(
r_cmd
)
for
repoid
in
dis_repos
:
r_cmd
=
[
'--disablerepo'
,
repoid
]
repoq
.
extend
(
r_cmd
)
cmd
=
repoq
+
[
"--qf"
,
qf
,
pkgspec
]
rc
,
out
,
err
=
module
.
run_command
(
cmd
)
...
...
@@ -209,6 +216,14 @@ def is_update(module, repoq, pkgspec, conf_file, qf=def_qf, en_repos=[], dis_rep
return
set
([
po_to_nevra
(
p
)
for
p
in
retpkgs
])
else
:
for
repoid
in
en_repos
:
r_cmd
=
[
'--enablerepo'
,
repoid
]
repoq
.
extend
(
r_cmd
)
for
repoid
in
dis_repos
:
r_cmd
=
[
'--disablerepo'
,
repoid
]
repoq
.
extend
(
r_cmd
)
cmd
=
repoq
+
[
"--pkgnarrow=updates"
,
"--qf"
,
qf
,
pkgspec
]
rc
,
out
,
err
=
module
.
run_command
(
cmd
)
...
...
@@ -247,6 +262,14 @@ def what_provides(module, repoq, req_spec, conf_file, qf=def_qf, en_repos=[], d
else
:
for
repoid
in
en_repos
:
r_cmd
=
[
'--enablerepo'
,
repoid
]
repoq
.
extend
(
r_cmd
)
for
repoid
in
dis_repos
:
r_cmd
=
[
'--disablerepo'
,
repoid
]
repoq
.
extend
(
r_cmd
)
cmd
=
repoq
+
[
"--qf"
,
qf
,
"--whatprovides"
,
req_spec
]
rc
,
out
,
err
=
module
.
run_command
(
cmd
)
cmd
=
repoq
+
[
"--qf"
,
qf
,
req_spec
]
...
...
@@ -539,16 +562,10 @@ def ensure(module, state, pkgspec, conf_file, enablerepo, disablerepo):
r_cmd
=
[
'--enablerepo'
,
repoid
]
yum_basecmd
.
extend
(
r_cmd
)
if
repoq
:
repoq
.
extend
(
r_cmd
)
for
repoid
in
dis_repos
:
r_cmd
=
[
'--disablerepo'
,
repoid
]
yum_basecmd
.
extend
(
r_cmd
)
if
repoq
:
repoq
.
extend
(
r_cmd
)
if
state
in
[
'installed'
,
'present'
,
'latest'
]:
my
=
yum_base
(
conf_file
)
try
:
...
...
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