You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
956 B
38 lines
956 B
3 years ago
|
{% calculate comment='#', unbound %}
|
||
|
# vim: set syntax=sh
|
||
|
#
|
||
|
# Copyright 2015 Calculate Ltd. http://www.calculate-linux.org
|
||
|
#
|
||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||
|
# you may not use this file except in compliance with the License.
|
||
|
# You may obtain a copy of the License at
|
||
|
#
|
||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||
|
|
||
|
|
||
|
update_cache() {
|
||
|
[[ -x /usr/libexec/calculate/cl-pkg-cache ]] &&
|
||
|
/usr/libexec/calculate/cl-pkg-cache
|
||
|
}
|
||
|
|
||
|
calculate_configurable_package() {
|
||
|
! [[ -f /var/lib/calculate/calculate-core/cache/merge-setup.list ]] ||
|
||
|
grep ${CATEGORY}/${PN} /var/lib/calculate/calculate-core/cache/merge-setup.list &>/dev/null
|
||
|
}
|
||
|
|
||
|
if [[ ${EBUILD_PHASE} == "setup" ]]
|
||
|
then
|
||
|
if tail -5 /var/log/emerge.log | grep -P "\(1 of.*${CATEGORY}/${P}" &>/dev/null
|
||
|
then
|
||
|
update_cache
|
||
|
fi
|
||
|
fi
|
||
|
|
||
|
if [[ ${EBUILD_PHASE} == "postrm" ]]
|
||
|
then
|
||
|
if tail -2 /var/log/emerge.log | grep "*** emerge " &>/dev/null
|
||
|
then
|
||
|
update_cache
|
||
|
fi
|
||
|
fi
|