"Detached" state when updating custom platform/package and inability to find custom package

Hello,

I’ve generated a custom platform and package that seem to be compiling for me on our custom board. I think I have the compiler more-or-less figured out, but getting PIO to recognize those packages correctly and pull updates from our GIT repos (hosted on bitbucket) has been especially difficult. In particular, I’ve found I have to manually pull from the repos for code to update. Specifically, attempts to update with pio platform update shows that each of my custom packages are “detached” rather tha “up-to-date”:

Updating commonsense                     @ 0.1.1          [Detached]
Updating tool-jlink                      @ 1.65200.0      [Up-to-date]
Updating toolchain-gccarmnoneeabi        @ 1.70201.0      [Up-to-date]
Updating tool-openocd                    @ 2.1000.190707  [Up-to-date]
Updating framework-cmsis                 @ 1.40500.0      [Up-to-date]
Updating framework-cmsis-atmel           @ 1.2.0          [Up-to-date]
Updating framework-commonsense           @ 0.0.2          [Detached]

I’ll go a bit further into what I have put together up to this point. Logically, I think it’s enough for the builders and compilers, but this project will enough people working on it for good GIT integration to be extremely helpful.

I have a custom platform, whose package repositories includes a link to a manifest file hosted on our repo.

    "packageRepositories": [
    "https://bitbucket.org/path/to/repo/manifest.json",
    "https://dl.bintray.com/platformio/dl-packages/manifest.json",
    "http://dl.platformio.org/packages/manifest.json",
    "https://raw.githubusercontent.com/eerimoq/simba/master/make/platformio/manifest.json"
     ],

And that manifest similarly has information for the specific packages for the custom framework that I’m using to include essential C files and the linker script (which I found could not be cleanly included in the platform due to issues with resolving relative paths).
Manifest.json:

{
  "framework-commonsense": [
    {
        "sha1": "c944f913347596cdbc28ea43bd0111a58fa9e8e5",
        "system": "*",
        "url": "https://bitbucket.org/path/to/repo/framework-commonsense-0.0.1.tar.bz2",
        "version": "0.0.1"
    },
    {
        "sha1": "f859d2a01db666c48afbf26dc57fc988e65c2421",
        "system": "*",
        "url": "https://bitbucket.org/path/to/repo/framework-commonsense-0.0.2.tar.bz2",
        "version": "0.0.2"
    }
  ]
}

And here’s what part of the platform.json looks like:

    "packages": {
        "toolchain-gccarmnoneeabi": {
            "type": "toolchain",
            "version": "~1.70201.0"
        },
        "framework-cmsis": {
            "type": "framework",
            "optional": false,
            "version": "~1.40500.0"
        },
        "framework-cmsis-atmel": {
            "type": "framework",
            "optional": false,
            "version": "~1.2.0"
        },
        "framework-commonsense": {
            "type": "framework", 
            "optional": false,
            "version": ">=0.0.2"
        }
    ]

Just to show that it does include the frameworks that I’m trying to include, the last of which is the custom one. A few other packages are left out for sake of space. I noticed that when I updated the platform.json in the PIO/platform folder to look for framework-commonsense version 0.0.2, it deleted 0.0.1, and said "detected unknown package ‘framework-commonsense’ when I tried to reinstall the platform.

I would appreciate some help better understanding how to make custom packages and getting them to work cleanly with custom platforms. The example on the site was helpful, but left me with many hours of guesswork trying to get my board to compile in the first place (thank god someone from adafruit had already made something for a similar processor).

Thanks!