Skip to content

Commit a9e0cbe

Browse files
committed
allow Swift package resolution to be wrapped by recipes
export the Swift package resolution function as do_package_resolve so it can be used conditionally from recipes
1 parent dbd89c4 commit a9e0cbe

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

classes/swift.bbclass

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ def fix_socket_header(filename):
5050
f.write(line)
5151

5252
# Support for SwiftPM fetching packages and their GitHub submodules
53-
do_swift_package_resolve[depends] += "unzip-native:do_populate_sysroot swift-native:do_populate_sysroot"
54-
do_swift_package_resolve[network] = "1"
55-
do_swift_package_resolve[vardepsexclude] = "BB_ORIGENV"
53+
swift_do_package_resolve[depends] += "unzip-native:do_populate_sysroot swift-native:do_populate_sysroot"
54+
swift_do_package_resolve[network] = "1"
55+
swift_do_package_resolve[vardepsexclude] = "BB_ORIGENV"
5656

57-
python do_swift_package_resolve() {
57+
python swift_do_package_resolve() {
5858
import subprocess
5959
import os
6060

@@ -79,7 +79,7 @@ python do_swift_package_resolve() {
7979
bb.fatal('git submodule update failed')
8080
}
8181

82-
addtask swift_package_resolve after do_unpack before do_compile
82+
addtask do_package_resolve after do_unpack before do_compile
8383

8484
python swift_do_configure() {
8585
import os
@@ -205,7 +205,7 @@ python swift_do_configure() {
205205
configJSON.close()
206206
}
207207

208-
# ideally this should be handled by do_swift_package_resolve but doesn't always appear to be the case
208+
# ideally this should be handled by swift_do_package_resolve but doesn't always appear to be the case
209209
do_compile[network] = "1"
210210
swift_do_compile[vardepsexclude] = "BB_ORIGENV"
211211

@@ -266,4 +266,4 @@ do_package_update() {
266266
do_package_update[network] = "1"
267267
addtask do_package_update after do_configure
268268

269-
EXPORT_FUNCTIONS do_configure do_compile do_package_update
269+
EXPORT_FUNCTIONS do_package_resolve do_configure do_compile do_package_update

0 commit comments

Comments
 (0)