Fix incorrect dependency calculation. (#3783)

In the case when there are more than one pair of brackets,
the regular expression removes the names between the extreme
pair brackets. And dependencies cannot be installed.
Currently, the syntactic analysis of the resulting dependency
string is performed correctly by the installation function itself.
A regular expression is not needed here.
This commit is contained in:
The-going
2022-05-18 08:39:55 +03:00
committed by GitHub
parent cf9ad4ae60
commit 60c31912b5

View File

@@ -357,9 +357,8 @@ create_build_script ()
package_builddeps="$package_builddeps"
if [ -z "\$package_builddeps" ]; then
# Calculate build dependencies by a standard function and
# еxclude special comparison characters like "|" "(>= 9)"
package_builddeps="\$(dpkg-checkbuilddeps |& awk -F":" '{gsub(/[|]|[(].*[)]/, " ", \$0); print \$NF}')"
# Calculate build dependencies by a standard dpkg function
package_builddeps="\$(dpkg-checkbuilddeps |& awk -F":" '{print \$NF}')"
fi
if [[ -n "\${package_builddeps}" ]]; then
install_pkg_deb \${package_builddeps}