Browse Source

build/clean: core,plugins only makes sense if packages are there

pull/182/head
Franco Fichtner 8 months ago
parent
commit
f7213f9431
2 changed files with 13 additions and 8 deletions
  1. +9
    -7
      build/clean.sh
  2. +4
    -1
      build/common.sh

+ 9
- 7
build/clean.sh View File

@ -1,6 +1,6 @@
#!/bin/sh
# Copyright (c) 2014-2019 Franco Fichtner <franco@opnsense.org>
# Copyright (c) 2014-2020 Franco Fichtner <franco@opnsense.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -45,9 +45,10 @@ for ARG in ${@}; do
echo ">>> Removing core from packages set"
setup_stage ${STAGEDIR}
setup_base ${STAGEDIR}
extract_packages ${STAGEDIR}
remove_packages ${STAGEDIR} ${PRODUCT_CORES}
bundle_packages ${STAGEDIR} '' core
if extract_packages ${STAGEDIR}; then
remove_packages ${STAGEDIR} ${PRODUCT_CORES}
bundle_packages ${STAGEDIR} '' core
fi
;;
distfiles)
echo ">>> Removing distfiles set"
@ -91,9 +92,10 @@ for ARG in ${@}; do
echo ">>> Removing plugins from packages set"
setup_stage ${STAGEDIR}
setup_base ${STAGEDIR}
extract_packages ${STAGEDIR}
remove_packages ${STAGEDIR} ${PRODUCT_PLUGINS}
bundle_packages ${STAGEDIR} '' plugins
if extract_packages ${STAGEDIR}; then
remove_packages ${STAGEDIR} ${PRODUCT_PLUGINS}
bundle_packages ${STAGEDIR} '' plugins
fi
;;
release)
echo ">>> Removing release set"

+ 4
- 1
build/common.sh View File

@ -1,6 +1,6 @@
#!/bin/sh
# Copyright (c) 2014-2019 Franco Fichtner <franco@opnsense.org>
# Copyright (c) 2014-2020 Franco Fichtner <franco@opnsense.org>
# Copyright (c) 2010-2011 Scott Ullrich <sullrich@gmail.com>
#
# Redistribution and use in source and binary forms, with or without
@ -696,7 +696,10 @@ extract_packages()
PACKAGESET=$(find ${SETSDIR} -name "packages-*-${PRODUCT_FLAVOUR}-${PRODUCT_ARCH}.tar")
if [ -f "${PACKAGESET}" ]; then
tar -C ${BASEDIR}${PACKAGESDIR} -xpf ${PACKAGESET}
return 0
fi
return 1
}
search_packages()

Loading…
Cancel
Save