Changeset 809 for dassbuild/trunk/usr


Ignore:
Timestamp:
Dec 14, 2009, 6:04:47 PM (15 years ago)
Author:
joergs
Message:

bugfix: causes errors if a spec file contains more than one Name or Version tag

File:
1 edited

Legend:

Unmodified
Added
Removed
  • dassbuild/trunk/usr/bin/dassbuild.sh

    r808 r809  
    100100    # without parameter, we are in source directory
    101101    SPECFILE=$(ls *.spec | awk '{print $1}')
    102     PACKAGE=$(sed -n -e 's/^Name:\W*//pi' <$SPECFILE)
     102    PACKAGE=$(sed -n -e 's/^Name:\W*//pi' <$SPECFILE | head -n 1)
    103103    # use Version from BUILDSRC,
    104104    # because it has been modified by svn_build_prepare
    105105    BUILDSRC_DIR=${BUILDTEMP}/src/${PACKAGE}
    106     VERSION=$(sed -n -e 's/^Version:\W*//pi' <$BUILDSRC_DIR/$SPECFILE)
     106    VERSION=$(sed -n -e 's/^Version:\W*//pi' <$BUILDSRC_DIR/$SPECFILE | head -n 1)
    107107elif [ -r "$1" ]; then
    108108    # parameter is src.rpm file
     
    157157# fi
    158158
     159# debug
     160#set -x
     161 
    159162# check, if RPM with correct name and version is generated
    160163if [ -z "`find ${BUILD_ROOT}/usr/src/packages/RPMS/ -name \"${PACKAGE}*${VERSION}-*.rpm\" 2>/dev/null`" ]; then
     
    178181if [ $ERROR -ne 0 ]; then
    179182
    180         echo "ERROR while building packet $PACKAGE";
     183        echo "ERROR $ERROR while building packet $PACKAGE";
    181184else
    182185        echo "Build of \"${PACKAGE}\" completed!"
Note: See TracChangeset for help on using the changeset viewer.