r75942 - in /trunk/libcpan-mini-perl: Changes LICENSE MANIFEST META.json META.yml Makefile.PL README bin/minicpan debian/changelog lib/CPAN/Mini.pm lib/CPAN/Mini/App.pm t/app.t xt/fake.t

mxey-guest at users.alioth.debian.org mxey-guest at users.alioth.debian.org
Sat Jun 18 11:55:48 UTC 2011


Author: mxey-guest
Date: Sat Jun 18 11:55:46 2011
New Revision: 75942

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=75942
Log:
New upstream release

Added:
    trunk/libcpan-mini-perl/t/app.t
      - copied unchanged from r75941, branches/upstream/libcpan-mini-perl/current/t/app.t
Modified:
    trunk/libcpan-mini-perl/Changes
    trunk/libcpan-mini-perl/LICENSE
    trunk/libcpan-mini-perl/MANIFEST
    trunk/libcpan-mini-perl/META.json
    trunk/libcpan-mini-perl/META.yml
    trunk/libcpan-mini-perl/Makefile.PL
    trunk/libcpan-mini-perl/README
    trunk/libcpan-mini-perl/bin/minicpan
    trunk/libcpan-mini-perl/debian/changelog
    trunk/libcpan-mini-perl/lib/CPAN/Mini.pm
    trunk/libcpan-mini-perl/lib/CPAN/Mini/App.pm
    trunk/libcpan-mini-perl/xt/fake.t

Modified: trunk/libcpan-mini-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcpan-mini-perl/Changes?rev=75942&op=diff
==============================================================================
--- trunk/libcpan-mini-perl/Changes (original)
+++ trunk/libcpan-mini-perl/Changes Sat Jun 18 11:55:46 2011
@@ -1,4 +1,20 @@
 Revision history for CPAN-Mini
+
+1.111007  2011-05-12 08:21:55 America/New_York
+          run the test minicpan in offline mode to avoid tester errors
+
+1.111006  2011-04-30 14:21:22 America/New_York
+          set the default log_level much earlier, to avoid an undef warning
+
+1.111005  2011-04-29 11:14:10 America/New_York
+          no code changes, this release is just intended to be indexed
+
+1.111004  2011-04-26 08:57:00 America/New_York
+          overhaul logging: there is now a log_level
+
+          delay creation of scratch dir until needed
+
+          a bunch of tests added for switch and config processing
 
 1.111003  2011-04-18 14:17:36 Europe/Amsterdam
           add tools for building a fake cpan and an xt test for testing online

Modified: trunk/libcpan-mini-perl/LICENSE
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcpan-mini-perl/LICENSE?rev=75942&op=diff
==============================================================================
--- trunk/libcpan-mini-perl/LICENSE (original)
+++ trunk/libcpan-mini-perl/LICENSE Sat Jun 18 11:55:46 2011
@@ -18,15 +18,16 @@
 
   The GNU General Public License, Version 1, February 1989
 
-		    GNU GENERAL PUBLIC LICENSE
-		     Version 1, February 1989
+                    GNU GENERAL PUBLIC LICENSE
+                     Version 1, February 1989
 
  Copyright (C) 1989 Free Software Foundation, Inc.
-                59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
+                    51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
 
-			    Preamble
+                            Preamble
 
   The license agreements of most software companies try to keep users
 at the mercy of those companies.  By contrast, our General Public
@@ -67,7 +68,7 @@
   The precise terms and conditions for copying, distribution and
 modification follow.
 
-		    GNU GENERAL PUBLIC LICENSE
+                    GNU GENERAL PUBLIC LICENSE
    TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 
   0. This License Agreement applies to any program or other work which
@@ -185,7 +186,7 @@
 of preserving the free status of all derivatives of our free software and
 of promoting the sharing and reuse of software generally.
 
-			    NO WARRANTY
+                            NO WARRANTY
 
   9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
@@ -207,9 +208,9 @@
 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
 POSSIBILITY OF SUCH DAMAGES.
 
-		     END OF TERMS AND CONDITIONS
-
-	Appendix: How to Apply These Terms to Your New Programs
+                     END OF TERMS AND CONDITIONS
+
+        Appendix: How to Apply These Terms to Your New Programs
 
   If you develop a new program, and you want it to be of the greatest
 possible use to humanity, the best way to achieve this is to make it
@@ -235,8 +236,9 @@
     GNU General Public License for more details.
 
     You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software Foundation,
-    Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA  02110-1301 USA
+
 
 Also add information on how to contact you by electronic and paper mail.
 

Modified: trunk/libcpan-mini-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcpan-mini-perl/MANIFEST?rev=75942&op=diff
==============================================================================
--- trunk/libcpan-mini-perl/MANIFEST (original)
+++ trunk/libcpan-mini-perl/MANIFEST Sat Jun 18 11:55:46 2011
@@ -11,6 +11,7 @@
 lib/CPAN/Mini.pm
 lib/CPAN/Mini/App.pm
 t/00-load.t
+t/app.t
 t/config-file.t
 t/filter.t
 t/release-pod-syntax.t

Modified: trunk/libcpan-mini-perl/META.json
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcpan-mini-perl/META.json?rev=75942&op=diff
==============================================================================
--- trunk/libcpan-mini-perl/META.json (original)
+++ trunk/libcpan-mini-perl/META.json Sat Jun 18 11:55:46 2011
@@ -5,7 +5,7 @@
       "Randal Schwartz <merlyn at stonehenge.com>"
    ],
    "dynamic_config" : 0,
-   "generated_by" : "Dist::Zilla version 4.200005, CPAN::Meta::Converter version 2.110930",
+   "generated_by" : "Dist::Zilla version 4.200006, CPAN::Meta::Converter version 2.110930",
    "license" : [
       "perl_5"
    ],
@@ -17,7 +17,7 @@
    "prereqs" : {
       "configure" : {
          "requires" : {
-            "ExtUtils::MakeMaker" : "6.31"
+            "ExtUtils::MakeMaker" : "6.30"
          }
       },
       "runtime" : {
@@ -46,12 +46,14 @@
    },
    "release_status" : "stable",
    "resources" : {
+      "homepage" : "http://github.com/rjbs/cpan-mini",
       "repository" : {
          "type" : "git",
-         "url" : "git://git.codesimply.com/CPAN-Mini.git"
+         "url" : "http://github.com/rjbs/cpan-mini",
+         "web" : "http://github.com/rjbs/cpan-mini"
       }
    },
-   "version" : "1.111003",
+   "version" : "1.111007",
    "x_Dist_Zilla" : {
       "plugins" : [
          {
@@ -62,77 +64,77 @@
          {
             "class" : "Dist::Zilla::Plugin::GatherDir",
             "name" : "@RJBS/@Basic/GatherDir",
-            "version" : "4.200005"
+            "version" : "4.200006"
          },
          {
             "class" : "Dist::Zilla::Plugin::PruneCruft",
             "name" : "@RJBS/@Basic/PruneCruft",
-            "version" : "4.200005"
+            "version" : "4.200006"
          },
          {
             "class" : "Dist::Zilla::Plugin::ManifestSkip",
             "name" : "@RJBS/@Basic/ManifestSkip",
-            "version" : "4.200005"
+            "version" : "4.200006"
          },
          {
             "class" : "Dist::Zilla::Plugin::MetaYAML",
             "name" : "@RJBS/@Basic/MetaYAML",
-            "version" : "4.200005"
+            "version" : "4.200006"
          },
          {
             "class" : "Dist::Zilla::Plugin::License",
             "name" : "@RJBS/@Basic/License",
-            "version" : "4.200005"
+            "version" : "4.200006"
          },
          {
             "class" : "Dist::Zilla::Plugin::Readme",
             "name" : "@RJBS/@Basic/Readme",
-            "version" : "4.200005"
+            "version" : "4.200006"
          },
          {
             "class" : "Dist::Zilla::Plugin::ExtraTests",
             "name" : "@RJBS/@Basic/ExtraTests",
-            "version" : "4.200005"
+            "version" : "4.200006"
          },
          {
             "class" : "Dist::Zilla::Plugin::ExecDir",
             "name" : "@RJBS/@Basic/ExecDir",
-            "version" : "4.200005"
+            "version" : "4.200006"
          },
          {
             "class" : "Dist::Zilla::Plugin::ShareDir",
             "name" : "@RJBS/@Basic/ShareDir",
-            "version" : "4.200005"
+            "version" : "4.200006"
          },
          {
             "class" : "Dist::Zilla::Plugin::MakeMaker",
             "name" : "@RJBS/@Basic/MakeMaker",
-            "version" : "4.200005"
+            "version" : "4.200006"
          },
          {
             "class" : "Dist::Zilla::Plugin::Manifest",
             "name" : "@RJBS/@Basic/Manifest",
-            "version" : "4.200005"
+            "version" : "4.200006"
          },
          {
             "class" : "Dist::Zilla::Plugin::TestRelease",
             "name" : "@RJBS/@Basic/TestRelease",
-            "version" : "4.200005"
+            "version" : "4.200006"
          },
          {
             "class" : "Dist::Zilla::Plugin::ConfirmRelease",
             "name" : "@RJBS/@Basic/ConfirmRelease",
-            "version" : "4.200005"
+            "version" : "4.200006"
          },
          {
             "class" : "Dist::Zilla::Plugin::UploadToCPAN",
             "name" : "@RJBS/@Basic/UploadToCPAN",
-            "version" : "4.200005"
+            "version" : "4.200006"
          },
          {
             "class" : "Dist::Zilla::Plugin::AutoPrereqs",
             "name" : "@RJBS/AutoPrereqs",
-            "version" : "4.200005"
+            "version" : "4.200006"
          },
          {
             "class" : "Dist::Zilla::Plugin::Git::NextVersion",
@@ -142,32 +144,32 @@
          {
             "class" : "Dist::Zilla::Plugin::PkgVersion",
             "name" : "@RJBS/PkgVersion",
-            "version" : "4.200005"
+            "version" : "4.200006"
          },
          {
             "class" : "Dist::Zilla::Plugin::MetaConfig",
             "name" : "@RJBS/MetaConfig",
-            "version" : "4.200005"
+            "version" : "4.200006"
          },
          {
             "class" : "Dist::Zilla::Plugin::MetaJSON",
             "name" : "@RJBS/MetaJSON",
-            "version" : "4.200005"
+            "version" : "4.200006"
          },
          {
             "class" : "Dist::Zilla::Plugin::NextRelease",
             "name" : "@RJBS/NextRelease",
-            "version" : "4.200005"
+            "version" : "4.200006"
          },
          {
             "class" : "Dist::Zilla::Plugin::PodSyntaxTests",
             "name" : "@RJBS/PodSyntaxTests",
-            "version" : "4.200005"
+            "version" : "4.200006"
          },
          {
             "class" : "Dist::Zilla::Plugin::Repository",
             "name" : "@RJBS/Repository",
-            "version" : "0.17"
+            "version" : "0.18"
          },
          {
             "class" : "Dist::Zilla::Plugin::Prereqs",
@@ -178,7 +180,7 @@
                }
             },
             "name" : "@RJBS/TestMoreWithSubtests",
-            "version" : "4.200005"
+            "version" : "4.200006"
          },
          {
             "class" : "Dist::Zilla::Plugin::PodWeaver",
@@ -186,6 +188,11 @@
             "version" : "3.101641"
          },
          {
+            "class" : "Dist::Zilla::Plugin::GithubMeta",
+            "name" : "@RJBS/GithubMeta",
+            "version" : "0.12"
+         },
+         {
             "class" : "Dist::Zilla::Plugin::Git::Check",
             "name" : "@RJBS/@Git/Check",
             "version" : "1.110500"
@@ -208,22 +215,32 @@
          {
             "class" : "Dist::Zilla::Plugin::FinderCode",
             "name" : ":InstallModules",
-            "version" : "4.200005"
+            "version" : "4.200006"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::FinderCode",
+            "name" : ":IncModules",
+            "version" : "4.200006"
          },
          {
             "class" : "Dist::Zilla::Plugin::FinderCode",
             "name" : ":TestFiles",
-            "version" : "4.200005"
+            "version" : "4.200006"
          },
          {
             "class" : "Dist::Zilla::Plugin::FinderCode",
             "name" : ":ExecFiles",
-            "version" : "4.200005"
+            "version" : "4.200006"
          },
          {
             "class" : "Dist::Zilla::Plugin::FinderCode",
             "name" : ":ShareFiles",
-            "version" : "4.200005"
+            "version" : "4.200006"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::FinderCode",
+            "name" : ":MainModule",
+            "version" : "4.200006"
          }
       ],
       "zilla" : {
@@ -231,7 +248,7 @@
          "config" : {
             "is_trial" : 0
          },
-         "version" : "4.200005"
+         "version" : "4.200006"
       }
    }
 }

Modified: trunk/libcpan-mini-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcpan-mini-perl/META.yml?rev=75942&op=diff
==============================================================================
--- trunk/libcpan-mini-perl/META.yml (original)
+++ trunk/libcpan-mini-perl/META.yml Sat Jun 18 11:55:46 2011
@@ -6,9 +6,9 @@
 build_requires:
   Test::More: 0.96
 configure_requires:
-  ExtUtils::MakeMaker: 6.31
+  ExtUtils::MakeMaker: 6.30
 dynamic_config: 0
-generated_by: 'Dist::Zilla version 4.200005, CPAN::Meta::Converter version 2.110930'
+generated_by: 'Dist::Zilla version 4.200006, CPAN::Meta::Converter version 2.110930'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -30,8 +30,9 @@
   URI: 1
   perl: 5.006
 resources:
-  repository: git://git.codesimply.com/CPAN-Mini.git
-version: 1.111003
+  homepage: http://github.com/rjbs/cpan-mini
+  repository: http://github.com/rjbs/cpan-mini
+version: 1.111007
 x_Dist_Zilla:
   plugins:
     -
@@ -41,63 +42,63 @@
     -
       class: Dist::Zilla::Plugin::GatherDir
       name: '@RJBS/@Basic/GatherDir'
-      version: 4.200005
+      version: 4.200006
     -
       class: Dist::Zilla::Plugin::PruneCruft
       name: '@RJBS/@Basic/PruneCruft'
-      version: 4.200005
+      version: 4.200006
     -
       class: Dist::Zilla::Plugin::ManifestSkip
       name: '@RJBS/@Basic/ManifestSkip'
-      version: 4.200005
+      version: 4.200006
     -
       class: Dist::Zilla::Plugin::MetaYAML
       name: '@RJBS/@Basic/MetaYAML'
-      version: 4.200005
+      version: 4.200006
     -
       class: Dist::Zilla::Plugin::License
       name: '@RJBS/@Basic/License'
-      version: 4.200005
+      version: 4.200006
     -
       class: Dist::Zilla::Plugin::Readme
       name: '@RJBS/@Basic/Readme'
-      version: 4.200005
+      version: 4.200006
     -
       class: Dist::Zilla::Plugin::ExtraTests
       name: '@RJBS/@Basic/ExtraTests'
-      version: 4.200005
+      version: 4.200006
     -
       class: Dist::Zilla::Plugin::ExecDir
       name: '@RJBS/@Basic/ExecDir'
-      version: 4.200005
+      version: 4.200006
     -
       class: Dist::Zilla::Plugin::ShareDir
       name: '@RJBS/@Basic/ShareDir'
-      version: 4.200005
+      version: 4.200006
     -
       class: Dist::Zilla::Plugin::MakeMaker
       name: '@RJBS/@Basic/MakeMaker'
-      version: 4.200005
+      version: 4.200006
     -
       class: Dist::Zilla::Plugin::Manifest
       name: '@RJBS/@Basic/Manifest'
-      version: 4.200005
+      version: 4.200006
     -
       class: Dist::Zilla::Plugin::TestRelease
       name: '@RJBS/@Basic/TestRelease'
-      version: 4.200005
+      version: 4.200006
     -
       class: Dist::Zilla::Plugin::ConfirmRelease
       name: '@RJBS/@Basic/ConfirmRelease'
-      version: 4.200005
+      version: 4.200006
     -
       class: Dist::Zilla::Plugin::UploadToCPAN
       name: '@RJBS/@Basic/UploadToCPAN'
-      version: 4.200005
+      version: 4.200006
     -
       class: Dist::Zilla::Plugin::AutoPrereqs
       name: '@RJBS/AutoPrereqs'
-      version: 4.200005
+      version: 4.200006
     -
       class: Dist::Zilla::Plugin::Git::NextVersion
       name: '@RJBS/Git::NextVersion'
@@ -105,27 +106,27 @@
     -
       class: Dist::Zilla::Plugin::PkgVersion
       name: '@RJBS/PkgVersion'
-      version: 4.200005
+      version: 4.200006
     -
       class: Dist::Zilla::Plugin::MetaConfig
       name: '@RJBS/MetaConfig'
-      version: 4.200005
+      version: 4.200006
     -
       class: Dist::Zilla::Plugin::MetaJSON
       name: '@RJBS/MetaJSON'
-      version: 4.200005
+      version: 4.200006
     -
       class: Dist::Zilla::Plugin::NextRelease
       name: '@RJBS/NextRelease'
-      version: 4.200005
+      version: 4.200006
     -
       class: Dist::Zilla::Plugin::PodSyntaxTests
       name: '@RJBS/PodSyntaxTests'
-      version: 4.200005
+      version: 4.200006
     -
       class: Dist::Zilla::Plugin::Repository
       name: '@RJBS/Repository'
-      version: 0.17
+      version: 0.18
     -
       class: Dist::Zilla::Plugin::Prereqs
       config:
@@ -133,11 +134,15 @@
           phase: test
           type: requires
       name: '@RJBS/TestMoreWithSubtests'
-      version: 4.200005
+      version: 4.200006
     -
       class: Dist::Zilla::Plugin::PodWeaver
       name: '@RJBS/PodWeaver'
       version: 3.101641
+    -
+      class: Dist::Zilla::Plugin::GithubMeta
+      name: '@RJBS/GithubMeta'
+      version: 0.12
     -
       class: Dist::Zilla::Plugin::Git::Check
       name: '@RJBS/@Git/Check'
@@ -157,21 +162,29 @@
     -
       class: Dist::Zilla::Plugin::FinderCode
       name: ':InstallModules'
-      version: 4.200005
+      version: 4.200006
+    -
+      class: Dist::Zilla::Plugin::FinderCode
+      name: ':IncModules'
+      version: 4.200006
     -
       class: Dist::Zilla::Plugin::FinderCode
       name: ':TestFiles'
-      version: 4.200005
+      version: 4.200006
     -
       class: Dist::Zilla::Plugin::FinderCode
       name: ':ExecFiles'
-      version: 4.200005
+      version: 4.200006
     -
       class: Dist::Zilla::Plugin::FinderCode
       name: ':ShareFiles'
-      version: 4.200005
+      version: 4.200006
+    -
+      class: Dist::Zilla::Plugin::FinderCode
+      name: ':MainModule'
+      version: 4.200006
   zilla:
     class: Dist::Zilla::Dist::Builder
     config:
       is_trial: 0
-    version: 4.200005
+    version: 4.200006

Modified: trunk/libcpan-mini-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcpan-mini-perl/Makefile.PL?rev=75942&op=diff
==============================================================================
--- trunk/libcpan-mini-perl/Makefile.PL (original)
+++ trunk/libcpan-mini-perl/Makefile.PL Sat Jun 18 11:55:46 2011
@@ -4,7 +4,7 @@
 
 BEGIN { require 5.006; }
 
-use ExtUtils::MakeMaker 6.31;
+use ExtUtils::MakeMaker 6.30;
 
 
 
@@ -15,7 +15,7 @@
     'Test::More' => '0.96'
   },
   'CONFIGURE_REQUIRES' => {
-    'ExtUtils::MakeMaker' => '6.31'
+    'ExtUtils::MakeMaker' => '6.30'
   },
   'DISTNAME' => 'CPAN-Mini',
   'EXE_FILES' => [
@@ -38,7 +38,7 @@
     'Pod::Usage' => '1.00',
     'URI' => '1'
   },
-  'VERSION' => '1.111003',
+  'VERSION' => '1.111007',
   'test' => {
     'TESTS' => 't/*.t'
   }

Modified: trunk/libcpan-mini-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcpan-mini-perl/README?rev=75942&op=diff
==============================================================================
--- trunk/libcpan-mini-perl/README (original)
+++ trunk/libcpan-mini-perl/README Sat Jun 18 11:55:46 2011
@@ -1,7 +1,7 @@
 
 
 This archive contains the distribution CPAN-Mini,
-version 1.111003:
+version 1.111007:
 
   create a minimal mirror of CPAN
 

Modified: trunk/libcpan-mini-perl/bin/minicpan
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcpan-mini-perl/bin/minicpan?rev=75942&op=diff
==============================================================================
--- trunk/libcpan-mini-perl/bin/minicpan (original)
+++ trunk/libcpan-mini-perl/bin/minicpan Sat Jun 18 11:55:46 2011
@@ -17,27 +17,29 @@
 
 =head1 VERSION
 
-version 1.111003
+version 1.111007
 
 =head1 SYNOPSIS
 
  minicpan [options]
 
  Options
-   -l LOCAL   - where is the local minicpan?     (required)
-   -r REMOTE  - where is the remote cpan mirror? (required)
-   -d 0###    - permissions (numeric) to use when creating directories
-   -f         - check all directories, even if indices are unchanged
-   -p         - mirror perl, ponie, and parrot distributions
-   -q         - run in quiet mode (don't print status)
-   -qq        - run in silent mode (don't even print warnings)
-   -c CLASS   - what class to use to mirror (default: CPAN::Mini)
-   -C FILE    - what config file to use (default: ~/.minicpanrc)
-   -h         - print help and exit
-   -v         - print version and exit
-   -x         - build an exact mirror, getting even normally disallowed files
-   -t SEC     - timeout in sec. Defaults to 180 sec
-   --offline  - operate in offline mode (generally: do nothing)
+   -l LOCAL    - where is the local minicpan?     (required)
+   -r REMOTE   - where is the remote cpan mirror? (required)
+   -d 0###     - permissions (numeric) to use when creating directories
+   -f          - check all directories, even if indices are unchanged
+   -p          - mirror perl, ponie, and parrot distributions
+   --debug     - run in debug mode (print even banal messages)
+   -q          - run in quiet mode (don't print status)
+   -qq         - run in silent mode (don't even print warnings)
+   -c CLASS    - what class to use to mirror (default: CPAN::Mini)
+   -C FILE     - what config file to use (default: ~/.minicpanrc)
+   -h          - print help and exit
+   -v          - print version and exit
+   -x          - build an exact mirror, getting even normally disallowed files
+   -t SEC      - timeout in sec. Defaults to 180 sec
+   --offline   - operate in offline mode (generally: do nothing)
+   --log-level - provide a log level; instead of --debug, -q, or -qq
 
 =head1 DESCRIPTION
 

Modified: trunk/libcpan-mini-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcpan-mini-perl/debian/changelog?rev=75942&op=diff
==============================================================================
--- trunk/libcpan-mini-perl/debian/changelog (original)
+++ trunk/libcpan-mini-perl/debian/changelog Sat Jun 18 11:55:46 2011
@@ -1,3 +1,9 @@
+libcpan-mini-perl (1.111007-1) UNRELEASED; urgency=low
+
+  * New upstream release
+
+ -- Maximilian Gass <mxey at cloudconnected.org>  Sat, 18 Jun 2011 13:55:28 +0200
+
 libcpan-mini-perl (1.111003-1) unstable; urgency=low
 
   [ gregor herrmann ]

Modified: trunk/libcpan-mini-perl/lib/CPAN/Mini.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcpan-mini-perl/lib/CPAN/Mini.pm?rev=75942&op=diff
==============================================================================
--- trunk/libcpan-mini-perl/lib/CPAN/Mini.pm (original)
+++ trunk/libcpan-mini-perl/lib/CPAN/Mini.pm Sat Jun 18 11:55:46 2011
@@ -4,7 +4,7 @@
 
 package CPAN::Mini;
 BEGIN {
-  $CPAN::Mini::VERSION = '1.111003';
+  $CPAN::Mini::VERSION = '1.111007';
 }
 
 # ABSTRACT: create a minimal mirror of CPAN
@@ -33,9 +33,9 @@
   $self = $self->new(@_) unless ref $self;
 
   unless ($self->{offline}) {
-    $self->trace("Updating $self->{local}\n");
-    $self->trace("Mirroring from $self->{remote}\n");
-    $self->trace("=" x 63 . "\n");
+    $self->log("Updating $self->{local}");
+    $self->log("Mirroring from $self->{remote}");
+    $self->log("=" x 63);
 
     # mirrored tracks the already done, keyed by filename
     # 1 = local-checked, 2 = remote-mirrored
@@ -70,7 +70,7 @@
   open my $recent_fh, '>', $recent or die "can't open $recent for writing: $!";
 
   for my $file (sort keys %{ $self->{recent} }) {
-    print $recent_fh "$file\n" or die "can't write to $recent: $!";
+    print {$recent_fh} "$file\n" or die "can't write to $recent: $!";
   }
 
   die "error closing $recent: $!" unless close $recent_fh;
@@ -83,8 +83,10 @@
   my %mirror_list;
 
   # now walk the packages list
-  my $details = File::Spec->catfile($self->{scratch},
-    qw(modules 02packages.details.txt.gz));
+  my $details = File::Spec->catfile(
+    $self->_scratch_dir,
+    qw(modules 02packages.details.txt.gz)
+  );
 
   my $gz = Compress::Zlib::gzopen($details, "rb")
     or die "Cannot open details: $Compress::Zlib::gzerrno";
@@ -116,7 +118,8 @@
     changes_made => 0,
     dirmode      => 0711,  ## no critic Zero
     errors       => 1,
-    mirrored     => {}
+    mirrored     => {},
+    log_level    => 'info',
   );
 
   my $self = bless { %defaults, @_ } => $class;
@@ -124,7 +127,6 @@
   $self->{dirmode} = $defaults{dirmode} unless defined $self->{dirmode};
 
   $self->{recent} = {};
-  $self->{scratch} ||= File::Temp::tempdir(CLEANUP => 1);
 
   Carp::croak "no local mirror supplied" unless $self->{local};
 
@@ -139,7 +141,7 @@
     File::Path::mkpath(
       $self->{local},
       {
-        verbose => $self->{trace},
+        verbose => $self->{log_level} eq 'debug',
         mode    => $self->{dirmode},
       },
     );
@@ -185,14 +187,24 @@
   );
 }
 
+sub _scratch_dir {
+  my ($self) = @_;
+
+  $self->{scratch} ||= File::Temp::tempdir(CLEANUP => 1);
+  return $self->{scratch};
+}
+
 sub mirror_indices {
   my $self = shift;
 
-  $self->_make_index_dirs($self->{scratch});
+  $self->_make_index_dirs($self->_scratch_dir);
 
   for my $path ($self->_fixed_mirrors) {
     my $local_file   = File::Spec->catfile($self->{local},   split m{/}, $path);
-    my $scratch_file = File::Spec->catfile($self->{scratch}, split m{/}, $path);
+    my $scratch_file = File::Spec->catfile(
+      $self->_scratch_dir,
+      split(m{/}, $path),
+    );
 
     File::Copy::copy($local_file, $scratch_file);
 
@@ -212,7 +224,7 @@
 
 sub _make_index_dirs {
   my ($self, $base_dir, $dir_mode, $trace) = @_;
-  $base_dir ||= $self->{scratch};
+  $base_dir ||= $self->_scratch_dir;
   $dir_mode = 0711 if !defined $dir_mode;  ## no critic Zero
   $trace    = 0    if !defined $trace;
 
@@ -227,15 +239,21 @@
 sub _install_indices {
   my $self = shift;
 
-  $self->_make_index_dirs($self->{local}, $self->{dirmode}, $self->{trace});
+  $self->_make_index_dirs(
+    $self->{local},
+    $self->{dirmode},
+    $self->{log_level} eq 'debug',
+  );
 
   for my $file ($self->_fixed_mirrors) {
     my $local_file = File::Spec->catfile($self->{local}, split m{/}, $file);
 
     unlink $local_file;
 
-    File::Copy::copy(File::Spec->catfile($self->{scratch}, split m{/}, $file),
-      $local_file,);
+    File::Copy::copy(
+      File::Spec->catfile($self->_scratch_dir, split m{/}, $file),
+      $local_file,
+    );
 
     $self->{mirrored}{$local_file} = 1;
   }
@@ -254,7 +272,7 @@
 
   # native absolute file
   my $local_file = File::Spec->catfile(
-    $arg->{to_scratch} ? $self->{scratch} : $self->{local},
+    $arg->{to_scratch} ? $self->_scratch_dir : $self->{local},
     split m{/}, $path
   );
 
@@ -270,29 +288,26 @@
     File::Path::mkpath(
       File::Basename::dirname($local_file),
       {
-        verbose => $self->{trace},
+        verbose => $self->{log_level} eq 'debug',
         mode    => $self->{dirmode},
       },
     );
 
-    $self->trace($path);
+    $self->log($path, { no_nl => 1 });
     my $res = $self->{__lwp}->mirror($remote_uri, $local_file);
 
     if ($res->is_success) {
       utime undef, undef, $local_file if $arg->{update_times};
       $checksum_might_be_up_to_date = 0;
       $self->_recent($path);
-      $self->trace(" ... updated\n");
+      $self->log(" ... updated");
       $self->{changes_made}++;
     } elsif ($res->code != 304) {  # not modified
-      warn(
-        ($self->{trace} ? "\n" : q{})
-        . "$remote_uri: "
-        . $res->status_line . "\n"
-      ) if $self->{errors};
+      $self->log(" ... resulted in an HTTP error with status " . $res->code);
+      $self->log_warn("$remote_uri: " . $res->status_line);
       return;
     } else {
-      $self->trace(" ... up to date\n");
+      $self->log(" ... up to date");
     }
   }
 
@@ -376,13 +391,8 @@
 
     return unless (-f $file and not $self->{mirrored}{$file});
     return if $self->file_allowed($file);
-    $self->trace("cleaning $file ...");
-
-    if ($self->clean_file($file)) {
-      $self->trace("done\n");
-    } else {
-      $self->trace("couldn't be cleaned\n");
-    }
+
+    $self->clean_file($file);
 
   }, $self->{local};
 }
@@ -392,17 +402,44 @@
   my ($self, $file) = @_;
 
   unless (unlink $file) {
-    warn "$file ... cannot be removed: $!\n" if $self->{errors};
+    $self->log_warn("$file cannot be removed: $!");
     return;
   }
 
+  $self->log("$file removed");
+
   return 1;
 }
 
 
-sub trace {
-  my ($self, $message) = @_;
-  print { $self->_trace_fh } $message;
+sub log_level {
+  return $_[0]->{log_level} if ref $_[0];
+  return 'info';
+}
+
+sub log_unconditionally {
+  my ($self, $message, $arg) = @_;
+  $arg ||= {};
+
+  print($message, $arg->{no_nl} ? () : "\n");
+}
+
+sub log_warn {
+  return if $_[0]->log_level eq 'fatal';
+  $_[0]->log_unconditionally($_[1], $_[2]);
+}
+
+sub log {
+  return unless $_[0]->log_level =~ /\A(?:info|debug)\z/;
+  $_[0]->log_unconditionally($_[1], $_[2]);
+}
+
+sub trace { my $self = shift; $self->log_info(@_); }
+
+sub log_debug {
+  my ($self, @rest) = @_;
+  return unless $_[0]->log_level eq 'debug';
+  $_[0]->log_unconditionally($_[1], $_[2]);
 }
 
 
@@ -438,8 +475,8 @@
 
   # This is ugly, but lets us respect -qq for now even before we have an
   # object.  I think a better fix is warranted. -- rjbs, 2010-03-04
-  $class->trace("Using config from $config_file\n")
-    unless $options->{quiet};
+  $class->log("Using config from $config_file")
+    if ($options->{log_level}||'info') =~ /\A(?:warn|fatal)\z/;
 
   return unless -e $config_file;
 
@@ -489,34 +526,6 @@
   );
 }
 
-sub __default_fh { *STDOUT{IO} }
-
-# stolen from IO::Interactive
-local (*DEV_NULL, *DEV_NULL2);
-my $dev_null;
-
-BEGIN {
-  pipe *DEV_NULL, *DEV_NULL2
-    or die "Internal error: can't create null filehandle";
-  $dev_null = \*DEV_NULL;
-}
-
-sub __quiet_fh { $dev_null }
-
-sub _trace_fh {
-  my ($either) = @_;
-
-  return do {
-    if (ref $either and defined $either->{trace} and !$either->{trace}) {
-      $either->__quiet_fh;
-    } elsif (eval { $either->can('_default_fh'); }) {
-      $either->__default_fh;
-    } else {
-      __default_fh();
-    }
-  };
-}
-
 
 1;
 
@@ -529,7 +538,7 @@
 
 =head1 VERSION
 
-version 1.111003
+version 1.111007
 
 =head1 SYNOPSIS
 
@@ -541,7 +550,7 @@
   CPAN::Mini->update_mirror(
     remote => "http://cpan.mirrors.comintern.su",
     local  => "/usr/share/mirrors/cpan",
-    trace  => 1
+    log_level => 'debug',
   );
 
 =head1 DESCRIPTION
@@ -574,12 +583,12 @@
 
 =head2 update_mirror
 
- CPAN::Mini->update_mirror(
-   remote => "http://cpan.mirrors.comintern.su",
-   local  => "/usr/share/mirrors/cpan",
-   force  => 0,
-   trace  => 1
- );
+  CPAN::Mini->update_mirror(
+    remote => "http://cpan.mirrors.comintern.su",
+    local  => "/usr/share/mirrors/cpan",
+    force  => 0,
+    log_level => 'debug',
+  );
 
 This is the only method that need be called from outside this module.  It will
 update the local mirror with the files from the remote mirror.   
@@ -631,9 +640,9 @@
 
 =item *
 
-C<trace>
-
-If true, CPAN::Mini will print status messages to STDOUT as it works.
+C<log_level>
+
+This defines the minimum level of message to log: debug, info, warn, or fatal
 
 =item *
 
@@ -751,16 +760,22 @@
 This method, called by C<clean_unmirrored>, deletes the named file.  It returns
 true if the file is successfully unlinked.  Otherwise, it returns false.
 
-=head2 trace
-
-  $minicpan->trace($message);
-
-If the object is mirroring verbosely, this method will print messages sent to
-it.
+=head2 log_warn
+
+=head2 log
+
+=head2 log_debug
+
+  $minicpan->log($message);
+
+This will log (print) the given message unless the log level is too loo.
+
+C<log>, which logs at the I<info> level, may also be called as C<trace> for
+backward compatibility reasons.
 
 =head2 read_config
 
-  my %config = CPAN::Mini->read_config;
+  my %config = CPAN::Mini->read_config(\%options);
 
 This routine returns a set of arguments that can be passed to CPAN::Mini's
 C<new> or C<update_mirror> methods.  It will look for a file called

Modified: trunk/libcpan-mini-perl/lib/CPAN/Mini/App.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcpan-mini-perl/lib/CPAN/Mini/App.pm?rev=75942&op=diff
==============================================================================
--- trunk/libcpan-mini-perl/lib/CPAN/Mini/App.pm (original)
+++ trunk/libcpan-mini-perl/lib/CPAN/Mini/App.pm Sat Jun 18 11:55:46 2011
@@ -3,7 +3,7 @@
 
 package CPAN::Mini::App;
 BEGIN {
-  $CPAN::Mini::App::VERSION = '1.111003';
+  $CPAN::Mini::App::VERSION = '1.111007';
 }
 
 # ABSTRACT: the guts of the minicpan command
@@ -25,33 +25,82 @@
 }
 
 
+sub _validate_log_level {
+  my ($class, $level) = @_;
+  return $level if $level =~ /\A(?:fatal|warn|debug|info)\z/;
+  die "unknown logging level: $level\n";
+}
+
 sub run {
+  my ($class) = @_;
+
+  my $minicpan = $class->initialize_minicpan;
+
+  $minicpan->update_mirror;
+}
+
+sub initialize_minicpan {
+  my ($class) = @_;
+
   my $version;
 
   my %commandline;
+
+  my ($quiet, $debug, $log_level);
+
   GetOptions(
-    "c|class=s"   => \$commandline{class},
-    "C|config=s"  => \$commandline{config_file},
-    "h|help"      => sub { pod2usage(1); },
-    "v|version"   => sub { $version = 1 },
-    "l|local=s"   => \$commandline{local},
-    "r|remote=s"  => \$commandline{remote},
-    "d|dirmode=s" => \$commandline{dirmode},
-    "qq"          => sub { $commandline{quiet} = 2; $commandline{errors} = 0; },
+    'c|class=s'   => \$commandline{class},
+
+    # These two options will cause the program to exit before finishing ->run
+    'h|help'      => sub { pod2usage(1); },
+    'v|version'   => sub { $version = 1 },
+
+    # How noisy should we be?
+    'quiet|q+'    => \$quiet,
+    'qq'          => sub { $quiet = 2 },
+    'debug'       => \$debug,
+    'log-level=s' => \$log_level,
+
+    'l|local=s'   => \$commandline{local},
+    'r|remote=s'  => \$commandline{remote},
+
+    'd|dirmode=s' => \$commandline{dirmode},
     'offline'     => \$commandline{offline},
-    "q+"          => \$commandline{quiet},
-    "f+"          => \$commandline{force},
-    "p+"          => \$commandline{perl},
-    "x+"          => \$commandline{exact_mirror},
-    "t|timeout=i" => \$commandline{timeout},
+    'f'           => \$commandline{force},
+    'p'           => \$commandline{perl},
+    'x'           => \$commandline{exact_mirror},
+    't|timeout=i' => \$commandline{timeout},
+
+    # Where to look for config not provided on the command line:
+    'C|config=s'  => \$commandline{config_file},
   ) or pod2usage(2);
 
-  my %config = CPAN::Mini->read_config(\%commandline);
+  die "can't mix --debug, --log-level, and --debug\n"
+    if defined($quiet) + defined($debug) + defined($log_level) > 1;
+
+  $quiet ||= 0;
+  $log_level = $debug      ? 'debug'
+             : $quiet == 1 ? 'warn'
+             : $quiet >= 2 ? 'fatal'
+             : $log_level  ? $log_level
+             :               undef;
+
+  $class->_validate_log_level($log_level) if defined $log_level;
+
+  my %config = CPAN::Mini->read_config({
+    log_level => 'info',
+    %commandline
+  });
+
   $config{class} ||= 'CPAN::Mini';
 
   foreach my $key (keys %commandline) {
     $config{$key} = $commandline{$key} if defined $commandline{$key};
   }
+
+  $config{log_level} = $log_level || $config{log_level} || 'info';
+
+  $class->_validate_log_level($config{log_level});
 
   eval "require $config{class}";
   die $@ if $@;
@@ -62,10 +111,9 @@
   $|++;
   $config{dirmode} &&= oct($config{dirmode});
 
-  $config{class}->update_mirror(
+  return $config{class}->new(
     remote         => $config{remote},
     local          => $config{local},
-    trace          => (not $config{quiet}),
     force          => $config{force},
     offline        => $config{offline},
     also_mirror    => $config{also_mirror},
@@ -77,7 +125,8 @@
     timeout        => $config{timeout},
     ignore_source_control => $config{ignore_source_control},
     (defined $config{dirmode} ? (dirmode => $config{dirmode}) : ()),
-    (defined $config{errors}  ? (errors  => $config{errors})  : ()),
+
+    log_level      => $config{log_level},
   );
 }
 
@@ -93,7 +142,7 @@
 
 =head1 VERSION
 
-version 1.111003
+version 1.111007
 
 =head1 SYNOPSIS
 

Modified: trunk/libcpan-mini-perl/xt/fake.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcpan-mini-perl/xt/fake.t?rev=75942&op=diff
==============================================================================
--- trunk/libcpan-mini-perl/xt/fake.t (original)
+++ trunk/libcpan-mini-perl/xt/fake.t Sat Jun 18 11:55:46 2011
@@ -14,7 +14,7 @@
 CPAN::Mini->update_mirror(
   remote => "http://fakecpan.org/fake/minicpan/1.001/cpan",
   local  => $tempdir,
-  trace  => 0,
+  log_level  => 'fatal',
 );
 
 pass("performed initial mirror");
@@ -22,7 +22,7 @@
 CPAN::Mini->update_mirror(
   remote => "http://fakecpan.org/fake/minicpan/1.002/cpan",
   local  => $tempdir,
-  trace  => 0,
+  log_level  => 'fatal',
 );
 
 pass("performed mirror update");




More information about the Pkg-perl-cvs-commits mailing list