Skip to content
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

repo: install package repositories in "arbitrary" paths #80

Merged
merged 2 commits into from
May 29, 2023

Conversation

tigarmo
Copy link
Collaborator

@tigarmo tigarmo commented May 24, 2023

This commit adds a new public function, "install_in_root()", that installs package repositories in a location that contains an Apt-based system, and not the host system. The intention is that eventually said system will be chroot'ed into, at which point an "apt update" will pick up the new repositories.

The motivation is to support package repositories in overlays in Rockcraft.

  • Have you followed the guidelines for contributing?
  • Have you signed the CLA?
  • Have you successfully run tox?

@codecov
Copy link

codecov bot commented May 24, 2023

Codecov Report

Merging #80 (0bae11f) into main (8e238f0) will decrease coverage by 0.31%.
The diff coverage is 75.75%.

❗ Current head 0bae11f differs from pull request most recent head 2673f7a. Consider uploading reports for the commit 2673f7a to get more accurate results

@@            Coverage Diff             @@
##             main      #80      +/-   ##
==========================================
- Coverage   88.17%   87.86%   -0.31%     
==========================================
  Files          13       13              
  Lines         634      659      +25     
  Branches      125      131       +6     
==========================================
+ Hits          559      579      +20     
- Misses         61       66       +5     
  Partials       14       14              
Impacted Files Coverage Δ
craft_archives/repo/installer.py 48.88% <27.27%> (-3.75%) ⬇️
craft_archives/repo/__init__.py 100.00% <100.00%> (ø)
craft_archives/repo/apt_key_manager.py 98.29% <100.00%> (+0.07%) ⬆️
craft_archives/repo/apt_preferences_manager.py 87.91% <100.00%> (+0.70%) ⬆️
craft_archives/repo/apt_sources_manager.py 93.93% <100.00%> (+0.53%) ⬆️

This commit adds a new public function, "install_in_root()", that
installs package repositories in a location that contains an Apt-based
system, and _not_ the host system. The intention is that eventually
said system will be chroot'ed into, at which point an "apt update" will
pick up the new repositories.

The motivation is to support package repositories in overlays in
Rockcraft.
@tigarmo tigarmo force-pushed the CRAFT-1739-repos-in-nonroot branch from 0bae11f to 326a808 Compare May 24, 2023 20:46
Copy link

@cmatsuoka cmatsuoka left a comment

Choose a reason for hiding this comment

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

Nice!

@tigarmo tigarmo requested a review from lengau May 25, 2023 17:02
@tigarmo tigarmo marked this pull request as ready for review May 26, 2023 14:10
@tigarmo tigarmo requested a review from sergiusens May 26, 2023 15:11
Copy link
Collaborator

@sergiusens sergiusens left a comment

Choose a reason for hiding this comment

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

it looks good, I would make the doc updates though

@tigarmo tigarmo merged commit 43982e9 into main May 29, 2023
@tigarmo tigarmo deleted the CRAFT-1739-repos-in-nonroot branch May 29, 2023 19:27
tigarmo added a commit that referenced this pull request Jul 11, 2023
Co-authored-by: Tiago Nobrega <tiago.nobrega@canonical.com>
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