Skip to content

Commit

Permalink
Merge branch 'main' into core20-arch-error
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiusens authored Aug 25, 2023
2 parents 812b534 + e1491d1 commit 76a289e
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 10 deletions.
6 changes: 3 additions & 3 deletions requirements-devel.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ codespell==2.2.4
colorama==0.4.6
coverage==7.2.5
craft-archives==1.1.3
craft-cli==2.0.0
craft-cli==2.1.0
craft-grammar==1.1.1
craft-parts==1.23.1
craft-providers==1.13.0
craft-parts==1.24.0
craft-providers==1.15.0
craft-store==2.4.0
cryptography==41.0.3
Deprecated==1.2.13
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ chardet==5.1.0
charset-normalizer==3.1.0
click==8.1.3
craft-archives==1.1.3
craft-cli==2.0.0
craft-cli==2.1.0
craft-grammar==1.1.1
craft-parts==1.23.1
craft-providers==1.13.0
craft-parts==1.24.0
craft-providers==1.15.0
craft-store==2.4.0
cryptography==41.0.3
Deprecated==1.2.13
Expand Down
1 change: 1 addition & 0 deletions snapcraft/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ def get_dispatcher() -> craft_cli.Dispatcher:
appname="snapcraft",
greeting=f"Starting Snapcraft {__version__}",
log_filepath=log_filepath,
streaming_brief=True,
)

return craft_cli.Dispatcher(
Expand Down
6 changes: 3 additions & 3 deletions snapcraft/commands/lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import tempfile
import textwrap
from contextlib import contextmanager
from pathlib import Path
from pathlib import Path, PurePosixPath
from typing import Iterator, Optional

from craft_cli import BaseCommand, emit
Expand Down Expand Up @@ -309,7 +309,7 @@ def _install_snap(
is_dangerous = not bool(assert_file)

if assert_file:
ack_command = snap_cmd.formulate_ack_command(assert_file)
ack_command = snap_cmd.formulate_ack_command(PurePosixPath(assert_file))
emit.progress(
f"Installing assertion file with {shlex.join(ack_command)!r}."
)
Expand All @@ -327,7 +327,7 @@ def _install_snap(
install_command = snap_cmd.formulate_local_install_command(
classic=bool(snap_metadata.confinement == "classic"),
dangerous=is_dangerous,
snap_path=snap_file,
snap_path=PurePosixPath(snap_file),
)
if snap_metadata.grade == "devel":
install_command.append("--devmode")
Expand Down
2 changes: 1 addition & 1 deletion snapcraft/parts/lifecycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def _run_lifecycle_and_pack(
version=process_version(project.version),
target_arch=project.get_build_for(),
)
emit.message(f"Created snap package {snap_filename}")
emit.progress(f"Created snap package {snap_filename}", permanent=True)


def _generate_metadata(
Expand Down
11 changes: 11 additions & 0 deletions tests/unit/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import yaml
from craft_providers import Executor, Provider
from craft_providers.base import Base
from overrides import override
from pymacaroons import Caveat, Macaroon

from snapcraft.extensions import extension, register, unregister
Expand Down Expand Up @@ -326,6 +327,16 @@ def fake_provider(mock_instance):
class FakeProvider(Provider):
"""Fake provider."""

@property
@override
def name(self) -> str:
return "fake"

@property
@override
def install_recommendation(self) -> str:
return "uninstallable"

def clean_project_environments(self, *, instance_name: str):
pass

Expand Down

0 comments on commit 76a289e

Please sign in to comment.