OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Thomas Lotterer
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-tools Date: 12-Oct-2005 21:24:32
Branch: HEAD Handle: 2005101220243100
Modified files:
openpkg-tools/cmd dev.sh
Log:
add capability to wipe out replaced source packages which change
vendor version after branch before release (assumes user has enough
karma on server)
Summary:
Revision Changes Path
1.69 +20 -0 openpkg-tools/cmd/dev.sh
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-tools/cmd/dev.sh
============================================================================
$ cvs diff -u -r1.68 -r1.69 dev.sh
--- openpkg-tools/cmd/dev.sh 12 Oct 2005 19:24:26 -0000 1.68
+++ openpkg-tools/cmd/dev.sh 12 Oct 2005 19:24:31 -0000 1.69
@@ -641,6 +641,7 @@
fi
rpm_release_req=""
upload=""
+ rpmwipe=""
if [ ".${BRANCH}" = .HEAD ]; then
rpm_release_req=`date '+%Y%m%d'`
upload="current/SRC"
@@ -658,6 +659,8 @@
echo "++ detected post-branch pre-release engineering phase
- keep zero update number"
rpm_release_req="${OPMAJORV}.${OPMINORV}.0"
upload="release/${OPMAJORV}.${OPMINORV}/SRC"
+ rpmwipe="${name}-${rpm_version_old}-${rpm_release_old}"
+ [ ".${rpmfile}" = ".${rpmwipe}" ] && rpmwipe=""
else
update=`expr ${update} + 1`
rpm_release_req="${OPMAJORV}.${OPMINORV}.${update}"
@@ -1618,6 +1621,7 @@
bundle=1
bundle_files=""
bundle_srpms=""
+ bundle_wipes=""
bundle_msg=""
if [ -f "${msg}" ]; then
bundle_msg="-F \"${msg}\""
@@ -1721,6 +1725,7 @@
fi
area=`echo ${OPENPKG_DIST}/${upload}/ | sed -e 's;[EMAIL
PROTECTED]:/;OpenPKG ;'`
+ uath=`echo ${OPENPKG_DIST} | sed -e 's;:.*$;;'`
dist=`echo ${OPENPKG_DIST} | sed -e 's;^.*:;;'`
exts="${ext}"
if [ ".${name}" = .openpkg ]; then
@@ -1733,11 +1738,20 @@
echo "++ releasing ${rpmfile}.${ext} to distribution area
${area}"
if [ ${bundle} -eq 1 ]; then
bundle_srpms="${bundle_srpms}
${OPENPKG_WORK}/pkg/src/${rpmfile}.${ext}"
+ if [ ".${rpmwipe}" != . ]; then
+ bundle_wipes="${bundle_wipes}
${OPENPKG_WORK}/pkg/src/${rpmwipe}.${ext}"
+ fi
elif [ ${dry} -eq 0 ]; then
chmod 664 ${OPENPKG_WORK}/pkg/src/${rpmfile}.${ext}
+ if [ ".${rpmwipe}" != . ]; then
+ echo "rm ${dist}/${upload}/${rpmwipe}.${ext}" | sftp
$uath
+ fi
scp -o "Compression no" -o "Cipher blowfish"
"${OPENPKG_WORK}/pkg/src/${rpmfile}.${ext}" "${OPENPKG_DIST}/${upload}/"
else
echo "chmod 664
${OPENPKG_WORK}/pkg/src/${rpmfile}.${ext}"
+ if [ ".${rpmwipe}" != . ]; then
+ echo "echo \"rm
${dist}/${upload}/${rpmwipe}.${ext}\" | sftp $uath"
+ fi
echo "scp -o \"Compression no\" -o \"Cipher blowfish\"
\"${OPENPKG_WORK}/pkg/src/${rpmfile}.${ext}\" \"${OPENPKG_DIST}/${upload}/\""
fi
done
@@ -1846,10 +1860,16 @@
builtin cd "${OPENPKG_WORK}" || die "cannot cd to ${OPENPKG_WORK}"
if [ ${dry} -eq 0 ]; then
chmod 664 ${bundle_srpms}
+ if [ ".${bundle_wipes}" != . ]; then
+ echo "rm ${bundle_wipes}" | sftp $uath
+ fi
scp -o "Compression no" -o "Cipher blowfish" ${bundle_srpms}
${OPENPKG_DIST}/${upload}/
eval "cvs -d ${OPENPKG_REPO} commit ${bundle_msg}
${bundle_files}"
else
echo chmod 664 ${bundle_srpms}
+ if [ ".${bundle_wipes}" != . ]; then
+ echo "echo \"rm ${bundle_wipes}\" | sftp $uath"
+ fi
echo "scp -o \"Compression no\" -o \"Cipher blowfish\"
${bundle_srpms} ${OPENPKG_DIST}/${upload}/"
echo "cvs -d ${OPENPKG_REPO} commit ${bundle_msg}
${bundle_files}"
cvs -d ${OPENPKG_REPO} diff ${bundle_files} |
${cvs_diff_colorize}
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [email protected]