You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2026/09/20 14:21:45 UTC
(skywalking-ai-sessionizer) 15/23: The transitional Debian package keeps the old binary, or the upgrade breaks hooks
This is an automated email from the ASF dual-hosted git repository.
wu-sheng pushed a commit to branch langchain-harness
in repository https://gitbox.apache.org/repos/asf/skywalking-ai-sessionizer.git
commit 3c1233e96d5f5b41900f98d130ab1a4cdc7436ba
Author: Wu Sheng <wu...@foxmail.com>
AuthorDate: Sun Sep 20 21:00:49 2026 +0800
The transitional Debian package keeps the old binary, or the upgrade breaks hooks
It was empty, which reads as the tidy answer and is the wrong one. The package
it replaces owns /usr/bin/asz-claude-plugin, so an upgrade to an empty package
deletes that file — and a hooks.json installed before the rename calls it by
name from PATH. Every hook would have failed with command not found, on the one
path a user is most likely to take: apt upgrade.
So it still installs the old name and depends on the new package. The upgrade
pulls asz-changes and leaves the old binary in place until both go in 0.6.0.
The archive already carried both names for this reason. The Debian packages did
not, and nothing said so.
---
docs/en/changes/changes.md | 6 ++++--
docs/en/setup/install.md | 5 +++--
tools/release/deb-package/main.go | 25 ++++++++++++++++---------
tools/release/release.sh | 7 +------
4 files changed, 24 insertions(+), 19 deletions(-)
diff --git a/docs/en/changes/changes.md b/docs/en/changes/changes.md
index aabf039..30be386 100644
--- a/docs/en/changes/changes.md
+++ b/docs/en/changes/changes.md
@@ -68,8 +68,10 @@ carried across rather than dropped.
installing a new binary does not rewrite an installed manifest. The old name is dropped in 0.6.0.
- The Debian package `asz-claude-code` is **`asz-changes`**. `asz-claude-code` is still published,
- empty, depending on the new package, so `apt upgrade` moves a machine across instead of leaving
- it on a package that silently receives nothing. It is dropped in 0.6.0.
+ depending on the new package, so `apt upgrade` moves a machine across instead of leaving it on a
+ package that silently receives nothing. It keeps installing the old binary name as well: emptying
+ it would have made the upgrade delete the file a `hooks.json` installed before the rename calls by
+ name, and every hook would have failed with command not found. Both are dropped in 0.6.0.
- **One Homebrew formula.** `asz` installs both binaries. The two formulae fetched the identical
archive and the identical checksum and installed one binary each, which only invited a machine to
diff --git a/docs/en/setup/install.md b/docs/en/setup/install.md
index 912085c..9b560f7 100644
--- a/docs/en/setup/install.md
+++ b/docs/en/setup/install.md
@@ -66,9 +66,10 @@ wire a runtime to the recorder, see [Claude Code Plugin](claude-code-plugin.md)
Upgrade with `sudo apt update && sudo apt upgrade`. For an exact version, run
`sudo apt install asz=<version> asz-changes=<version>`.
-`asz-claude-code` was this package's name until 0.5.0. It is now empty and depends on
+`asz-claude-code` was this package's name until 0.5.0. It is still published, depending on
`asz-changes`, so an upgrade moves across it rather than leaving a machine on a package that
-receives nothing. It is dropped in 0.6.0.
+silently receives nothing. It keeps installing the old binary name too, because hooks installed
+before the rename call it by name. Both it and that name are dropped in 0.6.0.
## Binary package
diff --git a/tools/release/deb-package/main.go b/tools/release/deb-package/main.go
index 821db06..fc58f0b 100644
--- a/tools/release/deb-package/main.go
+++ b/tools/release/deb-package/main.go
@@ -64,10 +64,15 @@ import (
// A package of this project: the binary it installs, and what apt shows.
//
-// A transitional package installs no binary. It exists to carry a machine
-// across a rename: apt upgrade pulls the package it depends on and removes
-// this one, where dropping the old name outright would leave that machine on
-// a package that silently stops receiving anything.
+// A transitional package carries a machine across a rename. It depends on the
+// package that replaced it, so apt upgrade pulls that one; dropping the old
+// name outright would instead leave the machine on a package that silently
+// stops receiving anything.
+//
+// It still installs its binary. Emptying it would make the upgrade remove the
+// file it owns, and a hooks.json installed under the old name calls that file
+// by name from PATH, so every hook would fail with command not found. The old
+// binary goes when the package does.
type definition struct {
binary string
summary string
@@ -100,12 +105,14 @@ var definitions = map[string]definition{
},
},
"asz-claude-code": {
- summary: "Transitional package: asz-claude-code is now asz-changes",
+ binary: "asz-claude-plugin",
dependsOn: "asz-changes",
+ summary: "Transitional package: asz-claude-code is now asz-changes",
description: []string{
- "This package is empty and is here so an upgrade moves to asz-changes,",
- "which is what it was renamed to in 0.5.0. It can be removed once that",
- "package is installed, and this one is dropped in 0.6.0.",
+ "This package is here so an upgrade moves to asz-changes, which is what",
+ "it was renamed to in 0.5.0. It keeps installing the old binary name,",
+ "because a hooks.json installed before the rename calls it by name. Both",
+ "this package and that name are dropped in 0.6.0.",
},
},
}
@@ -211,7 +218,7 @@ type file struct {
func stage(def definition, pkg, from string) ([]file, error) {
var files []file
- if !def.transitional() {
+ if def.binary != "" {
bin := filepath.Join(from, def.binary)
if info, err := os.Stat(bin); err != nil || !info.Mode().IsRegular() {
return nil, fmt.Errorf("%s is not a file that make binaries staged", bin)
diff --git a/tools/release/release.sh b/tools/release/release.sh
index 0783cea..6163741 100755
--- a/tools/release/release.sh
+++ b/tools/release/release.sh
@@ -845,12 +845,7 @@ $found"
asz-claude-code) bin=asz-claude-plugin ;;
esac
listing=$("$work/deb-package" -list "$out/$b" </dev/null) || fail "cannot list $b"
- if [ -n "$bin" ] && ! has_line "$listing" "usr/bin/$bin"; then
- # Before 0.5.0 asz-claude-code carried the binary; after it, that
- # package is transitional and carries nothing.
- [ "$p" = asz-claude-code ] || fail "$b has no /usr/bin/$bin"
- bin=""
- fi
+ [ -z "$bin" ] || has_line "$listing" "usr/bin/$bin" || fail "$b has no /usr/bin/$bin"
for f in "usr/share/doc/$p/LICENSE" "usr/share/doc/$p/NOTICE"; do
has_line "$listing" "$f" || fail "$b has no /$f"
done