diff options
author | bill-auger <mr.j.spam.me@gmail.com> | 2017-12-24 20:09:39 -0500 |
---|---|---|
committer | bill-auger <mr.j.spam.me@gmail.com> | 2018-01-01 00:53:50 -0500 |
commit | 795b8df7108a65e836acffb093747b333927dbb8 (patch) | |
tree | 9d9ad2bdaa2558eec845c5888b29cad2b42d9441 /parabolaiso | |
parent | f119f660183875f5e525d263db91347e7a55e45f (diff) |
stash
Diffstat (limited to 'parabolaiso')
-rwxr-xr-x | parabolaiso/mkparabolaiso | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/parabolaiso/mkparabolaiso b/parabolaiso/mkparabolaiso index a7eb760..f13b0ba 100755 --- a/parabolaiso/mkparabolaiso +++ b/parabolaiso/mkparabolaiso @@ -251,7 +251,9 @@ _pacman () _msg_info "Packages installed successfully!" } -# Cache uninstalled packages in offline /isorepo +# Cache uninstalled packages in offline /isorepo and prune un-needed packages packages. +# Optimally, this function should be called only once after all packages are installed +# and even if there are no 'cache-only' packages. _pacman_cache () { _msg_info "Caching packages to '${work_dir}/root-image/'..." @@ -280,10 +282,12 @@ _pacman_cache () popd > /dev/null # download any missing packages - if [[ "${quiet}" = "y" ]]; then - pacman -Sw --root "${work_dir}/root-image" --config "${pacman_conf}" --noconfirm $* &> /dev/null - else - pacman -Sw --root "${work_dir}/root-image" --config "${pacman_conf}" --noconfirm $* + if [[ "${_package_files}" ]]; then + if [[ "${quiet}" = "y" ]]; then + pacman -Sw --root "${work_dir}/root-image" --config "${pacman_conf}" --noconfirm $* &> /dev/null + else + pacman -Sw --root "${work_dir}/root-image" --config "${pacman_conf}" --noconfirm $* + fi fi _chroot_umount @@ -569,7 +573,7 @@ command_install () { if [[ -f "${work_dir}/install.${_pkg_list_hash}" ]]; then _msg_info "These packages are already installed, skipping." else - if [[ "${enable_offline_install}" == 'true' ]]; then + if [[ "${cache_only:-}" == 'true' ]]; then _pacman_cache "${pkg_list}" else _pacman "${pkg_list}" |