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
a3f0eb9c
Commit
a3f0eb9c
authored
Jan 14, 2010
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpmbph: support for branches like 5.1 if exists, instead M51
parent
70aa4bb3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
10 deletions
+21
-10
rpmbph
bin/rpmbph
+21
-10
No files found.
bin/rpmbph
View file @
a3f0eb9c
...
...
@@ -318,35 +318,46 @@ if [ "$VENDOR" = "alt" ] ; then
[
-n
"
$SPECDIR
"
]
||
set_specdir
$LISTNAMES
if
is_gear
$SPECDIR
;
then
[
-f
"
$LISTNAMES
"
]
||
fatal
"Run with one spec inside gear repo"
USEBRANCH
=
$MDISTR
SPEC
=
$LISTNAMES
BPSPEC
=
$SPEC
.
$MDISTR
BPSPEC
=
$SPEC
.
$USEBRANCH
# support for without M names
USENUMBRANCH
=
$(
get_altdistr_version
$USEBRANCH
)
if
[
"
$USENUMBRANCH
"
!=
"
$USEBRANCH
"
]
;
then
if
is_exist_branch
$USENUMBRANCH
;
then
echo
"Exists
$USENUMBRANCH
branch, will use it instead
$USEBRANCH
"
USEBRANCH
=
$USENUMBRANCH
fi
fi
[
-f
"
$BPSPEC
"
]
&&
fatal
"File
$BPSPEC
is already exists, check it"
CURBRANCH
=
$(
get_current_branch
)
if
[
"
$CURBRANCH
"
=
"
$
MDISTR
"
]
;
then
fatal
"Run rpmbph in sisyphus
branch, not in backport branch
$MDISTR
"
if
[
"
$CURBRANCH
"
=
"
$
USEBRANCH
"
]
;
then
fatal
"Run rpmbph in sisyphus
or master branch, not in backport branch
$USEBRANCH
"
fi
# Create branch
M??
if not exist yet
if
!
is_exist_branch
$
MDISTR
;
then
git branch
$
MDISTR
# Create branch if not exist yet
if
!
is_exist_branch
$
USEBRANCH
;
then
git branch
$
USEBRANCH
fi
cp
-f
$LISTNAMES
$BPSPEC
altspec_to_local
$BPSPEC
git checkout
$
MDISTR
||
fatal
"Can't checkout branch
$MDISTR
. Use
$BPSPEC
manually or remove it."
git checkout
$
USEBRANCH
||
fatal
"Can't checkout branch
$USEBRANCH
. Use
$BPSPEC
manually or remove it."
git merge
$CURBRANCH
mv
-f
$BPSPEC
$SPEC
# FIXME: Ctrl-\ and q will cancelled less with return error code
if
!
git diff
$
MDISTR
;
then
if
!
git diff
$
USEBRANCH
;
then
#git checkout $SPEC $MDISTR
#git checkout $CURBRANCH
fatal
"User cancelled. You are still in
$
MDISTR
branch with modified spec"
fatal
"User cancelled. You are still in
$
USEBRANCH
branch with modified spec"
fi
git add
$SPEC
if
!
git commit
-a
-m
"backported to
$
MDISTR
by rpmbph script as
$(
get_version
$SPEC
)
-
$(
get_release
$SPEC
)
"
;
then
if
!
git commit
-a
-m
"backported to
$
USEBRANCH
by rpmbph script as
$(
get_version
$SPEC
)
-
$(
get_release
$SPEC
)
"
;
then
#git checkout $CURBRANCH
#fatal "Commit error. You are still in $MDISTR branch with modified and uncommitted spec"
# FIXME: git commit returns error if no commit needed
...
...
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