mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-10-05 07:49:59 +00:00
e63756bdbf
Every RPM target of every family failed in buildrpms.pl before it built a package:
Can't rename('.xCAT-probe-2.20.0.UNf6IG', '/xCAT-probe-2.20.0.tar.gz'):
Invalid cross-device link at ./buildrpms.pl line 386
The staging directory is set per package in the child that buildall forks. main()
staged the xCAT-probe tarball before that fork, where $SOURCES is still the empty
string, so the destination was composed as /xCAT-probe-<version>.tar.gz.
stage_xcat_probe_sources in XCAT::BuildUtils replaces prepare_xcat_probe_source_tar.
It takes the staging directory, refuses an unset or absent one, and composes the file
name itself. buildsources calls it for the xCAT-probe package, in the child, where the
directory exists.
xcat_probe_sources_staged.t runs the staging and reads the archive: the helpers are at
xCAT-probe/lib/perl/xCAT, no temporary file is left behind, and each refusal names the
guard that fired. Removing either guard turns it red. On the unfixed tree
"./buildrpms.pl --package xCAT-probe --source-only" dies at line 386; with this change
it reaches the build lock.
Seven assertions in xcat_probe_package_payload.t matched the text of buildrpms.pl
rather than running it, and four could not fail: three matched the xCAT-release
routine, which stages the same way, and one spanned the rest of the file. All seven
stayed green while every RPM target died. They are gone.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>