-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xx-info env: remove cond to print XX_TRIPLE #64
Conversation
base/xx-info
Outdated
fi | ||
case "$TARGETOS" in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really understand why there is a os
filter at all in here. Maybe it is a historic relic from the time only Linux was supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this cond has been added here: 1b606ea#diff-2e3d3a4d78f2753f9464b79e8ac808928efdaeb5e0976104bad6f360448ad856R304-R307
Maybe it was to handle specific suffixes:
Lines 160 to 167 in c6d3201
if [ "$XX_OS" = "windows" ]; then | |
case "$XX_ARCH" in | |
amd64) suffix="mingw-w64-x86-64" ;; | |
386) suffix="mingw-w64-i686" ;; | |
arm64) suffix="mingw-w64-aarch64" ;; | |
arm) suffix="mingw-w64-arm" ;; | |
esac | |
fi |
...for mingw packages like the apt one?:
Lines 193 to 208 in c6d3201
for p in ${packages2}; do | |
n= | |
if [ -n "$nocross" ]; then | |
n=${p} | |
elif checkpkg "${p}-${suffix}" >/dev/null 2>/dev/null; then | |
n="${p}-${suffix}" | |
elif [ "${XX_OS}" = "linux" ] && [ -n "${XX_APT_PREFER_CROSS}" ] && checkpkg "${p}-${XX_PKG_ARCH}-cross" >/dev/null 2>/dev/null; then | |
n="${p}-${XX_PKG_ARCH}-cross" | |
elif [ "${XX_OS}" = "linux" ]; then | |
n="${p}:${XX_PKG_ARCH}" | |
else | |
continue | |
fi | |
empty= | |
set -- "$@" "$n" | |
done |
base/xx-info
Outdated
echo "XX_PKG_ARCH=${XX_PKG_ARCH}" | ||
echo "XX_TRIPLE=${XX_TRIPLE}" | ||
fi | ||
echo "XX_PKG_ARCH=${XX_PKG_ARCH}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PKG_ARCH should probably remain under condition as we only support linux package managers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes indeed we don't support Cygwin pkgs
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
XX_TRIPLE
is not returned for windows platform withxx-info env
and thereforeCC
andCXX
vars are not exported withxx-go
. Related to moby/moby#43529 (review).Signed-off-by: CrazyMax crazy-max@users.noreply.github.com