xbps-src: always check if build_style is set before checking its value.
This commit is contained in:
parent
2fe805e161
commit
02278e964c
6 changed files with 6 additions and 6 deletions
|
@ -34,7 +34,7 @@ build_src_phase()
|
||||||
[ -z $pkgname -o -z $version ] && return 1
|
[ -z $pkgname -o -z $version ] && return 1
|
||||||
|
|
||||||
# Skip this phase for meta-template style builds.
|
# Skip this phase for meta-template style builds.
|
||||||
[ "$build_style" = "meta-template" ] && return 0
|
[ -m "$build_style" -a "$build_style" = "meta-template" ] && return 0
|
||||||
|
|
||||||
[ ! -d $wrksrc ] && msg_error "unexistent build directory [$wrksrc]\n"
|
[ ! -d $wrksrc ] && msg_error "unexistent build directory [$wrksrc]\n"
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ configure_src_phase()
|
||||||
[ -z $pkgname ] && return 1
|
[ -z $pkgname ] && return 1
|
||||||
|
|
||||||
# Skip this phase for meta-template style builds.
|
# Skip this phase for meta-template style builds.
|
||||||
[ "$build_style" = "meta-template" ] && return 0
|
[ -n "$build_style" -a "$build_style" = "meta-template" ] && return 0
|
||||||
|
|
||||||
cd $wrksrc || msg_error "unexistent build directory [$wrksrc].\n"
|
cd $wrksrc || msg_error "unexistent build directory [$wrksrc].\n"
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ fetch_distfiles()
|
||||||
#
|
#
|
||||||
# There's nothing of interest if we are a meta template.
|
# There's nothing of interest if we are a meta template.
|
||||||
#
|
#
|
||||||
[ "$build_style" = "meta-template" ] && return 0
|
[ -n "$build_style" -a "$build_style" = "meta-template" ] && return 0
|
||||||
|
|
||||||
[ -f "$XBPS_FETCH_DONE" ] && return 0
|
[ -f "$XBPS_FETCH_DONE" ] && return 0
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ xbps_write_metadata_pkg()
|
||||||
xbps_write_metadata_pkg_real
|
xbps_write_metadata_pkg_real
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$build_style" = "meta-template" -a -z "${run_depends}" ]; then
|
if [ -n "$build_style" -a "$build_style" = "meta-template" -a -z "${run_depends}" ]; then
|
||||||
for spkg in ${subpackages}; do
|
for spkg in ${subpackages}; do
|
||||||
if [ -n "${revision}" ]; then
|
if [ -n "${revision}" ]; then
|
||||||
spkgrev="${spkg}-${version}_$revision"
|
spkgrev="${spkg}-${version}_$revision"
|
||||||
|
|
|
@ -75,7 +75,7 @@ stow_pkg_real()
|
||||||
msg_error "cannot stow $pkgname! (permission denied)\n"
|
msg_error "cannot stow $pkgname! (permission denied)\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$build_style" = "meta-template" ]; then
|
if [ -n "$build_style" -a "$build_style" = "meta-template" ]; then
|
||||||
[ ! -d ${DESTDIR} ] && mkdir -p ${DESTDIR}
|
[ ! -d ${DESTDIR} ] && mkdir -p ${DESTDIR}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -245,7 +245,7 @@ prepare_tmpl()
|
||||||
|
|
||||||
REQ_VARS="pkgname version short_desc long_desc"
|
REQ_VARS="pkgname version short_desc long_desc"
|
||||||
|
|
||||||
if [ "$build_style" = "meta-template" ]; then
|
if [ -n "$build_style" -a "$build_style" = "meta-template" ]; then
|
||||||
nofetch=yes
|
nofetch=yes
|
||||||
noextract=yes
|
noextract=yes
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue