Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
Project
Project
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nurlan
eepm
Commits
76716ee6
Commit
76716ee6
authored
Feb 12, 2013
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm-simulate: fix for yum without --assumeno
parent
bb8d4242
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
epm-simulate
bin/epm-simulate
+18
-3
No files found.
bin/epm-simulate
View file @
76716ee6
...
@@ -26,6 +26,11 @@ __use_zypper_dry_run()
...
@@ -26,6 +26,11 @@ __use_zypper_dry_run()
a
=
zypper
install
--help
2>&1 |
grep
-q
--
"--dry-run"
&&
echo
"--dry-run"
a
=
zypper
install
--help
2>&1 |
grep
-q
--
"--dry-run"
&&
echo
"--dry-run"
}
}
__use_yum_assumeno
()
{
a
=
yum
--help
2>&1 |
grep
-q
--
"--assumeno"
}
_epm_do_simulate
()
_epm_do_simulate
()
{
{
local
CMD
local
CMD
...
@@ -36,9 +41,19 @@ _epm_do_simulate()
...
@@ -36,9 +41,19 @@ _epm_do_simulate()
CMD
=
"apt-get --simulate install"
CMD
=
"apt-get --simulate install"
;;
;;
yum-rpm
)
yum-rpm
)
LC_ALL
=
C sudocmd yum
--assumeno
install
$filenames
if
__use_yum_assumeno
;
then
# FIXME: check only error output
LC_ALL
=
C sudocmd yum
--assumeno
install
$filenames
LC_ALL
=
C sudocmd yum
--assumeno
install
$filenames
2>&1 |
grep
"^No package"
&&
return
1
# FIXME: check only error output
LC_ALL
=
C sudocmd yum
--assumeno
install
$filenames
2>&1 |
grep
"^No package"
&&
return
1
LC_ALL
=
C sudocmd yum
--assumeno
install
$filenames
2>&1 |
grep
"^Complete!"
&&
return
0
LC_ALL
=
C sudocmd yum
--assumeno
install
$filenames
>
/dev/null 2>&1
||
return
else
LC_ALL
=
C
echo
n | sudocmd yum
install
$filenames
# FIXME: check only error output
LC_ALL
=
C
echo
n | sudocmd yum
install
$filenames
2>&1 |
grep
"^No package"
&&
return
1
LC_ALL
=
C
echo
n | sudocmd yum
install
$filenames
2>&1 |
grep
"^Complete!"
&&
return
0
LC_ALL
=
C
echo
n | sudocmd yum
install
$filenames
>
/dev/null 2>&1
||
return
fi
return
0
;;
return
0
;;
urpm-rpm
)
urpm-rpm
)
CMD
=
"urpmi --test --auto"
CMD
=
"urpmi --test --auto"
...
...
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