File tree Expand file tree Collapse file tree 4 files changed +13
-5
lines changed Expand file tree Collapse file tree 4 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,12 @@ while IFS= read -r PACKAGE; do
89
89
curl --silent --show-error --fail -L -z " $PACKAGE_FILE " -o " $PACKAGE_FILE " " $PACKAGE " 2>&1 | indent
90
90
else
91
91
topic " Fetching .debs for $PACKAGE "
92
- apt-get " ${APT_OPTIONS[@]} " -y " ${APT_FORCE_YES[@]} " -d install --reinstall " $PACKAGE " | indent
92
+ # while this is not documented behavior, the Aptfile format technically
93
+ # did allow for multiple packages separated by spaces to be specified
94
+ # on a single line due to how the download command was implemented so we
95
+ # should respect that behavior since users are doing this
96
+ IFS=$' \t ' read -ra PACKAGE_NAMES <<< " $PACKAGE"
97
+ apt-get " ${APT_OPTIONS[@]} " -y " ${APT_FORCE_YES[@]} " -d install --reinstall " ${PACKAGE_NAMES[@]} " | indent
93
98
fi
94
99
done < <( grep --invert-match -e " ^#" -e " ^\s*$" -e " ^:repo:" " ${BUILD_DIR} /Aptfile" )
95
100
Original file line number Diff line number Diff line change @@ -18,9 +18,6 @@ while IFS= read -r line; do
18
18
elif [[ $line == * deb ]]; then
19
19
custom_packages+=(" ${line} " )
20
20
else
21
- # while this is not documented behavior, the Aptfile format technically
22
- # does allow for multiple packages separated by spaces to be specified
23
- # on a single line due to how the download command is implemented
24
21
IFS=$' \t ' read -ra package_names <<< " ${line}"
25
22
for package_name in " ${package_names[@]} " ; do
26
23
packages+=(" ${package_name} " )
Original file line number Diff line number Diff line change 3
3
4
4
# globbed package
5
5
mysql-client-*
6
+
7
+ # multiple packages on single line
8
+ s3cmd wget
Original file line number Diff line number Diff line change @@ -4,8 +4,11 @@ testCompilePackageNames() {
4
4
compile " package-names"
5
5
assertCaptured " Updating apt caches"
6
6
assertCaptured " Fetching .debs for xmlsec1"
7
+ assertCaptured " Fetching .debs for s3cmd wget"
7
8
assertCaptured " Fetching .debs for mysql-client-*"
8
9
assertCaptured " Installing xmlsec1"
10
+ assertCaptured " Installing s3cmd"
11
+ assertCaptured " Installing wget"
9
12
assertCaptured " Installing mysql-client"
10
13
assertCaptured " Installing mysql-client-core"
11
14
assertCaptured " Writing profile script"
@@ -15,7 +18,7 @@ testCompilePackageNames() {
15
18
16
19
testReportPackageNames () {
17
20
report " package-names"
18
- assertCaptured " packages: \" mysql-client-*,xmlsec1\" "
21
+ assertCaptured " packages: \" mysql-client-*,s3cmd,wget, xmlsec1\" "
19
22
assertNotCaptured " custom_packages"
20
23
assertNotCaptured " custom_repositories"
21
24
assertCapturedSuccess
You can’t perform that action at this time.
0 commit comments