From 8a92bf85d5ee6245e102716f063f702e2bf5252d Mon Sep 17 00:00:00 2001 From: "Tom G. Christensen" Date: Sun, 27 May 2012 11:18:10 +0200 Subject: [PATCH] Fix ChangeLog version check Additionally turn any problem with the ChangeLog into a fatal error. --- buildpkg.functions | 4 ++++ buildpkg.packaging.irix | 6 +++--- buildpkg.packaging.solaris | 6 +++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/buildpkg.functions b/buildpkg.functions index 1706b4d..bd65ffd 100644 --- a/buildpkg.functions +++ b/buildpkg.functions @@ -173,6 +173,8 @@ E_BAD_LIBS=47 E_SVR4_PKG_OVERFLOW=48 E_SVR4_NAME_OVERFLOW=49 E_MISSING_EXE=50 +E_MISSING_CHGLOG=51 +E_MISSING_CHGLOGV=52 error_txt[$E_BAD_FILE]="File not found" error_txt[$E_PATCH_FAILED]="Patch failed" @@ -192,6 +194,8 @@ error_txt[$E_BAD_LIBS]="config.log defines obsolete libraries!" error_txt[$E_SVR4_PKG_OVERFLOW]="PKG field exceeds 9 char limit" error_txt[$E_SVR4_NAME_OVERFLOW]="NAME field exceeds 256 char limit" error_txt[$E_MISSING_EXE]="Executable is missing" +error_txt[$E_MISSING_CHGLOG]="ChangeLog is missing" +error_txt[$E_MISSING_CHGLOGV]="Did not find ChangeLog entry for ${version}-${pkgver}" ##################################################### # Helper functions diff --git a/buildpkg.packaging.irix b/buildpkg.packaging.irix index a8813fb..3ce1fda 100644 --- a/buildpkg.packaging.irix +++ b/buildpkg.packaging.irix @@ -1132,13 +1132,13 @@ auto_rel() 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}$" ]; then - echo "autorel: WARNING: Did not find ChangeLog entry for ${version}-${pkgver}!" + 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 - echo "auto_rel: WARNING: ChangeLog is missing!" + error $E_MISSING_CHGLOG auto_rel fi } diff --git a/buildpkg.packaging.solaris b/buildpkg.packaging.solaris index 575507e..2068637 100644 --- a/buildpkg.packaging.solaris +++ b/buildpkg.packaging.solaris @@ -430,13 +430,13 @@ auto_rel() 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}$" ]; then - echo "autorel: WARNING: Did not find ChangeLog entry for ${version}-${pkgver}!" + 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 - echo "auto_rel: WARNING: ChangeLog is missing!" + error $E_MISSING_CHGLOG auto_rel fi ### Add the relnotes to the prototype file