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
11b6e225
Commit
11b6e225
authored
Feb 05, 2010
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpmbph: cleanup, no use too more tabs
parent
26a132a2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
53 deletions
+52
-53
rpmbph
bin/rpmbph
+52
-53
No files found.
bin/rpmbph
View file @
11b6e225
...
...
@@ -313,66 +313,65 @@ fi
[
-n
"
$NOBUILD
"
]
&&
BUILDCOMMAND
=
"
$ETERBUILDBIN
/rpmbs --rmsource --rmspec"
[
-z
"
$BUILDCOMMAND
"
]
&&
BUILDCOMMAND
=
"
$ETERBUILDBIN
/rpmbsh
$GIRARHOST
"
if
[
"
$VENDOR
"
=
"alt"
]
;
then
# run inside gear repo, just create backported spec
# set SPECDIR from LISTNAMES if empty
[
-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
.
$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
# hack about p5, M50 -> p5
if
[
"
$USEBRANCH
"
=
"M50"
]
&&
is_exist_branch p5
;
then
USENUMBRANCH
=
p5
echo
"Exists
$USENUMBRANCH
branch, will use it instead
$USEBRANCH
"
USEBRANCH
=
$USENUMBRANCH
fi
# set SPECDIR from LISTNAMES if empty
[
-n
"
$SPECDIR
"
]
||
set_specdir
$LISTNAMES
# if run for ALT inside gear repo, just create backported spec
if
[
"
$VENDOR
"
=
"alt"
]
&&
is_gear
$SPECDIR
;
then
[
-f
"
$LISTNAMES
"
]
||
fatal
"Run with one spec inside gear repo"
USEBRANCH
=
$MDISTR
SPEC
=
$LISTNAMES
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
# hack about p5, M50 -> p5
if
[
"
$USEBRANCH
"
=
"M50"
]
&&
is_exist_branch p5
;
then
USENUMBRANCH
=
p5
echo
"Exists
$USENUMBRANCH
branch, will use it instead
$USEBRANCH
"
USEBRANCH
=
$USENUMBRANCH
fi
fi
[
-f
"
$BPSPEC
"
]
&&
fatal
"File
$BPSPEC
is already exists, check it"
[
-f
"
$BPSPEC
"
]
&&
fatal
"File
$BPSPEC
is already exists, check it"
CURBRANCH
=
$(
get_current_branch
)
CURBRANCH
=
$(
get_current_branch
)
if
[
"
$CURBRANCH
"
=
"
$USEBRANCH
"
]
;
then
fatal
"Run rpmbph in sisyphus or master branch, not in backport branch
$USEBRANCH
"
fi
if
[
"
$CURBRANCH
"
=
"
$USEBRANCH
"
]
;
then
fatal
"Run rpmbph in sisyphus or master branch, not in backport branch
$USEBRANCH
"
fi
# Create branch if not exist yet
if
!
is_exist_branch
$USEBRANCH
;
then
git branch
$USEBRANCH
fi
# 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
$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
$USEBRANCH
;
then
#git checkout $SPEC $MDISTR
#git checkout $CURBRANCH
fatal
"User cancelled. You are still in
$USEBRANCH
branch with modified spec"
fi
git add
$SPEC
if
!
git_commit_ignore_nothing
-a
-m
"backported to
$USEBRANCH
as
$(
get_version
$SPEC
)
-
$(
get_release
$SPEC
)
(with rpmbph script)"
;
then
#git checkout $CURBRANCH
fatal
"Commit error. You are still in
$MDISTR
branch with modified and uncommitted spec"
fi
[
-n
"
$NOBUILD
"
]
&&
BUILDCOMMAND
=
"
$ETERBUILDBIN
/rpmbs"
$BUILDCOMMAND
$LISTRPMARGS
$REMOTEBUILD
$DISTRARG
$SPEC
||
{
git checkout
$CURBRANCH
;
fatal
"Can't build"
;
}
git checkout
$CURBRANCH
exit
$?
cp
-f
$LISTNAMES
$BPSPEC
altspec_to_local
$BPSPEC
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
$USEBRANCH
;
then
#git checkout $SPEC $MDISTR
#git checkout $CURBRANCH
fatal
"User cancelled. You are still in
$USEBRANCH
branch with modified spec"
fi
git add
$SPEC
if
!
git_commit_ignore_nothing
-a
-m
"backported to
$USEBRANCH
as
$(
get_version
$SPEC
)
-
$(
get_release
$SPEC
)
(with rpmbph script)"
;
then
#git checkout $CURBRANCH
fatal
"Commit error. You are still in
$MDISTR
branch with modified and uncommitted spec"
fi
[
-n
"
$NOBUILD
"
]
&&
BUILDCOMMAND
=
"
$ETERBUILDBIN
/rpmbs
$GIRARHOST
"
$BUILDCOMMAND
$LISTRPMARGS
$REMOTEBUILD
$DISTRARG
$SPEC
||
{
git checkout
$CURBRANCH
;
fatal
"Can't build"
;
}
git checkout
$CURBRANCH
exit
$?
fi
unset
MENV MENVARG
...
...
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