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.
29 lines
711 B
29 lines
711 B
{% calculate comment='#', unbound %}
|
|
# vim: set syntax=sh
|
|
#
|
|
# Copyright 2020 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
|
|
|
|
calculate_lockfile=/var/calculate/tmp/portage/$CATEGORY/.$PN.calculate_lockfile
|
|
|
|
calculate_lock_setup() {
|
|
if calculate_configurable_package
|
|
then
|
|
flock -x -w 120 $calculate_lockfile true
|
|
fi
|
|
}
|
|
|
|
calculate_unlock_setup() {
|
|
if calculate_configurable_package
|
|
then
|
|
rm $calculate_lockfile
|
|
fi
|
|
}
|
|
|
|
[[ $EBUILD_PHASE == "instprep" ]] && calculate_lock_setup
|