diff --git a/buildpkg.functions b/buildpkg.functions index bd65ffd..6c7b586 100644 --- a/buildpkg.functions +++ b/buildpkg.functions @@ -739,6 +739,22 @@ compute_octal() echo $d1$d2$d3$d4 } +# check_changelog(): Verify that the ChangeLog is updated +# params: none +# Verify that the ChangeLog exists and contains an entry for the current +# version of the software +check_changelog() +{ + if [ -r $metadir/ChangeLog ]; then + # See if we can find an entry for this build otherwise complain + if [ -z "$(${__grep} ${version}-${pkgver}$ $metadir/ChangeLog)" ]; then + error $E_MISSING_CHGLOGV check_changelog + fi + else + error $E_MISSING_CHGLOG check_changelog + fi +} + ##################################################### # Define generic functions for different build stages ##################################################### diff --git a/buildpkg.packaging.irix b/buildpkg.packaging.irix index 3ce1fda..3ac83b4 100644 --- a/buildpkg.packaging.irix +++ b/buildpkg.packaging.irix @@ -1128,18 +1128,10 @@ auto_rel() -e "s;%%DEPENDENCIES%%;${deps};g" \ ${rn} > "$relmetadir/${topdir}.txt" - # Add a ChangeLog if it exists - if [ -r $metadir/ChangeLog ]; then - echo "auto_rel: Adding ChangeLog to relnotes" - # See if we can find an entry for this build otherwise complain - if [ -z "$(${__grep} ${version}-${pkgver}$ $metadir/ChangeLog)" ]; then - error $E_MISSING_CHGLOGV auto_rel - fi - echo >> "$relmetadir/${topdir}.txt" - cat $metadir/ChangeLog >> "$relmetadir/${topdir}.txt" - else - error $E_MISSING_CHGLOG auto_rel - fi + # Add a ChangeLog + echo "auto_rel: Adding ChangeLog to relnotes" + echo >> "$relmetadir/${topdir}.txt" + cat $metadir/ChangeLog >> "$relmetadir/${topdir}.txt" } # auto_dir(): Make sure all necessary dir entries are in prototype @@ -1346,6 +1338,11 @@ generic_pack() if [ "$1" == "shortroot" ]; then error $E_ARG_OBSO generic_pack fi + + # Before doing any expensive operations + # check that the ChangeLog is in order + check_changelog + clean meta if [ -d ${stagedir}${prefix}/${_mandir} ]; then diff --git a/buildpkg.packaging.solaris b/buildpkg.packaging.solaris index 2068637..df2695f 100644 --- a/buildpkg.packaging.solaris +++ b/buildpkg.packaging.solaris @@ -426,18 +426,10 @@ auto_rel() -e "s;%%DEPENDENCIES%%;${deps};g" \ ${rn} > "$relmetadir/${secname}.txt" - # Add a ChangeLog if it exists - if [ -r $metadir/ChangeLog ]; then - echo "auto_rel: Adding ChangeLog to relnotes" - # See if we can find an entry for this build otherwise complain - if [ -z "$(${__grep} ${version}-${pkgver}$ $metadir/ChangeLog)" ]; then - error $E_MISSING_CHGLOGV auto_rel - fi - echo >> "$relmetadir/${secname}.txt" - cat $metadir/ChangeLog >> "$relmetadir/${secname}.txt" - else - error $E_MISSING_CHGLOG auto_rel - fi + # Add a ChangeLog + echo "auto_rel: Adding ChangeLog to relnotes" + echo >> "$relmetadir/${secname}.txt" + cat $metadir/ChangeLog >> "$relmetadir/${secname}.txt" ### Add the relnotes to the prototype file add_dir $defaultperms $defaultuid $defaultgid "${metaprefix}relnotes" $secname @@ -952,6 +944,11 @@ generic_pack() if [ "$1" == "shortroot" ]; then error $E_ARG_OBSO generic_pack fi + + # Before doing any expensive operations + # check that the ChangeLog is in order + check_changelog + clean meta if [ -d "${stagedir}${topinstalldir}${dir_prefix}/${_mandir}" ]; then setdir ${stagedir}${topinstalldir}${dir_prefix}/${_mandir}