-
Notifications
You must be signed in to change notification settings - Fork 447
Closed
Labels
Description
I package httpclient-2.2.4 for Fedora 16, execute commands like this:
RPM_SOURCE_DIR="/home/packager/rpmbuild/SOURCES"
RPM_BUILD_DIR="/home/packager/rpmbuild/BUILD"
RPM_OPT_FLAGS="-O2 -g -march=i386 -mtune=i686"
RPM_LD_FLAGS=""
RPM_ARCH="i386"
RPM_OS="linux"
export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_LD_FLAGS RPM_ARCH RPM_OS
RPM_DOC_DIR="/usr/share/doc"
export RPM_DOC_DIR
RPM_PACKAGE_NAME="rubygem-httpclient"
RPM_PACKAGE_VERSION="2.2.4"
RPM_PACKAGE_RELEASE="1.fc16"
export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE
LANG=C
export LANG
unset CDPATH DISPLAY ||:
RPM_BUILD_ROOT="/home/packager/rpmbuild/BUILDROOT/rubygem-httpclient-2.2.4-1.fc16.i386"
export RPM_BUILD_ROOT
PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/share/pkgconfig"
export PKG_CONFIG_PATH
set -x
umask 022
cd "/home/packager/rpmbuild/BUILD"
cd '/home/packager/rpmbuild/BUILD'
rm -rf 'rubygem-httpclient-2.2.4'
/bin/mkdir -p rubygem-httpclient-2.2.4
cd 'rubygem-httpclient-2.2.4'
/bin/chmod -Rf a+rX,u+w,g-w,o-w .
mkdir -p ./usr/lib/ruby/gems/1.8
gem install -V --local --install-dir ./usr/lib/ruby/gems/1.8 \
--force /home/packager/rpmbuild/SOURCES/httpclient-2.2.4.gem
Then get error output like this:
Installing ri documentation for httpclient-2.2.4...
rdoc --ri --op /home/packager/rpmbuild/BUILD/rubygem-httpclient-2.2.4/usr/lib/ruby/gems/1.8/doc/httpclient-2.2.4/ri lib --title httpclient-2.2.4 Documentation
httpclient.rb: ccc.cccccc.....
RDoc failure in lib/httpclient.rb at or around line 405 column 16
Before reporting this, could you check that the file
you're documenting compiles cleanly--RDoc is not a
full Ruby parser, and gets confused easily if fed
invalid programs.
The internal error was:
ERROR: While generating documentation for httpclient-2.2.4
... MESSAGE: undefined method `name' for #<RubyToken::TkLPAREN:0xb722b214>
... RDOC args: --ri --op /home/packager/rpmbuild/BUILD/rubygem-httpclient-2.2.4/usr/lib/ruby/gems/1.8/doc/httpclient-2.2.4/ri lib --title httpclient-2.2.4 Documentation
I check httpclient.rb,
[packager@x86 lib]$ ruby -c httpclient.rb
Syntax OK
And here is some lines of httpclient.rb:
397
398 # webmock 1.6.2 depends on HTTP::Message#body.content to work.
399 # let's keep it work iif webmock is loaded for a while.
400 def keep_webmock_compat
401 if respond_to?(:do_get_block_with_webmock)
402 ::HTTP::Message.module_eval do
403 def body
404 def (o = self.content).content
405 self
406 end
407 o
408 end
409 end
410 end
411 end
412
413 # Returns debug device if exists. See debug_dev=.
414 def debug_dev
415 @debug_dev
416 end
417
418 # Sets debug device. Once debug device is set, all HTTP requests and
419 # responses are dumped to given device. dev must respond to << for dump.
420 #
421 # Calling this method resets all existing sessions.
422 def debug_dev=(dev)
423 @debug_dev = dev
424 reset_all
425 @session_manager.debug_dev = dev
426 end
427
428 # Returns URI object of HTTP proxy if exists.
429 def proxy
430 @proxy
431 end
I try the command 'rdoc -D httpclient.rb', and get the following errors:
#<RubyToken::TkIDENTIFIER:0xb754cd30 @name="body", @text="body", @char_no=12, @line_no=404>
#<RubyToken::TkNL:0xb754cb14 @text="\n", @char_no=16, @line_no=404>
#<RubyToken::TkSPACE:0xb754c650 @text=" ", @char_no=0, @line_no=405>
#<RubyToken::TkDEF:0xb754c2cc @name="def", @text="def", @char_no=10, @line_no=405>
Param: #<RubyToken::TkNL:0xb754cb14 @text="\n", @char_no=16, @line_no=404>, false EXPR_FNAME 0
directive: #<RubyToken::TkDEF:0xb754c2cc @name="def", @text="def", @char_no=10, @line_no=405>
Adding public method body to HTTPClient
.#<RubyToken::TkSPACE:0xb754bc3c @text=" ", @char_no=13, @line_no=405>
#<RubyToken::TkLPAREN:0xb754ba5c @text="(", @char_no=14, @line_no=405>
#<RubyToken::TkIDENTIFIER:0xb754b69c @name="o", @text="o", @char_no=15, @line_no=405>
Exception `NoMethodError' at /usr/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:1941 - undefined method `name' for #<RubyToken::TkLPAREN:0xb754ba5c>
RDoc failure in httpclient.rb at or around line 405 column 16
Before reporting this, could you check that the file
you're documenting compiles cleanly--RDoc is not a
full Ruby parser, and gets confused easily if fed
invalid programs.
The internal error was:
Exception `NoMethodError' at /usr/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:1419 - undefined method `name' for #<RubyToken::TkLPAREN:0xb754ba5c>
/usr/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:1941:in `parse_method': undefined method `name' for #<RubyToken::TkLPAREN:0xb754ba5c> (NoMethodError)
from /usr/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:1640:in `parse_statements'
from /usr/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:1985:in `parse_method'
from /usr/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:1640:in `parse_statements'
[packager@x86 lib]$ rdoc -D httpclient.rb
Exception `Errno::ENOENT' at /usr/lib/ruby/1.8/rdoc/rdoc.rb:117 - No such file or directory - doc/created.rid
Exception `RDoc::RDocError' at /usr/lib/ruby/1.8/rdoc/rdoc.rb:101 -
Directory doc already exists, but it looks like it
isn't an RDoc directory. Because RDoc doesn't want to risk
destroying any of your existing files, you'll need to
specify a different output directory name (using the
--op <dir> option).
Directory doc already exists, but it looks like it
isn't an RDoc directory. Because RDoc doesn't want to risk
destroying any of your existing files, you'll need to
specify a different output directory name (using the
--op <dir> option).
My system infomation is:
[packager@x86 lib]$ uname -a;ruby -v;rdoc -v
Linux x86.nay 3.3.2-6.fc16.i686.PAE #1 SMP Sat Apr 21 13:02:14 UTC 2012 i686 i686 i386 GNU/Linux
ruby 1.8.7 (2012-02-08 patchlevel 358) [i386-linux]
RDoc V1.0.1 - 20041108