Skip to content

Update Apt Fix#1073

Merged
SteveMicroNova merged 1 commit intomainfrom
UpdateAptFix
Dec 12, 2025
Merged

Update Apt Fix#1073
SteveMicroNova merged 1 commit intomainfrom
UpdateAptFix

Conversation

@SteveMicroNova
Copy link
Contributor

@SteveMicroNova SteveMicroNova commented Dec 9, 2025

What does this change intend to accomplish?

Make the updater check the version the system is running before update and say no if less than 0.4.0
Add --with-apt flag to configure.py

Update imaging directions with config retention to reduce some user pain

Checklist

  • Have you tested your changes and ensured they work?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • If applicable, have you updated the documentation/manual?
  • If applicable, have you updated the CHANGELOG?
  • Does your submission pass linting & tests? You can test on localhost using ./scripts/test

@SteveMicroNova
Copy link
Contributor Author

I'd like to add the --with-apt flag to the deploy script yet but this is what I've achieved today

Comment on lines 1215 to 1225
if "+" in version[2]:
clean_ver = ""
i = 0
while i < len(version[2]):
char = version[2][i]
# When you run the deploy script and have a version numbered like 0.4.9+71ee0f8-UpdateAptFix-dirty, parse 9+71ee0f8-UpdateAptFix-dirty into the non-dirty number
if char != "+":
clean_ver += char
i += 1
else:
version[2] = clean_ver
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm removing this as it's not used or currently useful, but taking note of it since it might be useful in the future

@SteveMicroNova
Copy link
Contributor Author

There are 4 apt packages missing from the archive that make the version lock necessary:

  E: Unable to locate package libopusfile0
  E: Unable to locate package libsystemd-dev
  E: Unable to locate package redis
  E: Unable to locate package udiskie

libopusfile0 is used for LMS
libsystemd-dev is for the support tunnel
redis is for the whole system
udiskie is for mounting external drives for both LMS and the local media stream type

@SteveMicroNova SteveMicroNova marked this pull request as ready for review December 12, 2025 19:21
[tool.poetry]
name = "amplipi"
version = "0.4.9"
version = "0.4.10"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We intend to get a release out as soon as this is merged, I'm saving the time of having to also make another discrete bump version PR

return True
return False

version = str(_check_version('http://0.0.0.0/api').output).replace("\n", "").replace("using: http://0.0.0.0/api", "").replace("version=", "").split(".")
Copy link
Contributor

Choose a reason for hiding this comment

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

This check is fairly fragile and depends on the exact string that the _check_version spits out.

Suggested change
version = str(_check_version('http://0.0.0.0/api').output).replace("\n", "").replace("using: http://0.0.0.0/api", "").replace("version=", "").split(".")
version = str(_check_version('http://0.0.0.0/api').output).split("version=", "")
if len(version) > 1:
version = split(version[1])
else:
version = [0,0,0]

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.21%. Comparing base (7499989) to head (bfa5a26).
⚠️ Report is 88 commits behind head on main.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1073      +/-   ##
==========================================
- Coverage   50.67%   50.21%   -0.46%     
==========================================
  Files          40       41       +1     
  Lines        7154     7362     +208     
==========================================
+ Hits         3625     3697      +72     
- Misses       3529     3665     +136     
Flag Coverage Δ
unittests 50.21% <ø> (-0.46%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Add version gating, apt source list editing to configure.py
Update ethcer docs to use 0.4.8 image
@SteveMicroNova SteveMicroNova merged commit 74623ec into main Dec 12, 2025
3 checks passed
@SteveMicroNova SteveMicroNova deleted the UpdateAptFix branch December 15, 2025 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants