-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
--build-root option is not respected anymore #7083
Comments
Hm, OTOH, maybe we should change stuff on Fedora side. Because this really changes defaults. But how? |
This might be the biggest difference actually: rubygems/lib/rubygems/path_support.rb Line 38 in 54a7a7a
The thing is that the writability of the directory was never checked at this place. And while the |
In general, I think if someone is altering the installation directory it should not be changed. It seems like RubyGems has a more fundamental problem that I hadn't noticed: there is not a single source of truth for the installation directory. It looks like The problem is that the part of the code that does the auto-user-install check does not have access to the command-line arguments and runs before the code that handles The only solutions I can think of are:
|
One potential implementation of an "escape hatch" would be what I mentioned in #5327 (comment). |
Just FTR, this is my WIP attempt to make the My next step is to remove this check: rubygems/lib/rubygems/commands/install_command.rb Lines 139 to 144 in 8123662
And simply give the
All this in an attempt to make the |
Earlier attempts at #5327 encountered that exact Personally, I think having Also, a quick note: since you're explicitly setting |
This change caused a regression for us when building RPMs for openSUSE.
in this case the target directory is actually writable as it is prefixed with the build-root directory. The whole code for when to use user dir in
yes you can workaround it with but this still feels like a regression in combination with the --build-root option. |
@darix it's definitely a regression/bug. Sorry it's causing you problems. @voxik does your work at #7100 resolve this, or is there still an outstanding problem after that PR? I'm comparing v3.4.22 to #7100 and I'm noticing that https://github.com/rubygems/rubygems/pull/7100/files#diff-b25097522a961ed7158012499383b8a8057caf87cbc445d6b168a5b8a27ba45dL192-L197 and the changes to |
This is the culprit: rubygems/lib/rubygems/path_support.rb Line 38 in c36eb1b
Having existing directory was previously not necessary. |
Confirmed it still happens as of 9766fa6 (current master).
|
@deivid-rodriguez #7212 does not fix this. I do think it's a better overall approach than what I did, though, so I'll see if I can fix it on top of that PR instead of on top of master. |
Sorry, I misunderstood this issue, I can repro now 👍. |
@voxik @darix I made a proposed change to @deivid-rodriguez's PR (#7212) that should fix this. The plan is to get some tests in place for that, then hopefully merge it tomorrow. 🙂 |
This is command we regularly use on Fedora during build of PRM packages:
However, this should not install anything into
~/.local
, but is should create the regular/usr/share/gems
in the directory specified by the--build-root
option.@duckinator This is caused by #5327
Unless there is some straight forward fix, I'd suggest to revert the PR temporary (or I'll need to revert this feature for Fedora until this is fixed :/ )
The text was updated successfully, but these errors were encountered: