pyocd / cmsis-pack-manager

A Rust and Python module for handling CMSIS Pack files
Apache License 2.0
27 stars 34 forks source link

Integrate smoothly with other pack repositories #157

Open flit opened 3 years ago

flit commented 3 years ago

Support integration with pack repositories from other tools:

Specifically, enable the features requested in this issue: ARM-software/CMSIS_5#1089.

There may be issues that prevent easy integration, but they should be identified.

fred-r commented 3 years ago

Local repository support:

The idea is to be able to indicate that a pack points to a repository which is not the "CMSIS_PACK_ROOT" repository. The folder we indicate would contain:

So, instead of installing the pack from an archive to CMSIS_PACK_ROOT, I want the pack to point to my local development folder where I can do changes and test them without generating and re-installing a pack each time.

If a pack is already installed for this component it is superseded by my local pack.

Thanks & Regards, Fred

jkrech commented 3 years ago

The way this works today is that there is a package index file in .Local pointing to the location of a pdsc file at the root point of an expanded pack.

$CMSIS_PACK_ROOT/.Local/local_repository.pidx

local_repository.pidx:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<index schemaVersion="1.1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="PackIndex.xsd">
  <vendor>local repository</vendor>
  <url>file://localhost/C:/Users/anyuser/AppData/Local/Arm/Packs</url>
  <timestamp>2021-01-15T10:06:21</timestamp>
  <pindex>
    <pdsc name="MyTestPack" url="file://localhost/C:/mypacks/mytestpack/" vendor="MyVendor" version="0.0.1"/>
  </pindex>
</index>
fred-r commented 3 years ago

Hi,

indeed I update this file directly when I do not want to use the Pack Installer UI and it is working fine.

Thans & Regards, Fred