Skip to content

Commit

Permalink
- improve PSUF autodetection a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Apr 17, 2012
1 parent 7d45a67 commit a93c093
Showing 1 changed file with 11 additions and 18 deletions.
29 changes: 11 additions & 18 deletions init_buildsystem
Expand Up @@ -724,24 +724,17 @@ else
echo "$GUESSED_DIST" > $BUILD_ROOT/.guessed_dist
test -n "$BUILD_DIST" || BUILD_DIST="$GUESSED_DIST"
DIST_TYPE=`gettype --dist "$BUILD_DIST" --configdir "$BUILD_DIR/configs" --archpath "$BUILD_ARCH"`
if [ -n $DIST_TYPE ]; then
case $DIST_TYPE in
spec)
PSUF=rpm
;;
dsc)
PSUF=deb
;;
*)
PSUF=rpm
test -L $BUILD_TARGET/.init_b_cache/rpms/rpm.rpm || PSUF=deb
;;
esac
else
PSUF=rpm
test -L $BUILD_ROOT/.init_b_cache/rpms/dpkg.deb && PSUF=deb
test -L $BUILD_ROOT/.init_b_cache/rpms/pacman.arch && PSUF=arch
fi
case "$DIST_TYPE" in
spec) PSUF=rpm ;;
dsc) PSUF=deb ;;
arch) PSUF=arch ;;
*)
# auto detect from packages
PSUF=rpm
test -L $BUILD_ROOT/.init_b_cache/rpms/dpkg.deb && PSUF=deb
test -L $BUILD_ROOT/.init_b_cache/rpms/pacman.arch && PSUF=arch
;;
esac
fi

#
Expand Down

0 comments on commit a93c093

Please sign in to comment.