Ignore:
Timestamp:
Dec 14, 2009, 2:45:37 PM (15 years ago)
Author:
joergs
Message:

after successful build, copy all RPMs from build environment to target directory. Disadvantages: it may copy outdated/not relevant RPMs to target. Advantage: all resulting RPMs are copied to target. Some source RPMs generate multiple RPMs

File:
1 edited

Legend:

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

    r762 r808  
    152152
    153153mkdir -p ${DEST_DIR}/${BUILD_DIST}
    154 # delete all old versions of this package
    155 for i in ${DEST_DIR}/${BUILD_DIST}/${PACKAGE}-*.rpm; do
    156         if [ -f $i -a ${PACKAGE} = "`rpm -qp --qf "%{NAME}\n" $i`" ]; then
    157                 rm $i
    158         fi
    159 done
    160154
    161 if !(cp -a ${BUILD_ROOT}/usr/src/packages/RPMS/*/${PACKAGE}*${VERSION}-*.*.rpm ${DEST_DIR}/${BUILD_DIST} ); then
    162         ERROR=8
     155# if !(cp -a ${BUILD_ROOT}/usr/src/packages/RPMS/*/${PACKAGE}*${VERSION}-*.*.rpm ${DEST_DIR}/${BUILD_DIST} ); then
     156#       ERROR=8
     157# fi
     158
     159# check, if RPM with correct name and version is generated
     160if [ -z "`find ${BUILD_ROOT}/usr/src/packages/RPMS/ -name \"${PACKAGE}*${VERSION}-*.rpm\" 2>/dev/null`" ]; then
     161    ERROR=8
     162else
     163    # delete all old versions of this package
     164    for i in ${DEST_DIR}/${BUILD_DIST}/${PACKAGE}-*.rpm; do
     165        if [ -f $i -a ${PACKAGE} = "`rpm -qp --qf "%{NAME}\n" $i`" ]; then
     166            rm $i
     167        fi
     168    done
     169
     170    # copy ALL RPMs,
     171    # not only the one, that includes the target name.
     172    # this is done,
     173    # because some source RPMs results the multiple RPMs
     174    find ${BUILD_ROOT}/usr/src/packages/RPMS/ -name "*.rpm" -exec cp -a {} ${DEST_DIR}/${BUILD_DIST} \;
    163175fi
    164176
Note: See TracChangeset for help on using the changeset viewer.