Skip to content

Commit a4a9be8

Browse files
author
Martijn Thé
committed
Merge branch 'fix-new-project-for-tintin-sdks-PBL-42527'
* fix-new-project-for-tintin-sdks-PBL-42527: Skip 'appinfo' option hack for all unparseble versions PBL-42527: Fix `pebble new-project --rocky` not working with "tintin" sdk
2 parents 4ba8185 + e5001bd commit a4a9be8

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

pebble_tool/commands/sdk/create.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,11 @@ def __call__(self, args):
150150
options.append('worker')
151151

152152
# Hack for old SDKs that need an appinfo, because the declarative system can't
153-
# handle "this, but only if not that."
154-
if version_to_key(sdk) < (3, 13, 0):
153+
# handle "this, but only if not that." For "tintin" SDKs and unparseble
154+
# versions, assume this hack is not needed.
155+
version_number = version_to_key(sdk)
156+
if version_number[:5] != (0, 0, 0, 0, 0) and \
157+
version_number < (3, 13, 0):
155158
options.append('appinfo')
156159

157160
with open(extant_path(os.path.join(x, "templates.json") for x in template_paths)) as f:

pebble_tool/sdk/manager.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,9 @@ def make_tintin_sdk(self, path):
240240
os.symlink(os.path.join(build_path, 'qemu_spi_flash.bin'),
241241
os.path.join(pebble_path, platform, 'qemu', 'qemu_spi_flash.bin'))
242242

243+
os.symlink(os.path.join(sdk_path, 'common/'),
244+
os.path.join(pebble_path, 'common'))
245+
243246
with open(os.path.join(dest_path, 'manifest.json'), 'w') as f:
244247
json.dump({
245248
'requirements': [],

0 commit comments

Comments
 (0)