Commit 8302b969 authored by Vitaly Lipatov's avatar Vitaly Lipatov

Merge branch 'master' of git.alt:packages/etersoft-build-utils

parents d0959bd7 8e4e0e6d
rpmbph: --define _specdir --define _sourcedir
rpmgp -r git - rpmgp -r git -
%name - %name -
, gear-update , gear-update
......
...@@ -8,9 +8,14 @@ ...@@ -8,9 +8,14 @@
# load common functions, compatible with local and installed script # load common functions, compatible with local and installed script
. `dirname $0`/../share/eterbuild/functions/common . `dirname $0`/../share/eterbuild/functions/common
if [ -f Makefile.in ] ; then if [ -f Makefile ] ; then
DD1=`grep ^TOPOBJDIR Makefile | sed -e "s| ||g"`
DD2=`grep ^top_builddir Makefile | sed -e "s| ||g"`
DD3=`grep ^top_srcdir Makefile | sed -e "s| ||g"`
elif [ -f Makefile.in ] ; then
DD1=`grep ^TOPOBJDIR Makefile.in | sed -e "s| ||g"` DD1=`grep ^TOPOBJDIR Makefile.in | sed -e "s| ||g"`
DD2=`grep ^top_builddir Makefile.in | sed -e "s| ||g"` DD2=`grep ^top_builddir Makefile.in | sed -e "s| ||g"`
DD3=`grep ^top_srcdir Makefile.in | sed -e "s| ||g"`
else else
warning "Can't get topdir from Makefile.in" warning "Can't get topdir from Makefile.in"
fi fi
...@@ -25,6 +30,11 @@ if [ -n "$DD2" ] ; then ...@@ -25,6 +30,11 @@ if [ -n "$DD2" ] ; then
TOPDIR=$top_builddir TOPDIR=$top_builddir
fi fi
if [ -n "$DD3" ] ; then
export $DD3
TOPDIR=$top_srcdir
fi
#test -z "$TOPDIR" && exit 1 #test -z "$TOPDIR" && exit 1
#echo "TOPDIR: $TOPDIR" #echo "TOPDIR: $TOPDIR"
export TOPDIR export TOPDIR
......
...@@ -129,7 +129,7 @@ echo ...@@ -129,7 +129,7 @@ echo
if [ "$RESULT" = "0" -a -n "$TESTINSTALL" ] ; then if [ "$RESULT" = "0" -a -n "$TESTINSTALL" ] ; then
# test install (only for last package in list) # test install (only for last package in list)
# some key for build hasher from scratch # some key for build hasher from scratch
echog "Find binary packages for $LASTPACKAGE ..." echog "Find binary packages for '$(basename $LASTPACKAGE)' in $HASHERDIR/repo/$DEFAULTARCH/RPMS.hasher..."
BINPACKAGES=`get_binpkg_list $HASHERDIR/repo/$DEFAULTARCH/RPMS.hasher $LASTPACKAGE` BINPACKAGES=`get_binpkg_list $HASHERDIR/repo/$DEFAULTARCH/RPMS.hasher $LASTPACKAGE`
test -n "$BINPACKAGES" || fatal "Can't find binary packages for $LASTPACKAGE in `ls -l $HASHERDIR/repo/$DEFAULTARCH/RPMS.hasher`" test -n "$BINPACKAGES" || fatal "Can't find binary packages for $LASTPACKAGE in `ls -l $HASHERDIR/repo/$DEFAULTARCH/RPMS.hasher`"
echo "List: $BINPACKAGES" echo "List: $BINPACKAGES"
......
...@@ -18,7 +18,7 @@ load_mod rpm ...@@ -18,7 +18,7 @@ load_mod rpm
# Start as helper # Start as helper
if [ "$1" = "--helper" ]; then if [ "$1" = "--helper" ]; then
shift shift
cd $RPMDIR/SPECS && rpmbb "$@" cd $RPMTOPDIR/SPECS && rpmbb "$@"
exit $? exit $?
fi fi
...@@ -69,13 +69,13 @@ mygetopts $LISTARGS ...@@ -69,13 +69,13 @@ mygetopts $LISTARGS
mkdir -p "$LOGDIR" mkdir -p "$LOGDIR"
mkdir -p "$RPMDIR/RPMS" mkdir -p "$RPMTOPDIR/RPMS"
test -z "$LISTNAMES" && fatal "Please run with spec(s) name" test -z "$LISTNAMES" && fatal "Please run with spec(s) name"
test -n "$LISTRPMARGS" && echog "Run $RPMBUILD with options: '$LISTRPMARGS'" test -n "$LISTRPMARGS" && echog "Run $RPMBUILD with options: '$LISTRPMARGS'"
# instead cbuild req # instead cbuild req
if [ -n "$BUILDREQ" ] ; then if [ -n "$BUILDREQ" ] ; then
uni_rpmbuild buildreq $LISTNAMES uni_buildreq $LISTNAMES
RET=$? RET=$?
echog "You can run buildreq with -bi param for search a dependences for install section of the package" echog "You can run buildreq with -bi param for search a dependences for install section of the package"
exit $RET exit $RET
...@@ -85,7 +85,7 @@ if [ -n "$BUILDOPT" ] ; then ...@@ -85,7 +85,7 @@ if [ -n "$BUILDOPT" ] ; then
is_alt || fatal "Sorry, only ALT Linux systems support --short-circuit correctly" is_alt || fatal "Sorry, only ALT Linux systems support --short-circuit correctly"
for it in $BUILDOPT for it in $BUILDOPT
do do
uni_rpmbuild $RPMBUILD $LISTNAMES -b$it $LISTRPMARGS --target $DEFAULTARCH --short-circuit uni_rpmbuild $LISTNAMES -b$it $LISTRPMARGS --target $DEFAULTARCH --short-circuit
done done
exit 0 exit 0
fi fi
...@@ -109,7 +109,7 @@ do ...@@ -109,7 +109,7 @@ do
LOGFILE="$LOGDIR/`basename $NAMESRPMIN .src.rpm`$MENVARG.log" LOGFILE="$LOGDIR/`basename $NAMESRPMIN .src.rpm`$MENVARG.log"
echo "Build in native system" >$LOGFILE echo "Build in native system" >$LOGFILE
rm -f $LOGFILE.failed rm -f $LOGFILE.failed
(uni_rpmbuild $RPMBUILD $i -bb $LISTRPMARGS $NODEPS --target $DEFAULTARCH 2>&1 || touch $LOGFILE.failed) | tee -a $LOGFILE (uni_rpmbuild $i -bb $LISTRPMARGS $NODEPS --target $DEFAULTARCH 2>&1 || touch $LOGFILE.failed) | tee -a $LOGFILE
[ -r "$LOGFILE.failed" ] && RET=1 || RET=0 [ -r "$LOGFILE.failed" ] && RET=1 || RET=0
if [ "$RET" = "0" ] ; then if [ "$RET" = "0" ] ; then
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
# load common functions, compatible with local and installed script # load common functions, compatible with local and installed script
. `dirname $0`/../share/eterbuild/functions/common . `dirname $0`/../share/eterbuild/functions/common
load_mod repl load_mod repl rpm
#VENDORVERSION=`distr_vendor -e` #VENDORVERSION=`distr_vendor -e`
DISTRVERSION=`distr_vendor -v` DISTRVERSION=`distr_vendor -v`
...@@ -255,13 +255,17 @@ fi ...@@ -255,13 +255,17 @@ fi
unset MENV MENVARG unset MENV MENVARG
mkdir -p $RPMDIR/SPECS/$MDISTR # handle src.rpm too, LISTBUILT - result src.rpms in SRPMS dir
pack_src_rpm $LISTNAMES
for i in $LISTNAMES ; do export RPMTOPDIR=$RPMDIR/BP
DEST=`basename $i`
cp $i $RPMDIR/SPECS/$MDISTR/$DEST || fatal "Can't copy spec" for i in $LISTBUILT ; do
cd $RPMDIR/SPECS/$MDISTR || fatal "Error" SPKG=$RPMDIR/SRPMS/$i
alt_tolocal $DEST uni_rpminstall $SPKG
cd - SPECNAME=$RPMTOPDIR/SPECS/$(spec_by_srpm $SPKG)
test -r "$SPECNAME" || fatal "Spec $SPECNAME is not found"
rm -f $SPKG
alt_tolocal $SPECNAME
done done
...@@ -110,7 +110,7 @@ if [ -n "$REMOTEBUILD" ] ; then ...@@ -110,7 +110,7 @@ if [ -n "$REMOTEBUILD" ] ; then
echog "==== Copying to build server =====" echog "==== Copying to build server ====="
#echog "It is recommended to rename old version at server for save traffic during rsync" #echog "It is recommended to rename old version at server for save traffic during rsync"
rsync -vay --partial --progress --checksum \ rsync -vay --partial --progress --checksum \
-e ssh $LISTBUILT $BUILDSERVER:/$RPMDIR/SRPMS/ || exit 1 -e ssh $LISTBUILT $BUILDSERVER:/$RPMTOPDIR/SRPMS/ || exit 1
$REMCOM rpmbs --helper $MENVARG $LISTRPMARGS $LISTBUILT $REMCOM rpmbs --helper $MENVARG $LISTRPMARGS $LISTBUILT
exit 0 exit 0
fi fi
...@@ -141,7 +141,7 @@ set_incoming $MENV ...@@ -141,7 +141,7 @@ set_incoming $MENV
if [ -n "${DELETENOW}" ]; then if [ -n "${DELETENOW}" ]; then
echog "Removing from '$RSYNCINCOMING/$INCOMING/'" echog "Removing from '$RSYNCINCOMING/$INCOMING/'"
check_key check_key
cd $RPMDIR/SRPMS cd $RPMTOPDIR/SRPMS
for i in $LISTBUILT ; do for i in $LISTBUILT ; do
> $i > $i
done done
...@@ -174,7 +174,7 @@ check_gear_and_tag() ...@@ -174,7 +174,7 @@ check_gear_and_tag()
if [ -n "$SIGN" ]; then if [ -n "$SIGN" ]; then
release_check $LISTBUILT release_check $LISTBUILT
cd $RPMDIR/SRPMS cd $RPMTOPDIR/SRPMS
if [ -r "$LISTBUILT" ] ; then if [ -r "$LISTBUILT" ] ; then
echo if one spec, check gear echo if one spec, check gear
check_gear_and_tag $SPECDIR check_gear_and_tag $SPECDIR
......
...@@ -86,7 +86,7 @@ if [ -n "$REMOTEBUILD" ] ; then ...@@ -86,7 +86,7 @@ if [ -n "$REMOTEBUILD" ] ; then
echo echo
echog "==== Copying to build server =====" echog "==== Copying to build server ====="
#echog "It is recommended to rename old version at server for save traffic during rsync" #echog "It is recommended to rename old version at server for save traffic during rsync"
cd $RPMDIR/SRPMS && rsync -vay --partial --progress --checksum \ cd $RPMTOPDIR/SRPMS && rsync -vay --partial --progress --checksum \
-e ssh $LISTBUILT $BUILDSERVER:$REMOTERPMDIR/SRPMS/ || fatal "Error with rsync" -e ssh $LISTBUILT $BUILDSERVER:$REMOTERPMDIR/SRPMS/ || fatal "Error with rsync"
ssh -t $BUILDSERVER "cd $REMOTERPMDIR/SRPMS && time myhsh $MENVARG $LISTRPMARGS $LISTBUILT" ssh -t $BUILDSERVER "cd $REMOTERPMDIR/SRPMS && time myhsh $MENVARG $LISTRPMARGS $LISTBUILT"
RESULT=$? RESULT=$?
...@@ -94,7 +94,7 @@ if [ -n "$REMOTEBUILD" ] ; then ...@@ -94,7 +94,7 @@ if [ -n "$REMOTEBUILD" ] ; then
echo "-------------------------------" echo "-------------------------------"
test "$RESULT" = "0" && echog "It was remote build at $BUILDSERVER" || echog "There is error during remote build at $BUILDSERVER" test "$RESULT" = "0" && echog "It was remote build at $BUILDSERVER" || echog "There is error during remote build at $BUILDSERVER"
else else
cd $RPMDIR/SRPMS && time myhsh $MENVARG $LISTRPMARGS $LISTBUILT cd $RPMTOPDIR/SRPMS && time myhsh $MENVARG $LISTRPMARGS $LISTBUILT
RESULT=$? RESULT=$?
date date
echo "-------------------------------" echo "-------------------------------"
......
...@@ -224,7 +224,7 @@ if [ -n "$INSTALLBINARY" ] ; then ...@@ -224,7 +224,7 @@ if [ -n "$INSTALLBINARY" ] ; then
parse_cmd_pre "$@" parse_cmd_pre "$@"
pack_src_rpm $LISTRPMARGS pack_src_rpm $LISTRPMARGS
echog "Running apt-get for install needed packages for $LISTBUILT" echog "Running apt-get for install needed packages for $LISTBUILT"
cd $RPMDIR/SRPMS cd $RPMTOPDIR/SRPMS
# FIXME: ALT Specific # FIXME: ALT Specific
$SUDO apt-get build-dep $LISTBUILT $SUDO apt-get build-dep $LISTBUILT
cd - cd -
...@@ -309,7 +309,7 @@ fi ...@@ -309,7 +309,7 @@ fi
test -z "$SRCRPM" && fatal "Cannon find package for $1" test -z "$SRCRPM" && fatal "Cannon find package for $1"
echog "Try to download $SRCRPM" echog "Try to download $SRCRPM"
test -z ${TRYINST} || { mkdir -p $RPMDIR/SRPMS && cd $RPMDIR/SRPMS ; } test -z ${TRYINST} || { mkdir -p $RPMTOPDIR/SRPMS && cd $RPMTOPDIR/SRPMS ; }
echog "Downloading in $(pwd)" echog "Downloading in $(pwd)"
for i in $REPOSITORY for i in $REPOSITORY
......
...@@ -22,6 +22,8 @@ NICE="nice" ...@@ -22,6 +22,8 @@ NICE="nice"
RPMBUILD=rpmbuild RPMBUILD=rpmbuild
RPMDIR="$HOME/RPM" RPMDIR="$HOME/RPM"
# Can be overrided in the scripts
[ -n "$RPMTOPDIR" ] || RPMTOPDIR="$RPMDIR"
[ -n "$APTCONFBASE" ] || APTCONFBASE=$ETERBUILDETC/apt/apt.conf [ -n "$APTCONFBASE" ] || APTCONFBASE=$ETERBUILDETC/apt/apt.conf
......
...@@ -11,10 +11,11 @@ ...@@ -11,10 +11,11 @@
uni_rpmbuild() uni_rpmbuild()
{ {
local RET=0 local RET=0
local COMMAND=$1 # hack due quotes
# just for fill by something # just for fill by something
local ONEPARAM="-v" local ONEPARAM="-v"
shift local TWOPARAM="-v"
local SPECNAME=$1 local SPECNAME=$1
local SPECDIR=`dirname $SPECNAME` local SPECDIR=`dirname $SPECNAME`
local GEAR=gear local GEAR=gear
...@@ -24,14 +25,9 @@ uni_rpmbuild() ...@@ -24,14 +25,9 @@ uni_rpmbuild()
# FIXME: do not override -v # FIXME: do not override -v
ONEPARAM="--define=_source_payload w9.gzdio" ONEPARAM="--define=_source_payload w9.gzdio"
fi fi
if [ "$COMMAND" = "buildreq" ] ; then if [ -n "$RPMTOPDIR" ] ; then
if is_gear $SPECDIR ; then TWOPARAM="--define=_topdir $RPMTOPDIR"
$NICE $GEARBUILDREQ --commit -- $@ || RET=$?
else
$NICE $COMMAND $@ || RET=$?
fi
return $RET
fi fi
if is_gear $SPECDIR ; then if is_gear $SPECDIR ; then
...@@ -39,16 +35,51 @@ uni_rpmbuild() ...@@ -39,16 +35,51 @@ uni_rpmbuild()
shift # skip spec name shift # skip spec name
[ -n "$SPECDIR" ] && [ "$SPECDIR" != "." ] && warning "Spec is not in git dir" [ -n "$SPECDIR" ] && [ "$SPECDIR" != "." ] && warning "Spec is not in git dir"
if [ "$MENV" = "SS" ] ; then if [ "$MENV" = "SS" ] ; then
$NICE $GEAR --commit --rpmbuild -- $COMMAND "$ONEPARAM" $@ || RET=$? $NICE $GEAR --commit --rpmbuild -- $RPMBUILD "$ONEPARAM" "$TWOPARAM" $@ || RET=$?
else else
fatal "Unsupported now"
# build src.rpm via hasher (on ALT) # build src.rpm via hasher (on ALT)
# $NICE gear-hsh --build-args="-bs" --rpmbuild -- $COMMAND "$ONEPARAM" $@ # $NICE gear-hsh --build-args="-bs" --rpmbuild -- $COMMAND "$ONEPARAM" $@
$NICE $GEAR --hasher -- myhsh --build-prog=$ETERBUILDDIR/functions/rebuild $@ || RET=$? $NICE $GEAR --hasher -- myhsh --build-prog=$ETERBUILDDIR/functions/rebuild $@ || RET=$?
fi fi
else else
$NICE $COMMAND "$ONEPARAM" $@ || RET=$? $NICE $RPMBUILD "$ONEPARAM" "$TWOPARAM" $@ || RET=$?
fi
[ -n "$VERBOSE" ] && echo "Run $RPMBUILD $ONEPARAM $TWOPARAM $@" || :
return $RET
}
uni_buildreq()
{
local RET=0
local SPECNAME=$1
local SPECDIR=`dirname $SPECNAME`
local GEARBUILDREQ=gear-buildreq
if is_gear $SPECDIR ; then
$NICE $GEARBUILDREQ --commit -- $@ || RET=$?
else
$NICE buildreq $@ || RET=$?
fi
return $RET
}
uni_rpminstall()
{
local RET=0
local TWOPARAM="-v"
if [ -n "$RPMTOPDIR" ] ; then
TWOPARAM="--define=_topdir $RPMTOPDIR"
fi fi
[ -n "$VERBOSE" ] && echo "Run $COMMAND $ONEPARAM $@" || :
#if is_gear $SPECDIR ; then
# $NICE $GEARBUILDREQ --commit -- $@ || RET=$?
#else
echo -n "Install package "
rpm -iv "$TWOPARAM" $@ || RET=$?
#fi
return $RET return $RET
} }
...@@ -96,7 +127,6 @@ build_rpms_name() ...@@ -96,7 +127,6 @@ build_rpms_name()
NAMERPMIN=$BASENAME-$VERSION-$RELEASE.$PKGARCH.rpm NAMERPMIN=$BASENAME-$VERSION-$RELEASE.$PKGARCH.rpm
NAMESRPMIN=$BASENAME-$VERSION-$RELEASE.src.rpm NAMESRPMIN=$BASENAME-$VERSION-$RELEASE.src.rpm
#RPMSOURCEDIR=$RPMDIR/SOURCES
RPMSOURCEDIR=`rpm --eval %_sourcedir | subst_namever` RPMSOURCEDIR=`rpm --eval %_sourcedir | subst_namever`
[ -n "$RPMSOURCEDIR" ] || fatal "Can't detect RPM/SOURCES dir" [ -n "$RPMSOURCEDIR" ] || fatal "Can't detect RPM/SOURCES dir"
...@@ -124,7 +154,7 @@ do ...@@ -124,7 +154,7 @@ do
if [ -z ${i/*rpm/} ] ; then if [ -z ${i/*rpm/} ] ; then
# if rpm not spec, guess it is src.rpm # if rpm not spec, guess it is src.rpm
NAMESRPMIN=$i NAMESRPMIN=$(basename $i)
else else
# #
# BASENAME, RELEASE, VERSION, NAMESRPMIN, NAMERPMIN # BASENAME, RELEASE, VERSION, NAMESRPMIN, NAMERPMIN
...@@ -138,16 +168,18 @@ do ...@@ -138,16 +168,18 @@ do
sleep 10 sleep 10
exit 1 exit 1
fi fi
uni_rpmbuild $RPMBUILD $i -bs $ARGS $NODEPS --target $DEFAULTARCH uni_rpmbuild $i -bs $ARGS $NODEPS --target $DEFAULTARCH
else else
echog "Just packing \$NAMESRPMIN" echog "Just packing \$NAMESRPMIN"
uni_rpmbuild $RPMBUILD $i -bs $ARGS $NODEPS --target $DEFAULTARCH || fatal "Error with rpmbuild" uni_rpmbuild $i -bs $ARGS $NODEPS --target $DEFAULTARCH || fatal "Error with rpmbuild"
fi fi
fi fi
if [ -f $RPMDIR/SRPMS/$NAMESRPMIN ] ; then
# Check the package really built
if [ -f $RPMTOPDIR/SRPMS/$NAMESRPMIN ] ; then
LISTBUILT="$LISTBUILT $NAMESRPMIN" LISTBUILT="$LISTBUILT $NAMESRPMIN"
else else
fatal "Can't find '$NAMESRPMIN' in '$RPMDIR/SRPMS'" fatal "Can't find '$NAMESRPMIN' in '$RPMTOPDIR/SRPMS'"
fi fi
done done
# remove extra space before list # remove extra space before list
...@@ -157,12 +189,14 @@ test -z "$LISTBUILT" && fatal "Error: List for build is empty. Check if file is ...@@ -157,12 +189,14 @@ test -z "$LISTBUILT" && fatal "Error: List for build is empty. Check if file is
} }
# build binary package list (1st - repo dir, 2st - pkgname) # build binary package list (1st - repo dir, 2st - pkgname)
# algorithm: list all files in PKGDIR, print packages with our source pkg name
get_binpkg_list() get_binpkg_list()
{ {
local PKGDIR=$1 local PKGDIR=$1
local PKGNAME=$(basename $2)
find "$PKGDIR" ! -name '*\.src\.rpm' -name '*\.rpm' -execdir \ find "$PKGDIR" ! -name '*\.src\.rpm' -name '*\.rpm' -execdir \
rpmquery -p --qf='%{sourcerpm}\t%{name}-%{version}-%{release}.%{arch}.rpm\n' "{}" \; \ rpmquery -p --qf='%{sourcerpm}\t%{name}-%{version}-%{release}.%{arch}.rpm\n' "{}" \; \
| grep "^$2[[:space:]].*" | cut -f2 | xargs -n1 -I "{}" echo "$PKGDIR/{} " | grep "^$PKGNAME[[:space:]].*" | cut -f2 | xargs -n1 -I "{}" echo "$PKGDIR/{} "
} }
drop_pkg_extensions() drop_pkg_extensions()
......
...@@ -163,3 +163,10 @@ add_changelog_helper() ...@@ -163,3 +163,10 @@ add_changelog_helper()
return $R return $R
} }
spec_by_srpm()
{
local PKG=$1
local PKGNAME
PKGNAME=$(rpm -qp --queryformat "%{NAME}" $PKG)
[ -n "$PKGNAME" ] && echo $PKGNAME.spec
}
...@@ -85,4 +85,7 @@ libexpat-devel|expat-devel ...@@ -85,4 +85,7 @@ libexpat-devel|expat-devel
libltdl-devel|libtool-ltdl-devel libltdl-devel|libtool-ltdl-devel
libhal-devel|hal-devel libhal-devel|hal-devel
\ No newline at end of file liblua5-devel|lua-devel
libctemplate-devel|ctemplate-devel
libuuid-devel|uuid-devel
...@@ -4,4 +4,8 @@ ...@@ -4,4 +4,8 @@
. $ETERBUILDDIR/functions/rpm . $ETERBUILDDIR/functions/rpm
HASHERDIR=$HASHERDIR-SS HASHERDIR=$HASHERDIR-SS
get_binpkg_list $HASHERDIR/repo/$DEFAULTARCH/RPMS.hasher asymptote-1.43-alt1.src.rpm
for i in `ls -1 $HASHERDIR/repo/SRPMS.hasher` ; do
echo "get for $i:"
get_binpkg_list $HASHERDIR/repo/$DEFAULTARCH/RPMS.hasher $(basename $i)
done
#!/bin/sh
. `dirname $0`/../share/eterbuild/functions/common
. $ETERBUILDDIR/functions/rpm
install_srpm_package()
{
uni_rpminstall $1
}
pack_srpm_package()
{
LISTNAMES=$1 pack_src_rpm
}
export IGNOREGEAR=1
RPMTOPDIR=$RPMDIR/BP
for i in `ls -1 $RPMDIR/SRPMS` ; do
PKGNAME=$RPMDIR/SRPMS/$i
echo "get for $i:"
install_srpm_package $PKGNAME
SPECNAME=$RPMTOPDIR/SPECS/$(spec_by_srpm $PKGNAME)
echo "spec: $SPECNAME"
pack_srpm_package $SPECNAME
echo Compare $PKGNAME $LISTBUILT
rpmdiff $PKGNAME $RPMTOPDIR/SRPMS/$LISTBUILT
exit 1
done
...@@ -21,11 +21,15 @@ print_usedby() ...@@ -21,11 +21,15 @@ print_usedby()
echo "Required by:" echo "Required by:"
print_list $USEDBY print_list $USEDBY
echo "Second required by:" echo "Second required by:"
print_list `list_wd $USEDBY` for i in `list_wd $USEDBY | sort -u` ; do
# skip repeated
echo $USEDBY | grep -q $i && continue
echo " $i"
done
} }
SPECLIST=`find $RPMDIR/SPECS -type f -name "*.spec"` [ -n "$SPECLIST" ] || SPECLIST=`find $RPMDIR/SPECS -type f -name "*.spec"`
for i in $SPECLIST ; do for i in $SPECLIST ; do
if echo $i | grep -q HELP ; then if echo $i | grep -q HELP ; then
continue continue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment