Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-build-utils
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
korinf
etersoft-build-utils
Commits
88821c56
Commit
88821c56
authored
Jun 28, 2011
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpmcs: fix replace Requires
rpmcs: use last rules for repl.
parent
c3bbfdae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
rpmcs
bin/rpmcs
+11
-3
No files found.
bin/rpmcs
View file @
88821c56
...
...
@@ -33,10 +33,10 @@ toalt_pkgrepl()
s/
\$
//g
s/ |/|/g
s/| /|/g"
for
i
in
$PKGREPLBASE
/pkgrepl.fedora
$PKGREPLBASE
/pkgrepl.
*
;
do
for
i
in
$PKGREPLBASE
/pkgrepl.fedora
$PKGREPLBASE
/pkgrepl.
rpm
$PKGREPLBASE
/pkgrepl.
*
;
do
#echo $i - $1
test
-r
"
$i
"
||
continue
REPLRULE
=
`
grep
-v
"^#"
"
$i
"
2>/dev/null |
grep
--
"
$1
\$
"
|
sed
-e
"
$WARULES
"
|
sed
-e
"s/^
\(
.*
\)
|
\(
.*
\)\$
/
\2
|
\1
/g"
|
head
-n1
`
REPLRULE
=
`
grep
-v
"^#"
"
$i
"
2>/dev/null |
grep
--
"
$1
\$
"
|
sed
-e
"
$WARULES
"
|
sed
-e
"s/^
\(
.*
\)
|
\(
.*
\)\$
/
\2
|
\1
/g"
|
tail
-n1
`
# For broken rule
echo
$REPLRULE
|
grep
"^|"
>
/dev/null
&&
REPLRULE
=
""
echo
$REPLRULE
|
grep
"|
\$
"
>
/dev/null
&&
REPLRULE
=
""
...
...
@@ -366,7 +366,7 @@ do
echog
"DONE"
# TODO use perl -pe
echog
-n
"fix requires..."
echog
-n
"fix
build
requires..."
ALLREPLRULES
=
""
for
n
in
`
print_buildreq
$i
`
;
do
toalt_pkgrepl
$n
&&
ALLREPLRULES
=
"
$ALLREPLRULES
...
...
@@ -374,6 +374,14 @@ do
#echo REPLRULE: $REPLRULE
done
echog
-n
"fix package requires..."
ALLREPLRULES
=
""
for
n
in
`
print_pkgreq
$i
`
;
do
toalt_pkgrepl
$n
&&
ALLREPLRULES
=
"
$ALLREPLRULES
s|(.*Req.*)
$REPLRULE1
|
\1
$REPLRULE2
|g"
&&
test
-n
"
$VERBOSE
"
&&
echo
"Replace '
$REPLRULE1
' with '
$REPLRULE2
'"
#echo REPLRULE: $REPLRULE
done
echog
-n
"fix groups..."
for
n
in
`
print_grpreq
$i
`
;
do
toalt_grprepl
$n
&&
ALLREPLRULES
=
"
$ALLREPLRULES
...
...
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