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
7863ee48
Commit
7863ee48
authored
Feb 22, 2013
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix option handling: fix install-in-hasher package after rpmbph
parent
e285006a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
16 deletions
+14
-16
myhsh
bin/myhsh
+8
-8
rpmbph
bin/rpmbph
+2
-2
rpmbs
bin/rpmbs
+1
-3
rpmbsh
bin/rpmbsh
+3
-3
No files found.
bin/myhsh
View file @
7863ee48
#!/bin/bash
# 2003-2006, 2008-2010 (c) Etersoft www.etersoft.ru
# 2003-2006, 2008-2010
, 2013
(c) Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
#
...
...
@@ -10,10 +10,11 @@
.
`
dirname
$0
`
/../share/eterbuild/functions/common
load_mod hasher check
TESTINSTALL
=
WITHSTUFF
=
"--with-stuff"
#############################
Usage
=
"Usage:
$name
[-
m -s -u -
i -c -l] src.rpm..."
Usage
=
"Usage:
$name
[-i -c -l] src.rpm..."
function
mygetopts
()
{
name
=
${
0
##*/
}
...
...
@@ -31,18 +32,17 @@ phelp()
}
while
getopts
:h
m
icl opt
;
do
while
getopts
:hicl opt
;
do
case
$opt
in
h
)
phelp
;
exit
0
;;
i
)
TESTINSTALL
=
1
;;
l
)
HASHERARG
=
"
$HASHERARG
--lazy-cleanup"
;;
c
)
WITHSTUFF
=
"--without-stuff"
;;
+?
)
echog
"
$name
: options should not be preceded by a '+'."
1>&2
;
exit
2
;;
# ?) echog "$name: $OPTARG: bad option. Use -h for help." 1>&2 ; exit 2;;
?
)
OPTIND
=
$((
OPTIND-1
))
;
break
;
?
)
OPTIND
=
$((
OPTIND-1
))
;
break
;
esac
done
# remove args that were options
if
[
$#
-gt
0
]
;
then
shift
$((
OPTIND
-
1
))
...
...
@@ -128,11 +128,11 @@ fi
print_list
$LISTBUILTSH
echo
if
[
"
$RESULT
"
=
"0"
-a
-n
"
$TESTINSTALL
"
]
;
then
if
[
"
$RESULT
"
=
"0"
]
&&
[
-n
"
$TESTINSTALL
"
]
;
then
# test install (only for last package in list)
# some key for build hasher from scratch
echog
"Find binary packages for '
$(
basename
$LASTPACKAGE
)
' in
$HASHERDIR
/repo/
$BUILDARCH
/RPMS.hasher..."
BINPACKAGES
=
`
get_binpkg_list
$HASHERDIR
/repo/
$BUILDARCH
/RPMS.hasher
$LASTPACKAGE
|
grep
-v
debuginfo
`
BINPACKAGES
=
`
get_binpkg_list
$HASHERDIR
/repo/
$BUILDARCH
/RPMS.hasher
$LASTPACKAGE
|
estrlist reg_exclude debuginfo -
`
test
-n
"
$BINPACKAGES
"
||
fatal
"Can't find binary packages for
$LASTPACKAGE
in
`
ls
-l
$HASHERDIR
/repo/
$BUILDARCH
/RPMS.hasher
`
"
echo
"List:
$BINPACKAGES
"
echo
...
...
bin/rpmbph
View file @
7863ee48
...
...
@@ -344,11 +344,11 @@ phelp()
}
while
getopts
:hn
ui
vqb: opt
;
do
while
getopts
:hnvqb: opt
;
do
case
$opt
in
h
)
phelp
;
exit
0
;;
n
)
NOBUILD
=
1
;;
u
)
UPLOADARG
=
"-
$opt
"
;;
#
u) UPLOADARG="-$opt" ;;
v
)
VERBOSE
=
1
;;
b
)
BINARYREPONAME
=
$OPTARG
;;
q
)
QUIET
=
1
;;
...
...
bin/rpmbs
View file @
7863ee48
...
...
@@ -60,11 +60,10 @@ phelp()
echog
" -n do not check with sisyphus_check before upload"
echog
" -o create nosrc.rpm package"
echog
" -z create src.rpm with compatible gzip compression (obsoleted)"
# echog " -U - sign package(s) and upload it to Incoming (updates)"
# echog " -d - remove package(s) from SRPMS and Incoming"
}
while
getopts
:hfstcu
U
dnop:a:b:z opt
;
do
while
getopts
:hfstcudnop:a:b:z opt
;
do
case
$opt
in
h
)
phelp
;
exit
0
;;
s
)
SIGN
=
1
;;
...
...
@@ -73,7 +72,6 @@ while getopts :hfstcuUdnop:a:b:z opt; do
# FIXME: handle SIGN separately
c
)
CHECKONLY
=
1
;
SIGN
=
1
;;
u
)
UPLOADNOW
=
1
;
SIGN
=
1
;;
# U) UPLOADNOW=1 ; SIGN=1 ; UPDATES=1 ;;
a
)
UPLOADNOW
=
1
;
SIGN
=
1
;
TASKNUMBER
=
$OPTARG
;;
# see functions/alt:set_binaryrepo() for BINARYREPONAME
b
)
BINARYREPONAME
=
$OPTARG
;;
...
...
bin/rpmbsh
View file @
7863ee48
...
...
@@ -67,20 +67,20 @@ mygetopts $LISTARGS
[
-n
"
$LISTNAMES
"
]
||
fatal
"Run with exists specs as arg"
# Skip for prev. packed src.rpm
if
e
cho
"
$LISTNAMES
"
|
grep
-q
spec
;
then
if
e
strlist has spec
"
$LISTNAMES
"
;
then
# If fail, we already has correct changelog
add_changelog_helper
"- new version"
$LISTNAMES
fi
# We do not not pass args for myhsh here...
# FIXME: не обрабатывает два пропускаемых вместе параметра
pack_src_rpm
$COMMIT
$(
drop_args
"
$LISTRPMARGS
"
s u
U
i c l f
)
pack_src_rpm
$COMMIT
$(
drop_args
"
$LISTRPMARGS
"
s u i c l f
)
if
echo
"
$LISTNAMES
"
|
grep
-q
spec
;
then
set_specdir
$LISTNAMES
fi
docmd
time
$ETERBUILDBIN
/myhsh
$MENVARG
$
LISTRPMARGS
$LISTBUILT
docmd
time
$ETERBUILDBIN
/myhsh
$MENVARG
$
(
drop_args
"
$LISTRPMARGS
"
f u
)
$LISTBUILT
RESULT
=
$?
# remove generated src.rpm
for
i
in
$LISTBUILT
;
do
...
...
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