Skip to content

Commit

Permalink
repo: change sources prefix to "craft-"
Browse files Browse the repository at this point in the history
This is a leftover from the code move; the rest of the code is already
using "craft-" as a prefix. As this is an internal change, no clients
are expected to break.
  • Loading branch information
tigarmo committed Apr 13, 2023
1 parent c88c47a commit 2899b0c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions craft_archives/repo/apt_sources_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def _install_sources(
"""Install sources list configuration.
Write config to:
/etc/apt/sources.list.d/snapcraft-<name>.sources
/etc/apt/sources.list.d/craft-<name>.sources
:returns: True if configuration was changed.
"""
Expand All @@ -119,7 +119,7 @@ def _install_sources(
)

if name not in ["default", "default-security"]:
name = "snapcraft-" + name
name = "craft-" + name

config_path = self._sources_list_d / f"{name}.sources"
if config_path.exists() and config_path.read_text() == config:
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/repo/test_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def check_sources(etc_apt_dir: Path) -> None:
# test run and the sources reference the keyring location.
expected_contents = source_contents.format(key_location=keyrings_location)

source_file = sources_dir / f"snapcraft-{source_repo}.sources"
source_file = sources_dir / f"craft-{source_repo}.sources"
assert source_file.is_file()
assert source_file.read_text() == expected_contents

Expand Down
12 changes: 6 additions & 6 deletions tests/unit/repo/test_apt_sources_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def apt_sources_mgr(tmp_path):
suites=["test-suite1", "test-suite2"],
url="http://test.url/ubuntu",
),
"snapcraft-http_test_url_ubuntu.sources",
"craft-http_test_url_ubuntu.sources",
dedent(
"""\
Types: deb deb-src
Expand All @@ -109,7 +109,7 @@ def apt_sources_mgr(tmp_path):
suites=["test-suite1", "test-suite2"],
url="http://test.url/ubuntu",
),
"snapcraft-NO-FORMAT.sources",
"craft-NO-FORMAT.sources",
dedent(
"""\
Types: deb
Expand All @@ -128,7 +128,7 @@ def apt_sources_mgr(tmp_path):
path="some-path",
url="http://test.url/ubuntu",
),
"snapcraft-WITH-PATH.sources",
"craft-WITH-PATH.sources",
dedent(
"""\
Types: deb
Expand All @@ -145,7 +145,7 @@ def apt_sources_mgr(tmp_path):
name="IMPLIED-PATH",
url="http://test.url/ubuntu",
),
"snapcraft-IMPLIED-PATH.sources",
"craft-IMPLIED-PATH.sources",
dedent(
"""\
Types: deb
Expand All @@ -158,7 +158,7 @@ def apt_sources_mgr(tmp_path):
),
(
PackageRepositoryAptPPA(ppa="test/ppa"),
"snapcraft-ppa-test_ppa.sources",
"craft-ppa-test_ppa.sources",
dedent(
"""\
Types: deb
Expand All @@ -172,7 +172,7 @@ def apt_sources_mgr(tmp_path):
),
(
PackageRepositoryAptUCA(cloud="fake-cloud"),
"snapcraft-cloud-fake-cloud.sources",
"craft-cloud-fake-cloud.sources",
dedent(
"""\
Types: deb
Expand Down

0 comments on commit 2899b0c

Please sign in to comment.