From 2f1bc2aea63a95fc23cd1659d4312f982b956ed2 Mon Sep 17 00:00:00 2001 From: "Tom G. Christensen" Date: Sat, 10 Oct 2009 09:58:32 +0000 Subject: [PATCH] If a ChangeLog exists then append it to relnotes --- buildpkg.packaging.irix | 13 +++++++++++++ buildpkg.packaging.solaris | 14 ++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/buildpkg.packaging.irix b/buildpkg.packaging.irix index 1a0f635..1123d99 100644 --- a/buildpkg.packaging.irix +++ b/buildpkg.packaging.irix @@ -1115,6 +1115,19 @@ auto_rel() -e "s;%%ENVIRONMENT%%;${extracted_env};g" \ -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}$" ]; then + echo "autorel: WARNING: Did not find ChangeLog entry for ${version}-${pkgver}!" + fi + echo >> "$relmetadir/${topdir}.txt" + cat $metadir/ChangeLog >> "$relmetadir/${topdir}.txt" + else + echo "auto_rel: WARNING: ChangeLog is missing!" + fi } # auto_dir(): Make sure all necessary dir entries are in prototype diff --git a/buildpkg.packaging.solaris b/buildpkg.packaging.solaris index 041b2a1..ecf2e9a 100644 --- a/buildpkg.packaging.solaris +++ b/buildpkg.packaging.solaris @@ -426,6 +426,19 @@ 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}$" ]; then + echo "autorel: WARNING: Did not find ChangeLog entry for ${version}-${pkgver}!" + fi + echo >> "$relmetadir/${secname}.txt" + cat $metadir/ChangeLog >> "$relmetadir/${secname}.txt" + else + echo "auto_rel: WARNING: ChangeLog is missing!" + fi + ### Add the relnotes to the prototype file add_dir $defaultperms $defaultuid $defaultgid "${metaprefix}relnotes" $secname add_proto $defaultperms $defaultuid $defaultgid "${metaprefix}relnotes/$secname-$version-$pkgver" $secname @@ -473,6 +486,7 @@ auto_dir() if [ "$found" -eq 0 ]; then # No match, we must add an entry ddirs="$(echo $ddirs $path_comp)" + ### FIXME defaultperms, defaultuid and defaultgid as essentially uninitialized here! add_dir $defaultperms $defaultuid $defaultgid "$path_comp" $secname # Add dir entry echo "auto_dir: Adding $path_comp for $secname" fi