[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RFS: ruby-bdb [RC]



Hi !

El Domingo, 18 de mayo de 2014 22:17:49 Cédric Boutillier escribió:
> Hi David,
> 
> The changes look great. However, it fails to build here, with an error
> saying it cannot find "bdb". If you want to run the tests at build time,
> you'll probably need (most of) the dependencies to be added to
> Build-Depends too.

Argh ! Sorry I forgot completely about ... I disabled them (they are passing 
all).

Dsc here: 
http://mentors.debian.net/debian/pool/main/d/dhelp/dhelp_0.6.21+nmu4.dsc

Thanks for you patience !

  David
diff -ur dhelp-0.6.21+nmu3/debian/changelog dhelp-0.6.21+nmu4/debian/changelog
--- dhelp-0.6.21+nmu3/debian/changelog	2013-09-22 12:07:33.000000000 +0200
+++ dhelp-0.6.21+nmu4/debian/changelog	2014-05-19 19:12:32.000000000 +0200
@@ -1,3 +1,16 @@
+dhelp (0.6.21+nmu4) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Add support for newer ruby versions (Closes: #734523, #732916)
+  * Cache 'Dpkg.status' calls to not affect performance on every system
+      upgrade (Closes: #712621)
+  * Handle correctly arguments passed to '-a' and '-d' options
+  * Fix error when 'dhelp_parse' is called without arguments
+  * Fix Ruby warnings
+  * Change the encoding of Ruby files to UTF-8
+
+ -- David Suárez <david.sephirot@gmail.com>  Sun, 18 May 2014 13:18:39 +0200
+
 dhelp (0.6.21+nmu3) unstable; urgency=low
 
   * Non-maintainer upload.
diff -ur dhelp-0.6.21+nmu3/debian/control dhelp-0.6.21+nmu4/debian/control
--- dhelp-0.6.21+nmu3/debian/control	2013-05-10 11:46:54.000000000 +0200
+++ dhelp-0.6.21+nmu4/debian/control	2014-05-18 13:09:49.000000000 +0200
@@ -10,9 +10,10 @@
 
 Package: dhelp
 Depends: perl-modules, libtemplate-perl, libhtml-parser-perl,
- liburi-perl, liblocale-gettext-perl, libdata-page-perl, ruby1.8,
- ruby-bdb | libdb-ruby1.8, ruby-debian, ruby-gettext, doc-base,
- swish++, pstotext, poppler-utils, ucf (>= 0.8), ${misc:Depends}
+ liburi-perl, liblocale-gettext-perl, libdata-page-perl,
+ ruby | ruby-interpreter, ruby-bdb, ruby-debian, ruby-gettext,
+ doc-base, swish++, pstotext, poppler-utils, ucf (>= 0.8),
+ ${misc:Depends}
 Recommends: www-browser | html2text
 Suggests: httpd-cgi, info2www, man2html, catdvi
 Architecture: all
Sólo en dhelp-0.6.21+nmu4/debian: stamp-makefile-check
diff -ur dhelp-0.6.21+nmu3/examples/index_package_doc.rb dhelp-0.6.21+nmu4/examples/index_package_doc.rb
--- dhelp-0.6.21+nmu3/examples/index_package_doc.rb	2011-10-22 15:08:12.000000000 +0200
+++ dhelp-0.6.21+nmu4/examples/index_package_doc.rb	2014-05-18 14:09:06.000000000 +0200
@@ -37,10 +37,10 @@
 # If the index doesn't exist, we have to force non-incremental indexing
 options = {}
 index_file = '/var/lib/dhelp/documents.index'
-if File.exists? index_file and File.size(index_file) == 0
+if File.exist? index_file and File.size(index_file) == 0
     FileUtils.rm_f index_file
 end
-unless File.exists? index_file
+unless File.exist? index_file
   options[:incremental] = false
 end
 
diff -ur dhelp-0.6.21+nmu3/lib/dhelp/exporter/cgimap.rb dhelp-0.6.21+nmu4/lib/dhelp/exporter/cgimap.rb
--- dhelp-0.6.21+nmu3/lib/dhelp/exporter/cgimap.rb	2012-06-12 20:59:55.000000000 +0200
+++ dhelp-0.6.21+nmu4/lib/dhelp/exporter/cgimap.rb	2014-05-18 14:09:06.000000000 +0200
@@ -62,9 +62,14 @@
       }
     end
 
+    @@pkgs_status = {}
+    
     # Return true if the package associated to this item is installed.
     def installed?(item)
-      return package_status(item) == "installed"
+      return @@pkgs_status[item] if @@pkgs_status[item] != nil
+      
+      @@pkgs_status[item] = package_status(item) == "installed"
+      return @@pkgs_status[item]
     end
 
   end   # class BaseMap
@@ -93,7 +98,7 @@
         # From debian wheezy's man2html and onwards
         # the script is inside a 'man' subdirectory.
 
-        if File.exists?("/usr/lib/cgi-bin/man/man2html")
+        if File.exist?("/usr/lib/cgi-bin/man/man2html")
           return "<a href=\"/cgi-bin/man/man2html\">" + _(MAN2HTML) + "</a>"
         else
           return "<a href=\"/cgi-bin/man2html\">" + _(MAN2HTML) + "</a>"
diff -ur dhelp-0.6.21+nmu3/lib/dhelp/exporter/html.rb dhelp-0.6.21+nmu4/lib/dhelp/exporter/html.rb
--- dhelp-0.6.21+nmu3/lib/dhelp/exporter/html.rb	2012-06-12 20:59:55.000000000 +0200
+++ dhelp-0.6.21+nmu4/lib/dhelp/exporter/html.rb	2014-05-18 14:05:16.000000000 +0200
@@ -33,7 +33,7 @@
 Don't put files in this directory!
 dhelp will delete *all* files in this directory when creating a new index.
 
-Esteban Manchado Velzquez (zoso@debian.org)
+Esteban Manchado Velázquez (zoso@debian.org)
 EOREADME
       end
     end
@@ -81,7 +81,7 @@
 
       make_page(index_template, export_dir, "index.html")
 
-    rescue Errno::EACCES => e
+    rescue Errno::EACCES # => e
       $stderr.puts "Don't have permissions to regenerate the HTML help"
       exit 1
     end
diff -ur dhelp-0.6.21+nmu3/lib/dhelp.rb dhelp-0.6.21+nmu4/lib/dhelp.rb
--- dhelp-0.6.21+nmu3/lib/dhelp.rb	2012-06-12 20:59:55.000000000 +0200
+++ dhelp-0.6.21+nmu4/lib/dhelp.rb	2014-05-18 14:13:33.000000000 +0200
@@ -1,7 +1,7 @@
 =begin
     Ruby support library for dhelp database access
 
-    Copyright (C) 2005  Esteban Manchado Velzquez
+    Copyright (C) 2005  Esteban Manchado Velázquez
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -544,7 +544,7 @@
 
     # Returns the pending-documents-list-for-indexing contents as an array
     def read_pending_file
-      # Don't use File.exists? to avoid races; use exceptions instead
+      # Don't use File.exist? to avoid races; use exceptions instead
       begin
         IO.readlines(pending_file)
       rescue Errno::ENOENT
@@ -572,7 +572,7 @@
     # Returns true if already indexing
     def is_indexing?
       i_file = (incremental ? "#{index_file}.new" : index_file)
-      File.exists?(i_file) and File.size(i_file) == 0
+      File.exist?(i_file) and File.size(i_file) == 0
     end
 
     # Index the list of given dirs/files with index++. Directories are indexed
@@ -588,7 +588,7 @@
       # If the index doesn't exist yet and we're doing incremental,
       # switch to non-incremental mode and create it.  That way we will
       # have at least a partial index until the next rebuild cron job.
-      if incremental and not File.exists?(index_file)
+      if incremental and not File.exist?(index_file)
         @opts[:incremental] = false
         cmd = "#{indexpp_cmd} #{indexpp_options} -"
       end
diff -ur dhelp-0.6.21+nmu3/Makefile dhelp-0.6.21+nmu4/Makefile
--- dhelp-0.6.21+nmu3/Makefile	2013-09-22 12:03:54.000000000 +0200
+++ dhelp-0.6.21+nmu4/Makefile	2014-05-19 19:13:28.000000000 +0200
@@ -33,13 +33,17 @@
 docdir   = $(DESTDIR_)/share/doc/$(PACKAGE)
 
 # The caller should define VENDOR_RUBY to use the new location for ruby
-# libraries from wheezy and onwards. Undefine it to backport the package
-# to previous Debian releases.
+# libraries from squeeze and onwards; OLD_VENDOR_RUBY for wheezy and onwards.
+# Undefine it to backport the package to previous Debian releases.
 
 ifdef VENDOR_RUBY
-rubydir = $(DESTDIR_)/lib/ruby/vendor_ruby/1.8
+rubydir = $(DESTDIR_)/lib/ruby/vendor_ruby/
 else
+  ifdef OLD_VENDOR_RUBY
+rubydir = $(DESTDIR_)/lib/ruby/vendor_ruby/1.8
+  else
 rubydir = $(DESTDIR_)/lib/ruby/1.8
+  endif
 endif
 
 # Templates and Perl-related variables 
diff -ur dhelp-0.6.21+nmu3/src/dhelp_fetcher.rb dhelp-0.6.21+nmu4/src/dhelp_fetcher.rb
--- dhelp-0.6.21+nmu3/src/dhelp_fetcher.rb	2012-06-12 20:59:55.000000000 +0200
+++ dhelp-0.6.21+nmu4/src/dhelp_fetcher.rb	2014-05-18 14:05:22.000000000 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/ruby1.8 -w
+#!/usr/bin/ruby -w
 
 require 'cgi'
 require 'erb'
diff -ur dhelp-0.6.21+nmu3/src/dhelp_parse.rb dhelp-0.6.21+nmu4/src/dhelp_parse.rb
--- dhelp-0.6.21+nmu3/src/dhelp_parse.rb	2012-06-21 21:47:38.000000000 +0200
+++ dhelp-0.6.21+nmu4/src/dhelp_parse.rb	2014-05-18 14:09:06.000000000 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/ruby1.8 -w
+#!/usr/bin/ruby -w
 
 =begin
     Documentation generator for dhelp
@@ -89,10 +89,12 @@
 
       opts.on('-a FILE[...]', MSG_DOC_ADD) { |files|
         @action = :add
+        files = [files] if files.is_a? String
         @doc_base_files = files
       }
       opts.on('-d FILE[...]', MSG_DOC_RMV) { |files|
         @action = :delete
+        files = [files] if files.is_a? String
         @doc_base_files = files
       }
       opts.on('-i', MSG_INDEX) { @action = :index }
@@ -111,10 +113,15 @@
     end
     optparse.summary_width = 16
     optparse.parse!
+    
+    if @action == nil
+      $stderr.puts optparse
+      exit 1
+    end
   end
 
   def packaged_configured?
-    File.exists? '/var/lib/dhelp/configured'
+    File.exist? '/var/lib/dhelp/configured'
   end
 
   # Adds the documents supplied in command-line to the pool.
@@ -195,9 +202,6 @@
     when :reindex
       # Recreate the pool, without doing a full indexing.
       pool.rebuild(false)
-    else
-      $stderr.puts usage
-      return 1
     end
 
     # Always executed
diff -ur dhelp-0.6.21+nmu3/test/doc-base/pica-manual dhelp-0.6.21+nmu4/test/doc-base/pica-manual
--- dhelp-0.6.21+nmu3/test/doc-base/pica-manual	2011-10-22 15:08:12.000000000 +0200
+++ dhelp-0.6.21+nmu4/test/doc-base/pica-manual	2014-05-18 13:59:45.000000000 +0200
@@ -1,6 +1,6 @@
 Document: pica-manual
 Title: PICA Manual
-Author: Esteban Manchado Velzquez
+Author: Esteban Manchado Velázquez
 Abstract: This manual describes what PICA is
  and how it can be used to administer your
  machines and keep them up-to-date and secure.
diff -ur dhelp-0.6.21+nmu3/test/tc_dhelpdocumentpool.rb dhelp-0.6.21+nmu4/test/tc_dhelpdocumentpool.rb
--- dhelp-0.6.21+nmu3/test/tc_dhelpdocumentpool.rb	2012-06-12 20:59:55.000000000 +0200
+++ dhelp-0.6.21+nmu4/test/tc_dhelpdocumentpool.rb	2014-05-19 19:14:33.000000000 +0200
@@ -106,7 +106,7 @@
     # Now, once everything is indexed, force a reindexing (like the cron job)
     FileUtils.rm_f TEST_INDEX_FILE
     @pool.rebuild
-    assert File.exists?(TEST_INDEX_FILE),
+    assert File.exist?(TEST_INDEX_FILE),
            "Index file should exist after rebuilding"
     assert(File.size(TEST_INDEX_FILE) > 0,
            "Index file should have non-zero size after rebuilding")
diff -ur dhelp-0.6.21+nmu3/test/tc_docbasedocument.rb dhelp-0.6.21+nmu4/test/tc_docbasedocument.rb
--- dhelp-0.6.21+nmu3/test/tc_docbasedocument.rb	2012-05-31 06:35:55.000000000 +0200
+++ dhelp-0.6.21+nmu4/test/tc_docbasedocument.rb	2014-05-18 13:57:52.000000000 +0200
@@ -12,7 +12,7 @@
 
     assert_equal 'pica-manual', file.document
     assert_equal 'PICA Manual', file.title
-    assert_equal 'Esteban Manchado Velzquez', file.author
+    assert_equal 'Esteban Manchado Velázquez', file.author
     assert_equal 'Admin', file.section
     assert_equal "This manual describes what PICA is and how it can be used to administer your machines and keep them up-to-date and secure.", file.abstract
 
diff -ur dhelp-0.6.21+nmu3/test/ts_dhelp.rb dhelp-0.6.21+nmu4/test/ts_dhelp.rb
--- dhelp-0.6.21+nmu3/test/ts_dhelp.rb	2012-05-31 06:35:55.000000000 +0200
+++ dhelp-0.6.21+nmu4/test/ts_dhelp.rb	2014-05-18 14:16:46.000000000 +0200
@@ -1,7 +1,7 @@
 =begin
 Testsuite for the Ruby parts of dhelp
 
-    Copyright (C) 2005  Esteban Manchado Velzquez
+    Copyright (C) 2005  Esteban Manchado Velázquez
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by

Reply to: