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
e19e49d2
Commit
e19e49d2
authored
Apr 22, 2016
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpmbph: run rpmbs(h) for all repo together
rpmbph: add autorestore current branch
parent
38fa7fd5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
4 deletions
+27
-4
rpmbph
bin/rpmbph
+27
-4
No files found.
bin/rpmbph
View file @
e19e49d2
...
...
@@ -106,7 +106,7 @@ if [ "$PKGVENDOR" = "alt" ] && is_gear $SPECDIR ; then
for
SPEC
in
$LISTNAMES
;
do
set_specdir
$SPEC
cd
$SPECDIR
||
fatal
docmd
cd
$SPECDIR
||
fatal
# TODO: move branch detection to a separate function
#[ -f "$LISTNAMES" ] || fatal "Run with one spec inside gear repo"
...
...
@@ -130,6 +130,14 @@ if [ "$PKGVENDOR" = "alt" ] && is_gear $SPECDIR ; then
# set branch name
BPSPEC
=
$SPEC
.
$USEBRANCH
CURBRANCH
=
$(
cat
$(
get_root_git_dir
)
/.git/.rpmbph.current 2>/dev/null
)
if
[
-n
"
$CURBRANCH
"
]
;
then
echog
"Autorestore from broken build..."
docmd git checkout
$CURBRANCH
rm
-fv
$(
get_root_git_dir
)
/.git/.rpmbph.current
rm
-fv
$BPSPEC
$BPSPEC
.
*
fi
[
-f
"
$BPSPEC
"
]
&&
fatal
"File
$BPSPEC
is already exists, check it and remove"
cp
-f
$SPEC
$BPSPEC
||
fatal
...
...
@@ -140,6 +148,8 @@ if [ "$PKGVENDOR" = "alt" ] && is_gear $SPECDIR ; then
fatal
"You are already in backported branch
$CURBRANCH
. Run rpmbph in sisyphus or master branch only."
fi
echo
"
$CURBRANCH
"
>
$(
get_root_git_dir
)
/.git/.rpmbph.current
# Create branch if not exist yet
if
!
is_exist_branch
$USEBRANCH
;
then
docmd git branch
$USEBRANCH
...
...
@@ -163,11 +173,24 @@ if [ "$PKGVENDOR" = "alt" ] && is_gear $SPECDIR ; then
#git checkout $CURBRANCH
fatal
"Commit error. You are still in
$CURBRANCH
branch with modified and uncommitted spec file."
fi
docmd
$BUILDCOMMAND
$MENVARG
$LISTRPMARGS
$UPLOADARG
$SPEC
||
{
git checkout
$CURBRANCH
;
fatal
"Can't build"
;
}
docmd git checkout
$CURBRANCH
cd
-
>
/dev/null
done
exit
$?
docmd
$BUILDCOMMAND
$MENVARG
$LISTRPMARGS
$UPLOADARG
$LISTNAMES
RET
=
$?
for
SPEC
in
$LISTNAMES
;
do
set_specdir
$SPEC
docmd
cd
$SPECDIR
||
fatal
CURBRANCH
=
$(
cat
$(
get_root_git_dir
)
/.git/.rpmbph.current
)
rm
-f
$(
get_root_git_dir
)
/.git/.rpmbph.current
docmd git checkout
$CURBRANCH
||
RET
=
$?
cd
-
>
/dev/null
done
exit
$RET
fi
# handle src.rpm and spec both, LISTBUILT - result with full paths to src.rpms
...
...
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