Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Issue 118 move examples #146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
martacarbone wants to merge 9 commits into main
base: main
Choose a base branch
Loading
from issue_118_move_examples
Draft

Issue 118 move examples #146

martacarbone wants to merge 9 commits into main from issue_118_move_examples

Conversation

@martacarbone
Copy link
Contributor

@martacarbone martacarbone commented Dec 5, 2025
edited
Loading

Motivation

Currently the examples (and other static data) are stored inside the arduino home folder.
Current location: ~/.local/share/arduino-app-cli

This is needed because at some point the arduino-flasher-cli will support keeping user data, by preserving the user partition (where the arduino home folder is mounted). And we cannot keep some static data in the preserved paths, otherwise that data would not match the software version that gets installed in the root partition (which is not preserved).

Change description

/home/arduino/.local/share/arduino-app-cli/assets -> 
/home/arduino/.local/share/arduino-app-cli/examples -> /var/lib/arduino-app-cli/examples
/home/arduino/.local/share/arduino-app-cli/bootloader_burned.flag -> /var/lib/arduino-app-cli/bootloader_burned.flag
/home/arduino/.local/share/arduino-app-cli/properties.msgpack -> /var/lib/arduino-app-cli/properties.msgpack

Additional Notes

dpkg --install handle obsolete .local file deletion for upgrade from a version lower than the current on (0.7.0)
dpkg --remove delete the system files but the configuration files
dpkg --purge remove all packages related files from the system

Test

Test #1

The package status is purged (no file or configurations present on the system)
dpkg --install arduino-app-cli-0.8.0-1_arm64.deb
This is a fresh installation, no old files will be deleted because it is supposed they do no exists.
After the istallation examples are in /var/lib/arduino-app-cli and the application
configuration dir is created in /home/arduino/.config/arduino-app-cli

Test #2

The 0.8.0 package is installed over a previous 0.7.0 installation.
This is an upgrade, old files /home/arduino/.local will be deleted.
dpkg --install arduino-app-cli-0.8.0-1_arm64.deb
After the installation we should have the same results of Test#1

Test #3

dpkg --remove arduino-app-cli
All removed but the configuration file in /home/arduino/.config/arduino-app-cli

Test #4

dpkg --purge arduino-app-cli
All removed, no more trace of the package files in the system.

Reviewer checklist

  • PR addresses a single concern.
  • PR title and description are properly filled.
  • Changes will be merged in main.
  • Changes are covered by tests.
  • Logging is meaningful in case of troubleshooting.

Copy link
Contributor

I would also move the properties.msgpack and the lock file in /var/lib/arduino-app-cli.

Copy link
Contributor

@lucarin91 lucarin91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would split this PR into two:

  1. move .cache and data folders somewhere else
  2. move .local/share/ stuff somewhere else

Copy link
Contributor

I would split this PR into two:

  1. move .cache and data folders somewhere else
  2. move .local/share/ stuff somewhere else

After some internal discussion, we decided to avoid 1. for now and only move .local/share into /var/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@lucarin91 lucarin91 lucarin91 requested changes

Requested changes must be addressed to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Move examples (and other data) out of the Arduino home folder

AltStyle によって変換されたページ (->オリジナル) /