@@ -146,13 +146,21 @@ then
146146 exit 1
147147fi
148148
149+ cleanup ()
150+ {
151+ rm -rf " $PKG_REPO_NAME "
152+ if [[ -n $manifest ]]; then
153+ rm -f " $manifest "
154+ fi
155+ }
156+
149157PKG ()
150158{
151159 " $@ "
152160 if [ $? != 0 ]
153161 then
154162 echo Command failed: " $@ "
155- rm -rf " $PKG_REPO_NAME "
163+ cleanup
156164 exit 1
157165 fi
158166}
@@ -169,7 +177,7 @@ eval `pkgsend open ${PKG_NAME}@${version}`
169177if [ $? != 0 ]
170178then
171179 echo " Fatal: could not open ${PKG_NAME} @${version} "
172- rm -rf " $PKR_REPO_NAME "
180+ cleanup
173181 exit 1
174182fi
175183
@@ -244,12 +252,22 @@ PKG pkgsend add depend fmri=pkg:/web/java-servlet/tomcat-8 type=require
244252
245253PKG pkgsend add file dist/source.war mode=0444 owner=webservd group=webservd path=/usr/opengrok/lib/source.war
246254
247- PKG pkgsend add set name=description value=" OpenGrok - wicked fast source browser"
255+ PKG pkgsend add set name=pkg.description value=" OpenGrok - complete install"
256+ PKG pkgsend add set name=pkg.summary value=" OpenGrok - wicked fast source browser"
248257PKG pkgsend add set name=pkg.human-version value=" ${human_readable_version} "
249258PKG pkgsend close
250259
251260PKG pkgrepo -s " $PKG_REPO_NAME " verify
252261
262+ manifest=$( mktemp /tmp/manifest.XXXXXX )
263+ if [[ -z $manifest ]]; then
264+ echo " cannot create temporary file for package manifest"
265+ cleanup
266+ exit 1
267+ fi
268+ PKG pkgrepo -s " $PKG_REPO_NAME " contents ${PKG_NAME} > $manifest
269+ PKG pkglint $manifest
270+
253271# checks whether the same file exists and updates it
254272if [ -f " ${PKG_NAME} -${human_readable_version} .p5p" ]
255273then
@@ -263,7 +281,7 @@ PKG pkgrecv -s "$PKG_REPO_NAME" -a -d "${outfile}" ${PKG_NAME}
263281# cleanup
264282if [ -d " $PKG_REPO_NAME " ]
265283then
266- rm -rf " $PKG_REPO_NAME "
284+ cleanup
267285fi
268286
269287unset PKG_REPO
0 commit comments