Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Javier Cervantes Villanueva
lcgcmake
Commits
7f15d492
Commit
7f15d492
authored
Sep 21, 2015
by
Ivan Razumov
Browse files
Change the way script decides which rpm to copy (in 'reinstall' mode)
parent
90caf860
Changes
1
Hide whitespace changes
Inline
Side-by-side
cdash/copyRPMS.py
View file @
7f15d492
...
@@ -33,7 +33,7 @@ def copyRPMS(localarea, remotearea, target="all", policy="Release"):
...
@@ -33,7 +33,7 @@ def copyRPMS(localarea, remotearea, target="all", policy="Release"):
elif
policy
==
"Rebuild"
:
elif
policy
==
"Rebuild"
:
# force overwriting a single package
# force overwriting a single package
targetname
=
target
.
split
(
"-"
)[
0
].
lower
()
# remove version from <package>-<version> cases like rivet-2.3.0
targetname
=
target
.
split
(
"-"
)[
0
].
lower
()
# remove version from <package>-<version> cases like rivet-2.3.0
rpms_to_copy
=
[
f
for
f
in
newrpms
if
(
targetname
in
f
.
lower
().
split
(
"-"
)[
0
]
)
]
rpms_to_copy
=
[
f
for
f
in
newrpms
if
(
f
.
lower
().
startswith
(
targetname
)
)
]
if
len
(
rpms_to_copy
)
<
1
:
if
len
(
rpms_to_copy
)
<
1
:
print
"ERROR: no RPM for package %s found"
%
target
print
"ERROR: no RPM for package %s found"
%
target
sys
.
exit
(
errno
.
EINVAL
)
sys
.
exit
(
errno
.
EINVAL
)
...
...
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