From 152a6acd21c2a70d7bf337a5513cf3617a8ab078 Mon Sep 17 00:00:00 2001 From: "Tom G. Christensen" Date: Fri, 14 May 2004 09:33:16 +0000 Subject: [PATCH] Fix a very subtle gotcha in the pkgdef definition. If the last (or only) section in a pkgdef file didn't end with a blank line then the 'section end' actions wouldn't be performed. The 'section end' marker is still a *single* blank line and if there are multiple sections in a pkgdef they *must* be seperated by such a line. --- buildpkg.packaging.solaris | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/buildpkg.packaging.solaris b/buildpkg.packaging.solaris index 285fb60..60ee001 100644 --- a/buildpkg.packaging.solaris +++ b/buildpkg.packaging.solaris @@ -334,6 +334,16 @@ parse_def() ;; esac done < $metadir/pkgdef + # If there is no blank line at the end of a pkgdef section (if there is only one section that is very + # likely) then we end up here without having executed the 'section end' actions (case '' above) + if [ $section -eq 0 ]; then + error $E_BAD_SECTION_END parse_def + else + section=0 # Finished this section + foundfiles=0 # + # Add scripts if requested + add_scripts $secname + fi } # check_unpackaged(): Check if there are unpackaged files in the stage area