Skip to content

fix(xim): quote the script path in a script package's alias (mcpp#832) - #699

Closed
Sunrisepeak wants to merge 1 commit into
mainfrom
fix/script-alias-quoting
Closed

Sunrisepeak wants to merge 1 commit into
mainfrom
fix/script-alias-quoting

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

Summary

A script package (type = "script") is registered with the alias xlings script <path>, written unquoted (src/core/xim/libxpkg/types/script.cpp). The shim reads an alias as words, so in a home whose path holds a space it ran xlings script /tmp/mc and failed:

[error] failed to load script: package file not found: /tmp/tmp.YBfpUzQZUg/mc

Measured by mcpp-community/mcpp#834's e2e 932 (a fresh mcpp home under …/mc probe/家), where gcc's install hook runs gcc-specs-config, a script package, through its shim.

The path is now quoted with platform::shell_quote. A quoted alias is still plain words to the shim (split_plain_words reads quotes), so it keeps running as argv, without a shell. Aliases already recorded keep their old form until the package is reinstalled; openxlings/xim-pkgindex#1035 makes gcc's hook independent of the alias for released clients.

Test plan

  • tests/e2e/script_type_install_test.sh gains section 14: a home whose path holds a space, xpkg-helper installed, its shim run — passes with this change; fails on 2026.10.21.4 (failed to load script).
  • tools/lint_*.sh

A script package is registered with the alias `xlings script <path>`, and
the shim reads an alias as words: in a home under `/tmp/mc probe` it ran
`xlings script /tmp/mc` and failed with `package file not found`. The path
is now quoted with `platform::shell_quote`; a quoted alias is still plain
words to the shim (`split_plain_words`), so it keeps running without a
shell. tests/e2e/script_type_install_test.sh runs a script package's shim
in a home whose path holds a space.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
Sunrisepeak added a commit to openxlings/xim-pkgindex that referenced this pull request Oct 23, 2026
… its alias (mcpp#832) (#1035)

The shim of a script package runs the alias xlings recorded for it,
`xlings script <path>`, unquoted in released xlings: in a home under
`/tmp/mc probe` gcc's specs rewrite failed with `failed to load script:
package file not found: /tmp/mc` (mcpp's e2e 932). The hook runs the script
through `xlings script` as an argument vector, which reaches it on every
client; the shim stays the fallback. The alias itself is fixed in
openxlings/xlings#699.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
Sunrisepeak added a commit that referenced this pull request Oct 23, 2026
…es, cross-repo contract read through the client, a move tried first (J47), machines with users keep their xlings (J50), #699; 2026.10.23.2 (#701)

Part 3 of the Luban OS ecosystem usability design, one PR, one version.

- U3/U4: tools/bump_index.py writes xlings, luban, luban-os and xim:xdesk into the index from the release's sidecars (all or nothing, idempotent, never moves latest back); release.yml's bump-index and tools/bump_index.sh, which never wrote anything, are removed; AGENTS.md, the contributing skill and docs/92-release name the tool.
- U5: the rootfs self-update fixture reads xlings' versions through the client; package_info's package carries versions (protocol 1.18, package_versions). Supersedes #700.
- J47/U8: luban tries the domain before moving a system into its own userland (xlings subos __domain-check, feature domain_check); where it cannot be built nothing is exported or removed, and an archive left by such a move is named as freeable.
- J50: a machine mounts /home before the system's home -- a prefix system's home under /home was hidden in a machine with users of its own (no xlings in it).
- #699 (mcpp#832): a script package's alias quotes its path.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
@Sunrisepeak

Copy link
Copy Markdown
Member Author

Merged as part of #701 (its commit cherry-picked, author kept): released in 2026.10.23.2.

Sunrisepeak added a commit to mcpp-community/mcpp that referenced this pull request Oct 23, 2026
…ndored floor

The release takes the next version so it ships beside xlings 2026.10.24.1,
whose script-package alias quotes its path (openxlings/xlings#699, released
through #701): a script package's hook loads under a home whose path holds a
space, which the index had only worked around for gcc (xim-pkgindex#1035).
`kXlingsVersion` records the twelfth floor; the CI and release workflows
install the same version.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.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.

1 participant