Skip to content

A recipe revision distinct from the version: a changed recipe never reaches a machine that holds its version #620

Closed

Description

@Sunrisepeak

Observed

installation_state() (src/core/xim/install_state.cpp:35-80) decides that a package is installed from two signals. One is whether the payload directory <ns>-x-<name>/<version> exists; the other is whether the ledger references it. No recipe revision, build number or payload digest takes part in the decision. Consequently, a recipe that changes what it installs while keeping its version key never reaches a machine that already holds that key. A range request that an installed version satisfies does not upgrade it either.

Instance: xim-pkgindex#884 gave the Qt payloads their runtime closure on Linux (the xim:glibc loader and the dependencies of Qt's libraries), without changing the archives. A CI cache that held the earlier qt-base 6.11.1 payload kept it, and the Qt program failed at run time (libzstd.so.1: cannot open shared object file). The fix could only reach such machines under a new key, 6.11.1.1.

The index already works around this in two ways:

  • a fourth version segment as a packaging revision: fontconfig 2.15.0.1, libglvnd 1.7.0.1, llvm-dev 20.1.7.1;
  • a note in pkgs/g/glibc.lua saying that a corrected payload requires a new version.

Both put a packaging fact into the version that consumers write. qt-base 6.11.1.1 is not a Qt release.

The same shape exists for mcpp packages: mcpp-community/mcpp#524.

Request

A recipe revision, distinct from the version. Its semantics:

  1. A recipe states revision for a version, defaulting to 0.
  2. The ledger records the revision that was installed.
  3. Resolving an installed version whose recorded revision differs from the recipe's reinstalls it, and the output says why.

With this in place, a packaging fix keeps the upstream version, and consumers keep writing 6.11.1.

Activity

  1. Sunrisepeak commented on Sep 27, 2026

    @Sunrisepeak
    MemberAuthor

    Resolved in xlings 2026.9.27.1 (#622), with the field in libxpkg 0.0.58 (openxlings/libxpkg#42) and the specification and first recipe in openxlings/xim-pkgindex#892.

    • A version entry may state revision = N. The install record .xpkg-install.json carries the revision the payload was built from; a record below the recipe's revision reads as not installed, and install replaces the payload in place, stating recipe revision <n>, installed revision <m>.
    • The replacement parks the old payload under <data>/stale/ and restores it on failure; a marker written before parking lets a later install restore or remove what a killed process left there.
    • glibc 2.44.3 now states revision 1 (the relocatable build with its own C.utf8 and gconv data, xim:glibc ships no locale data and its compiled locale path points outside the payload, so every program runs in the C locale #621).

    Verified after the release, with the published xlings 2026.9.27.1 inside an xlings subos sandbox (xlings subos use eco-0927 --sandbox --cmd ..., mirror CN) and an isolated XLINGS_HOME:

    1. a fresh xlings install glibc@2.44.3 records "revision": 1;
    2. with the record set to revision 0, as a payload installed before the fix, install printed recipe revision 1, installed revision 0, reinstalled, recorded revision 1 again and left <data>/stale/ empty;
    3. the reinstalled payload lists C.utf8.

    The GitHub and GitCode release assets of 2026.9.27.1 were downloaded and matched their sha256 sidecars; the xim index tracks 2026.9.27.1 as latest (openxlings/xim-pkgindex#893).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions