xbps-src: error out ASAP if writing metadata fails for any reason.
This commit is contained in:
parent
a6a63d62fa
commit
05a7a4fabb
1 changed files with 12 additions and 9 deletions
|
@ -402,19 +402,22 @@ _EOF
|
||||||
mv -f $TMPFPLIST ${DESTDIR}/files.plist
|
mv -f $TMPFPLIST ${DESTDIR}/files.plist
|
||||||
mv -f $TMPFPROPS ${DESTDIR}/props.plist
|
mv -f $TMPFPROPS ${DESTDIR}/props.plist
|
||||||
|
|
||||||
{ \
|
$XBPS_PKGDB_CMD sanitize-plist ${DESTDIR}/files.plist || \
|
||||||
$XBPS_PKGDB_CMD sanitize-plist ${DESTDIR}/files.plist; \
|
msg_error "$pkgname: failed to externalize files.plist!\n"
|
||||||
$XBPS_PKGDB_CMD sanitize-plist ${DESTDIR}/props.plist; \
|
$XBPS_PKGDB_CMD sanitize-plist ${DESTDIR}/props.plist || \
|
||||||
chmod 644 ${DESTDIR}/files.plist ${DESTDIR}/props.plist; \
|
msg_error "$pkgname: failed to externalize props.plist!\n"
|
||||||
[ -f $metadir/flist ] && chmod 644 $metadir/flist; \
|
|
||||||
\
|
chmod 644 ${DESTDIR}/files.plist ${DESTDIR}/props.plist
|
||||||
|
[ -f $metadir/flist ] && chmod 644 $metadir/flist
|
||||||
|
|
||||||
#
|
#
|
||||||
# Create the INSTALL/REMOVE scripts if package uses them
|
# Create the INSTALL/REMOVE scripts if package uses them
|
||||||
# or uses any available trigger.
|
# or uses any available trigger.
|
||||||
#
|
#
|
||||||
xbps_write_metadata_scripts_pkg install; \
|
xbps_write_metadata_scripts_pkg install || \
|
||||||
xbps_write_metadata_scripts_pkg remove; \
|
msg_error "$pkgname: failed to write INSTALL metadata file!\n"
|
||||||
} || return $?
|
xbps_write_metadata_scripts_pkg remove || \
|
||||||
|
msg_error "$pkgname: failed to write REMOVE metadata file!\n"
|
||||||
|
|
||||||
msg_normal "$pkgver: successfully created package metadata.\n"
|
msg_normal "$pkgver: successfully created package metadata.\n"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue