-
Notifications
You must be signed in to change notification settings - Fork 23
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
General improvements #89
Conversation
Now the logrus level can be changed through the environment variable LOG_LEVEL
Now the cache dir is global and can be configured properly, by default it goes into XDG_CACHE_HOME/bazeldnf, this is useful when dealing with multiple bazel repositories using bazeldnf.
Now the cache will expand paths to honor ~
When getting an arch make sure to expand to noarch as well, because some RPMs may have dependencies that have no architecture, this seems to be how RPM work
cacheDir = append(cacheDir, cacheHelperValues.cacheDir); | ||
} else if (len(cacheDir) > 1) { | ||
func expand(path string) (string, error) { | ||
if len(path) == 0 || path[0] != '~' { |
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 believe the recommended approach here is to:
(1) replace ~ with $HOME
(2) os.Expand(path)
This will cover more than just tilde expansion because it'll substitute all of the local environment variables.
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.
Good idea, I'll do that
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.
Can we peel this last commit off for now? I realize I've been slow, but I'm going to merge my refactoring PR (assuming it's good to go from your end) and push a PR for tests around this stuff and I'd like to not break that.
Sure, I was going to wait for you to merge first anyway |
I'll close this PR and move it to my company fork by now, as I can't push force into the branch and fix the commits |
This PR bundles a bunch of non related changes I've been working on while getting ready for bzlmod support with a lock file.
It includes: