Commit graph

197 commits

Author SHA1 Message Date
Nobuyoshi Nakada
d6cf4c0c99
rbinstall.rb: just call File.basename directly 2021-07-08 17:58:25 +09:00
Nobuyoshi Nakada
9c9531950c
rbinstall.rb: get rid of making directories when dryrun 2021-07-01 06:42:00 +09:00
Nobuyoshi Nakada
9edad0df74
Remove short options with argument [Bug #17870]
Remove GNU make `-O` and `-W` options which are short but followed
by an argument, so that `$mflags.set?(?n)` does not return `true`
wrongly.
2021-05-21 10:34:28 +09:00
Hiroshi SHIBATA
93420d34aa
Added the specific files to the default gems like net-http and optparse 2021-04-19 18:19:09 +09:00
Hiroshi SHIBATA
5d710d7e41
Fix the wrong file detection for net-*.gemspec
[Bug #17476][ruby-core:101724]
2021-04-19 13:44:38 +09:00
Nobuyoshi Nakada
26888d5e03
Workaround for installation failures on macOS 2021-04-15 18:07:23 +09:00
Nobuyoshi Nakada
6c7d39aabe
rbinstall.rb: record default gem files 2021-04-10 12:41:36 +09:00
Nobuyoshi Nakada
af8ac97fcc
rbinstall.rb: append "/" to directory names 2021-04-10 11:59:09 +09:00
Nobuyoshi Nakada
0dad341006
Directory mapping for default gems
To uniform directory structures, sometimes files are gathered in
different directory than the upstreams, executable files in
`libexec` for instance.  Re-map these files to consistent with the
upstreams.
2021-02-14 17:41:26 +09:00
Nobuyoshi Nakada
504d6dc429
Revert following rbinstall.rb changes
Because unexpected names are listed in gemspec files.

* "Fix gemspec only case"
  fc56b96b09

* "Refined installation of gemspecs placed other than ext and lib"
  31f4dec637
2021-02-14 16:57:08 +09:00
Vít Ondruch
763b8fed3d
Use UnpackedInstaller to install default gems.
Use UnpackedInstaller for installation of default gems similarly it is
already used to install bundled gems.

This allows to reuse RubyGems functionality instead of custom code full
of exceptions.
2021-02-14 14:09:05 +09:00
Nobuyoshi Nakada
fc56b96b09
Fix gemspec only case 2021-02-14 13:20:22 +09:00
Nobuyoshi Nakada
31f4dec637
Refined installation of gemspecs placed other than ext and lib 2021-02-14 11:05:23 +09:00
Nobuyoshi Nakada
8544f51ef7
Comment in sh needs to be the beginning of a word 2021-02-11 22:18:11 +09:00
Nobuyoshi Nakada
05e1d87e62
rbinstall.rb: do not install useless files after installed 2020-12-07 23:57:31 +09:00
Nobuyoshi Nakada
91f831ac17
Extract gemspec to versioned file
Not to be overwritten by test-bundler-prepare.  gem files often
contain useless gemspec files which have not been processed.
2020-12-07 23:47:37 +09:00
Nobuyoshi Nakada
e025113d71
rbinstall.rb: relaxed split argument
did_you_mean splits the output by `$/`.
2020-12-07 22:40:46 +09:00
Nobuyoshi Nakada
5894ea5954
rbinstall.rb: fix the position to expand files
As `spec.files` is used for `executables` and so on, the expanded
list needs to be located at the same place.
2020-12-07 22:38:09 +09:00
Nobuyoshi Nakada
29dee10af2
rbinstall.rb: install files expanded from bundled gems
Although gemspec file (e.g., power_assert and rake) often uses
`git ls-files`, as it does not make sense in other than its own
repository, it has been ignored now.  Gather all files expanded
from the bundled gem to install, instead.
2020-12-07 19:09:23 +09:00
Nobuyoshi Nakada
0d78390bfb
rbinstall.rb: OpenStruct has not been needed for years
Since 6f3e8df133 in 2014.
2020-09-11 13:26:20 +09:00
Nobuyoshi Nakada
f79dc8741f
rbinstall.rb: fix generated script name to set mode 2020-07-29 23:02:33 +09:00
Nobuyoshi Nakada
f0affcdbf6
rbinstall.rb: fix dry-run mode 2020-07-29 22:47:00 +09:00
Nobuyoshi Nakada
358f91bf6f
Skip comment and empty lines in gems/bundled_gems file 2020-07-05 18:59:06 +09:00
Nobuyoshi Nakada
1f1b62fb7b
Added install-dbg
Scripts to run the interpreter via debugger.
2020-06-13 08:22:06 +09:00
Jeremy Evans
e0b40ef5d8 Don't convert bundler man pages from mdoc to man
These man pages are already in man format and assuming they are
mdoc format breaks things.

Fixes [Bug #16823]
2020-05-27 07:47:50 +09:00
Nobuyoshi Nakada
3333d02357
rbinstall.rb: get rid of installing duplicate files
Should not overwrite ext/rubyvm/lib/forwardable/impl.rb by
lib/forwardable/impl.rb.
2020-05-09 01:22:16 +09:00
Nobuyoshi Nakada
cc3352cc41
rbinstall.rb: record bundled gem files 2020-05-09 00:55:55 +09:00
Nobuyoshi Nakada
8a6ba10f9d
Do not make disabled directories at installation [Bug #12392] 2020-03-16 17:26:10 +09:00
David Rodríguez
2b6ec768fc
Fix rbinstall bugs (#2930)
* Fix incorrect calls to `Gem.ensure_gem_subdirectories`

This method doesn't take keyword args.

* Remove stuff no longer necessary

Now `Gem.ensure_gem_subdirectories` is doing its job, so some stuff is
no longer needed.

* Use the proper method for default gems

* Respect DESTDIR when creating rubygems folder layout

* Use `Gem.default_specifications_dir`
2020-03-08 10:18:53 +09:00
Vít Ondruch
9bede6e942 Fix wrong RegExp.
The missing `\` in PR #2922 causes the default gems to be installed from
the .gem packages instead from the expanded sources.
2020-02-28 14:32:20 +09:00
Nobuyoshi Nakada
8dab71b9d0
Simplified single script case
Simply use `File.basename` to remove the directory name (and
suffix), instead of `gsub` which can replace unintended parts.
2020-02-26 16:45:35 +09:00
Vít Ondruch
9d6d531527 Cache destination dir.
It is not necessary to strip the `destdir` prefix every iteration, when
it can be done just once.
2020-02-26 11:04:52 +09:00
Vít Ondruch
b8a8fdba63 Properly detect mode for binaries.
.gemspec files specifies not just `bin`, but also other directories.
2020-02-26 11:04:52 +09:00
Vít Ondruch
e087b029e5 Use class variable @src_dir instead of local path.
The local `path` variable does not provide any additional value and was
kept around just for clarity for easier review of the `extrac_files`
method move.
2020-02-26 11:04:52 +09:00
Vít Ondruch
c9fab1ac06 Use local {dir,prog,data}_mode variables instead of globals.
This just gets the `RbInstall::DirPackage` closer by functionality to
`Gem::Package`.
2020-02-26 11:04:52 +09:00
Vít Ondruch
6609940a5e Use $script_mode instead of $prog_mode for gem inistallation.
rbinstall is using `$script_mode` and `$prog_mode`. However, the
`$script_mode` fallbacks to `$prog_mode` if not provided.

However, RubyGems do not distinguish between `$script_mode` and
`$prog_mode`:

92892bbc3a/lib/rubygems/installer.rb (L196)
92892bbc3a/lib/rubygems/installer.rb (L515)
92892bbc3a/lib/rubygems/installer.rb (L543)

Comparing the usage of `$script_mode` and `$prog_mode`, it seems that
the `$script_mode` should be used where RubyGems expects `$prog_mode`.
2020-02-26 11:04:52 +09:00
Vít Ondruch
e960ef6f18 Use Gem::Package like object instead of monkey patching.
1. This is similar to what RubyGems does and it is less magic [[1]].
2. It avoids deprecated code paths in RubyGems [[2]].

[1]: 92892bbc3a/lib/rubygems/installer.rb (L151)
[2]: 92892bbc3a/lib/rubygems/installer.rb (L187)
2020-02-26 11:04:52 +09:00
Nobuyoshi Nakada
55bf0ef1aa Share extracted bundled gems with gems for bundler
Extract bundled gems under ".bundle/gems" and get rid of
duplication which cause constant redefinition warnings at
`test-all` after `extract-gems` and `test-bundler`.
2020-02-25 20:40:36 +09:00
Hiroshi SHIBATA
563f177aa4
UnpackedInstaller on rbinstall.rb is inherited from Gem::Installer.
It also needs to explicitly convert from String to Gem::Package
  with initialization.
2020-02-01 11:31:46 +09:00
Hiroshi SHIBATA
f8df531bbf
Gem::Installer.new(String, options) is obsoleted. Explicitly converted
to Gem::Package from String instance.
2020-02-01 11:23:34 +09:00
Nobuyoshi Nakada
33d02e6bc7
Skip empty directories to install [Bug #16596] 2020-01-28 10:04:25 +09:00
Nobuyoshi Nakada
390293525a
Remove binary data at installation
And revert "Relaxed warning assertions",
6f9be8505d.
2019-11-11 12:20:03 +09:00
卜部昌平
a569bc09e2 add include/ruby/backward/cxxanyargs.hpp
Compilation of extension libraries written in C++ are reportedly
broken due to https://github.com/ruby/ruby/pull/2404

The root cause of this issue was that the definition of ANYARGS
differ between C and C++, and that of C++ is incompatible with the
updated ones.

We are using the incompatibility against itself.  In C++ two distinct
function prototypes can be overloaded.  We provide the old, ANYARGSed
prototypes in addition to the current granular ones; and let the
older ones warn about types.
2019-09-06 15:50:58 +09:00
Yusuke Endoh
8cb9efbbe6 tool/rbinstall.rb: remove a keyword-argument warning 2019-08-31 07:17:46 +09:00
David Rodríguez
3b55394b07 Ensure all default gems have an gem folder
Even if they don't ship with any executables. This makes rbinstall
behaviour consistent with rubygems `gem install --default` command.
2019-08-23 18:20:46 +10:00
Nobuyoshi Nakada
ff3704031a
Insert a newline before =end
For a certain editor which cannot handle here-document properly.
2019-07-15 09:28:44 +09:00
Jeremy Evans
51361272f9 Respect --dest-dir when removing old default gems
Before this, tool/rbinstall would try to remove a gem file that
it may not have access too.

Fixes issue introduced in f550da512c.
2019-06-25 19:02:48 -07:00
hsbt
c52ca1f2ff Revert r58345 and r58371.
These changes break the behavior of default gems. Bug #13428 says
  r58345 is reasonable because gemspec file is installed by `to_ruby_for_cache`
  method. But I revert `to_ruby_for_cache` in rbinstall.rb at r58403.
  There is no reason that we apply r58345 now.

  But I'm not sure about gemspec of default gems affects standalone gems.
  I'm going to investigate it on rubygems/rubygems.

  [Bug #15500][ruby-core:90867]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-19 03:36:22 +00:00
nobu
92c6072ef4 rbinstall.rb: add --exclude option for install-nodoc
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-17 23:23:14 +00:00
hsbt
f550da512c Removed old gemspecs of default gems for the Ruby committers.
[Bug #12764][ruby-core:77284]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-17 13:45:48 +00:00