-
Notifications
You must be signed in to change notification settings - Fork 234
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
Try to make it easier to maintain for packages (and distros) #471
Try to make it easier to maintain for packages (and distros) #471
Conversation
@jadeallenx, I'm starting tests, with Alpine as the first candidate. Out-of-the-box it doesn't have |
Might be worth mentioning all logs have a Idea 💡If all logs add a prefix, too, we could even think of a way to filter out undesirable ones, e.g.
and then inside log we could search for filters in a e.g. (food for thought for another pull request 😄) |
Example logfile output
|
Can't get
I looked at https://github.com/bitwalker/alpine-erlang/blob/master/Dockerfile, for example, and don't think I'm doing anything different from what they're doing. I installed all the packages that image install, and am passing Edit: this was Docker configuration, mostly likely related to limits I imposed on RAM consumption. |
The _apk, _rpm and _dpkg functions do an echo (they build a string) That string is used to both output what failed, but also be evaluated to probe for a given package install
In RHEL the value is "rhel", with the quote (and since we're not sourcing the file, but parsing it, we need to do some extra work)
We're already, out of the functions, doing the /dev/null + 2>&1 dance
Idea 💡This is maybe outside the scope of |
This appears to require zypper to be done, so can probably wait for community contribution to happen
As a bonus, and to check if it'd be easy to extend to e.g. Arch Linux, using |
Hm. This sounds like a lot of maintenance work. To be honest, I don't really want kerl to do any package detection but when builds break, it is typically because build prerequisites are not available and then people open tickets that "kerl" is broken somehow. So all of this effort is to help people figure out that it's not kerl's fault lol - not sure we need to help people that much? What benefit do you see if this were an option? |
kerl
Outdated
kpp=$(eval echo \$_KPP_"${os_release_id}"_pkgs) | ||
if [ -n "${kpp}" ]; then | ||
echo "[packages] Found package declarations for ${os_release_id}. Linux flavor is known." >>"$LOGFILE" | ||
echo "[packages] Acting on known Linux distro ${os_release_id}" >>"$LOGFILE" |
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.
Seems like you could combine these messages.
[packages] Your linux seems to be ${os_release_id}.
???
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.
Yeah, I guess so. A previous implementation had them separated into different code paths, but one I joined it into this single if
didn't take care of it. 👍
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.
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.
Yeah we should drop them or stick to one consistent word :)
Apart from copy-paste ease, none, so I agree we shouldn't do it. |
I did the request changes. Based on our prior discussions for this stuff, do you think the end result is close to what you expected? Or do you think it'll be a lot of maintenance work to keep adding distros/packages? (I do understand that |
We've survived this long noting only git and curl, I think we can rely on those other utilities being part of the base install tbqh |
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.
lgtm
OK don't kill me but seeing all of the echo "${msg}" >> $LOGFILE makes me think we should make a function called log() which takes a string and prepends the date and writes it to a filehandle Thoughts? |
Eh. On second thought maybe we should open a new issue/PR for log emission cleanup/generalization - because stderr() is a specialized log emitter than writes to stderr and not a disk file. |
lol great minds - yeah we should definitely open an issue to track this - don't think this work needs to delay a release tho? |
There we go: #475 |
I'm squash-merging this in preparation for the release. I think we can hold off on it for a few more days (some consumers use the main branch) to see if this surfaces any "issues", but we don't have to if you don't wanna. |
Yeah let's plan for a release on Thursday |
Description
The initial goal was to ease maintenance for "missing package" -related messages. Conceptually, this code is not very different from the previous one except that:
os-releases
- with fallback) and then used to either "error" out or find the list of "probe-able" packagesg++
isgcc-c++
in RHEL - for the same package manager)Further considerations
I had hacked the think locally to test with
darwin
and e.g.rebar3
but reverted those changes before pushing.At the same time,⚠️ I haven't tested in actual targets, but hope to do so with a few different Docker images.I'm testing now:
opensuseAlso take a look at
... the "package" checker output a command to install the missing packages...Closes #439.
Closes #431.