Skip to content

Rename os_version to os.version#134

Closed
orf wants to merge 1 commit into
youki-dev:mainfrom
orf:os-version_rename
Closed

Rename os_version to os.version#134
orf wants to merge 1 commit into
youki-dev:mainfrom
orf:os-version_rename

Conversation

@orf
Copy link
Copy Markdown

@orf orf commented Jun 12, 2023

I believe this should be os.version like ImageConfig?

For example this is what Github container repo returns:

{
  "schemaVersion": 2,
  "manifests": [
    {
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "digest": "sha256:b09d1eb75170275f0e465ed97e90718e596aab4a2413ba7eedcfb9f13580aca6",
      "size": 2015,
      "platform": {
        "architecture": "amd64",
        "os": "darwin",
        "os.version": "macOS 13.3"
      },

Also the tests failed on MacOS. I fixed this by canonicalising the temporary directory as well:

thread 'runtime::tests::test_canonicalize_rootfs' panicked at 'assertion failed: `(left == right)`
  left: `"/var/folders/q1/c031nnz57ls4qm4dk3m3w74h0000gn/T/.tmpxAJ0q3/rootfs"`,
 right: `"/private/var/folders/q1/c031nnz57ls4qm4dk3m3w74h0000gn/T/.tmpxAJ0q3/rootfs"`', src/runtime/mod.rs:306:13

Unfortunately std::env::consts::OS returns macos instead of Darwin, so I added an extra arm to the match condition to handle this. This makes Default work properly on MacOS

Signed-off-by: Tom Forbes <tom@tomforb.es>
Comment thread src/runtime/mod.rs
P: AsRef<Path>,
{
Ok(if path.as_ref().is_absolute() {
println!("Other: {}", path.as_ref().display());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we avoid that print statement?

@orf orf closed this by deleting the head repository Aug 5, 2023
@orf
Copy link
Copy Markdown
Author

orf commented Apr 13, 2024

Sorry, I forgot about this and deleted my fork. I've re-made it in #163

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.

2 participants