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
82fa5177
Commit
82fa5177
authored
Oct 18, 2011
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpmcs: do not replace changelog part
parent
e5d8e68a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
13 deletions
+22
-13
rpmcs
bin/rpmcs
+22
-13
No files found.
bin/rpmcs
View file @
82fa5177
...
...
@@ -115,14 +115,19 @@ else
mygetopts
$LISTARGS
fi
for
i
in
$LISTNAMES
for
SPEC
in
$LISTNAMES
do
if
[
-z
${
i
/*rpm/
}
]
;
then
fatal
"'
$
i
' is not not spec file"
if
[
-z
${
SPEC
/*rpm/
}
]
;
then
fatal
"'
$
SPEC
' is not not spec file"
fi
# Make backup copy
cp
-f
$i
${
i
}
~
||
fatal
"Cannot find spec file '
$i
'"
cp
-f
$SPEC
${
SPEC
}
~
||
fatal
"Cannot find spec file '
$SPEC
'"
# Prepare for fix only before changelog part
i
=
$SPEC
.tmpspecbeforechangelog
cat
$SPEC
|
awk
'BEGIN{desk=0}{if (desk==0) {print}; if(/^%changelog/&&desk==0){desk++}}'
>
$i
cat
$SPEC
|
awk
'BEGIN{desk=0}{if (desk==1) {print}; if(/^%changelog/&&desk==0){desk++}}'
>
$SPEC
.tmpspecchangelog
# Unneeded on ALT
subst
"s|^Prefix:.*
$|
|"
$i
...
...
@@ -158,12 +163,6 @@ do
fi
fi
# if there is no altlinux in changelog yet
if
!
grep
-v
"Packager"
$i
|
grep
"@altlinux"
;
then
echo
"Add changelog with initial build"
add_changelog
$i
-e
"- initial build for ALT Linux Sisyphus"
fi
echog
"cleanup_spec for
$i
..."
cleanup_spec
$i
...
...
@@ -410,8 +409,18 @@ do
#echo ALL: $ALLREPLRULES
# Replace package names in source spec
mv
$i
$i
.old.cs.txt
&&
cat
$i
.old.cs.txt |
\
sed
-r
-e
"
$ALLREPLRULES
"
>
$i
||
mv
$i
.old.cs.txt
$i
rm
-f
$i
.old.cs.txt
sed
-r
-e
"
$ALLREPLRULES
"
<
$i
>
$SPEC
||
{
warning
"Error with replacement"
;
cat
$i
>
$SPEC
;
}
# Restore changelog
cat
$SPEC
.tmpspecchangelog
>>
$SPEC
rm
-f
$i
$SPEC
.tmpspecchangelog
# if there is no altlinux in changelog yet
if
!
grep
-v
"Packager"
$SPEC
|
grep
-q
"@altlinux"
;
then
echo
"Add changelog with initial build"
add_changelog
$SPEC
-e
"- initial build for ALT Linux Sisyphus"
fi
echog
"DONE"
done
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