EP-FXT Science Data Center / Users Guide v2.0 · 2026-11-04

FXTSoft v2.0 documentation

fxttool-update help

Command help for fxttool-update in the FXTSoft v2.0 release.

← Back to Command Reference

Use anonymous HTTPS to check, install, verify, or roll back the FXTSoft v2.0 caldb_tools component. The installation target supports the standard two-directory layout of a complete HEASoft package and the single-directory layout of an independent FXT prefix; the single-directory layout does not create a noarch directory.

Bare command

Running fxttool-update without arguments is equivalent to fxttool-update command=install component=caldb_tools ref=latest. The default release source is https://epfxt.ihep.ac.cn/downloads/fxttools.

The verbose parameter controls diagnostics on standard error: verbose=0 keeps only warnings and errors, verbose=1 reports concise operations and results, and verbose=2 adds diagnostic paths. Machine-readable key=value results remain on standard output. Legacy boolean values such as verbose=yes and verbose=no remain accepted as levels 1 and 0.

Five commands

CommandPurpose
command=installDownload changed files and install them transactionally; this is the default command.
command=statusRead only local state, active locks, and incomplete transactions; no network access is used.
command=checkRead the remote release and report an incremental plan without modifying the installation tree.
command=verifyVerify locally managed files against the saved state without network access.
command=rollbackRestore the managed state from before the most recent successful installation.

Installation paths

When install_root is omitted, the target top-level root is taken from $HEADAS in the current environment, and the command entry is checked to ensure that it belongs to the same HEASoft environment. The standard layout consists of a top-level platform prefix and an adjacent FXT platform prefix; state records, locks, and rollback data are managed across these two directories.

When install_root=/path/to/heasoft/platform is specified explicitly, that installation is the target; the current terminal's HEADAS or command entry may come from another environment. The standard layout uses that top-level platform root and the adjacent /path/to/heasoft/fxt/platform. When a standard FXT platform directory is specified, the standard two-directory layout and lock are used only when a symlink from the adjacent top-level command proves that both directories belong to the same installation. If an adjacent installation exists but the relationship cannot be confirmed, the command fails; specify the complete package's top-level platform directory directly.

An independently compiled FXT installation uses the actual prefix containing bin/, lib/python/caldb_tools/, and syspfiles/. If there is no recognizable adjacent FXT installation of a complete package and no headas-init.sh/headas-init.csh marker, the updater manages only this prefix and does not create fxt/platform. If the release manifest contains top/fxt copies of the same file, it processes the file only once and refuses the update when content, size, or mode differs. The source directory and the bin subdirectory are not installation prefixes. A missing prefix is created by the standard-layout installation plan.

layout=auto is the default. For custom configure scripts, initialization scripts, or directory layouts, combine install_root with layout=single to restrict the operation to that single installation prefix; layout=standard uses the top-level plus adjacent FXT two-directory layout. Single-directory mode requires the prefix to already contain the three installation subdirectories above and not to be a recognizable complete-package installation. The top-level or FXT subtree of a complete package cannot be forced into a single-directory update; specify the complete package's top-level directory. Subsequent status, check, install, verify, and rollback operations should continue to use the same directory and layout parameters; update records do not migrate across layouts. If the only adjacent directory with the same name is not recognizable, automatic detection reports an ambiguity and excludes it from the update scope.

status reads updater records only. If no record has been created, it displays installed_release=none; this does not mean that no software was installed manually. check and install dry_run=yes obtain release information and inspect target files without downloading payloads or changing installation files; install is the command that downloads and installs changed files.

After the FXTSoft environment is loaded, the command can run from any working directory; entering the installation directory is unnecessary. Top-level file links created by a standard HEASoft installation (for example, $HEADAS/help/fxtarfgen.html → ../../fxt/platform/help/fxtarfgen.html) are preserved, and updates write the corresponding FXT target file. This link form is allowed only for top/fxt file pairs with identical content, mode, and relative path in the release manifest. Directory links, links that escape the target tree, link chains, and dangling links still cause an error.

Anonymous release source

check and install use only anonymous HTTPS validated by the system CA store. They do not require Git, an SSH key, GitHub/GitLab login, cookies, or an access token. An explicit source must still be an HTTPS repository URL.

Network, proxy, and retry behavior

HTTPS requests use the standard HTTPS proxy settings. Set HTTPS_PROXY (or https_proxy) when the release site is reachable only through a proxy; use NO_PROXY (or no_proxy) to bypass the proxy for selected hosts. Leave these variables unset for a direct connection.

The default minimum interval between request starts is 1.25 seconds. A configured slower interval is preserved. For the known release endpoint https://epfxt.ihep.ac.cn/downloads/ (HTTPS on port 443, whether omitted or explicit, with paths under /downloads/), HTTP 404 is treated as a possible rate-limit response. It retries within the existing maximum attempt count with backoff; after such a response, this updater's subsequent requests use an adaptive interval starting at 2.5 seconds, doubling up to 10 seconds, without lowering an explicitly slower configured interval. HTTP 404 from other origins remains a permanent missing-resource error.

Other transient failures, including HTTP 408, 429, 500, 502, 503, and 504, are retried with exponential backoff and jitter. A server Retry-After value is honored for at most 60 seconds. A final 404 from this endpoint reports the actual sanitized URL and status; the client cannot distinguish a missing resource from server throttling there. Multiple updater processes or hosts using the same egress IP may share the server's rate limit, so avoid running updates concurrently; the client does not provide cross-process or cross-host global coordination. Failure diagnostics retain the sanitized request URL and HTTP status, plus TLS or DNS causes; credentials and proxy authorization values are redacted.

Incremental updates

The updater compares SHA-256, byte size, and file mode for each file. Files with complete content and matching modes are reused; it downloads only files that are missing, changed, or damaged. Use dry_run=yes to view the same plan without writing changes.

Release IDs are ordered by date and numeric revision, so a valid older release cannot replace a newer installed or paired release merely because its manifest checksums are valid. The latest (or current) reference is resolved from the server's current/RELEASE pointer and is still checked against the local release floor. An intentional downgrade must use a fixed release ref, an explicit install_root, and allow_downgrade=yes; an immutable release ID whose version, source commit, or manifest changes is rejected even with that override.

Unmanaged files

Files added by users and not recorded in state are not deleted. A path enters the deletion plan only when state explicitly records it as owned by this component and the current release manifest has removed it.

Unwritable targets

All targets for additions, replacements, and deletions are checked before writing. If a path is not writable, the command fails and lists the specific path. The updater does not call sudo or bypass an error with a partial installation.

Transactions and rollback

Installation uses candidate files, private backups, a durable transaction log, and atomic replacement of each target file. If downloading, validation, file replacement, or state commit fails, the state from before the transaction is restored automatically. This is not a package-wide hot swap: the updater lock coordinates updater processes, but it does not block ordinary FXT commands. Stop jobs using this installation and prevent new jobs from starting until an install or rollback has completed. command=rollback uses the rollback generation saved by the most recent successful installation; if rollback validation fails, the backup is retained for recovery.

When deleting a managed link, only the link itself is removed, and the private backup records the original link text; rollback restores the link. Top-level links in the standard layout must point to FXT files in the same release manifest. Directory links, links that escape the target tree, link chains, and dangling links all cause an error during planning. An independent single-directory layout does not create top-level links.

State directory

The default state root is install_root.parent/.fxttool-update/install_root.name. It is on the same file system as the installation root but is not nested inside the top-level root or the FXT root. Override it explicitly with state_dir=/private/path. Component state, candidates, transaction logs, and backups remain in this private directory rather than being installed into the public runtime tree. Continue using the same state_dir for a given installation. To prevent different state directories from modifying one installation concurrently, the environment-wide lock always remains at environment.lock under the default state root and does not move when state_dir is overridden.

Exit codes

Exit codeMeaning
0Command succeeded.
1Network, validation, lock, file-system, or transaction operation failed.
2Parameter usage error or component not registered.

Components

The current release manifest provides component=caldb_tools. The component parameter must use a name from the manifest; an unregistered component returns an unsupported-component error before any network connection is made.

Examples

fxttool-update

fxttool-update command=status

fxttool-update command=check ref=latest

fxttool-update command=install ref=latest

fxttool-update command=verify

fxttool-update command=rollback

fxttool-update install_root=/opt/heasoft/x86_64-pc-linux-gnu

fxttool-update command=status install_root=/opt/custom-fxt/platform

fxttool-update command=check install_root=/opt/custom-fxt/platform

fxttool-update command=install install_root=/opt/custom-fxt/platform

fxttool-update command=check install_root=/opt/custom-fxt/platform layout=single

fxttool-update state_dir=/data/private/fxttool-state command=status

fxttool-update command=install dry_run=yes

fxttool-update component=caldb_tools source=https://epfxt.ihep.ac.cn/downloads/fxttools ref=latest

fxttool-update component=caldb_tools command=check

PARAMETER SUMMARY

This table is synchronized with the installed HEASoft parameter file; mode letters follow the standard PFILES convention.

ParameterTypeModeDefault / rangePurpose
commandsqinstallRun install, status, check, verify, or rollback
componentshcaldb_toolsComponent to update
sourceshhttps://epfxt.ihep.ac.cn/downloads/fxttoolsAnonymous HTTPS release repository
refshlatestRelease identifier, latest, or current server channel
install_rootshHEADASInstallation platform prefix; when explicit, identifies a complete package or independent FXT
layoutshautoauto detects automatically; standard uses two directories; single uses one directory; the latter two require install_root
state_dirshderivedPrivate updater state directory
validatebhyesValidate the release and installed files
dry_runbhnoGenerate the plan only
allow_downgradebhnoAllow an explicitly pinned older release; requires install or check with explicit install_root
verboseih1; range 0 .. 20 warnings/errors; 1 concise operations/results; 2 diagnostics; legacy yes/no map to 1/0
modeshqlPFILES query/learn mode