r54539 - in /branches/upstream/libarch-perl/current: ./ perllib/Arch/ tests/

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Fri Mar 19 02:53:05 UTC 2010


Author: jawnsy-guest
Date: Fri Mar 19 02:52:58 2010
New Revision: 54539

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=54539
Log:
[svn-upgrade] Integrating new upstream version, libarch-perl (0.5.2)

Added:
    branches/upstream/libarch-perl/current/MANIFEST
    branches/upstream/libarch-perl/current/META.yml
Removed:
    branches/upstream/libarch-perl/current/.arch-inventory
Modified:
    branches/upstream/libarch-perl/current/INSTALL
    branches/upstream/libarch-perl/current/Makefile.PL
    branches/upstream/libarch-perl/current/NEWS
    branches/upstream/libarch-perl/current/README
    branches/upstream/libarch-perl/current/perllib/Arch/Util.pm
    branches/upstream/libarch-perl/current/tests/inventory-1
    branches/upstream/libarch-perl/current/tests/registry-1
    branches/upstream/libarch-perl/current/tests/session-1
    branches/upstream/libarch-perl/current/tests/test-archive-1
    branches/upstream/libarch-perl/current/tests/test-framework-1
    branches/upstream/libarch-perl/current/tests/test-tree-1
    branches/upstream/libarch-perl/current/tests/tree-1
    branches/upstream/libarch-perl/current/tests/tree-2
    branches/upstream/libarch-perl/current/tests/tree-3
    branches/upstream/libarch-perl/current/tests/util-2

Modified: branches/upstream/libarch-perl/current/INSTALL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libarch-perl/current/INSTALL?rev=54539&op=diff
==============================================================================
--- branches/upstream/libarch-perl/current/INSTALL (original)
+++ branches/upstream/libarch-perl/current/INSTALL Fri Mar 19 02:52:58 2010
@@ -6,3 +6,6 @@
 	make install
 
 Optionally, the first command accepts PREFIX=/home/joe/perl option.
+
+Please note that you need to install tla (or its equivalent, like baz)
+to make this perl library useful.

Added: branches/upstream/libarch-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libarch-perl/current/MANIFEST?rev=54539&op=file
==============================================================================
--- branches/upstream/libarch-perl/current/MANIFEST (added)
+++ branches/upstream/libarch-perl/current/MANIFEST Fri Mar 19 02:52:58 2010
@@ -1,0 +1,74 @@
+AUTHORS
+COPYING
+Makefile.PL
+MANIFEST
+INSTALL
+NEWS
+README
+TODO
+doc/CodingStyle
+perllib/Arch.pm
+perllib/Arch/Backend.pm
+perllib/Arch/Changes.pm
+perllib/Arch/Changeset.pm
+perllib/Arch/DiffParser.pm
+perllib/Arch/FileHighlighter.pm
+perllib/Arch/Inventory.pm
+perllib/Arch/Library.pm
+perllib/Arch/LiteWeb.pm
+perllib/Arch/Log.pm
+perllib/Arch/Name.pm
+perllib/Arch/Registry.pm
+perllib/Arch/RevisionBunches.pm
+perllib/Arch/Run.pm
+perllib/Arch/RunLimit.pm
+perllib/Arch/Session.pm
+perllib/Arch/SharedCache.pm
+perllib/Arch/SharedIndex.pm
+perllib/Arch/Storage.pm
+perllib/Arch/Tarball.pm
+perllib/Arch/TempFiles.pm
+perllib/Arch/Tree.pm
+perllib/Arch/Util.pm
+perllib/Arch/Test/Archive.pm
+perllib/Arch/Test/Cases.pm
+perllib/Arch/Test/Framework.pm
+perllib/Arch/Test/Tree.pm
+rpm/Arch.spec
+rpm/Makefile
+samples/arch-run-demo-1
+samples/arch-run-demo-2
+tests/_all-1
+tests/_all-2
+tests/_all-3
+tests/backend-1
+tests/changes-1
+tests/diffparser-1
+tests/diffparser-2
+tests/filehighlighter-1
+tests/inventory-1
+tests/liteweb-1
+tests/log-1
+tests/name-1
+tests/name-2
+tests/name-3
+tests/name-4
+tests/registry-1
+tests/registry-2
+tests/session-1
+tests/shared-primes-1
+tests/shared-primes-2
+tests/shared-primes-3
+tests/shared-primes-4
+tests/tempfiles-1
+tests/test-archive-1
+tests/test-framework-1
+tests/test-tree-1
+tests/tree-1
+tests/tree-2
+tests/tree-3
+tests/tree-annotate-1
+tests/util-1
+tests/util-2
+tests/util-3
+META.yml                                 Module meta-data (added by MakeMaker)

Added: branches/upstream/libarch-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libarch-perl/current/META.yml?rev=54539&op=file
==============================================================================
--- branches/upstream/libarch-perl/current/META.yml (added)
+++ branches/upstream/libarch-perl/current/META.yml Fri Mar 19 02:52:58 2010
@@ -1,0 +1,21 @@
+--- #YAML:1.0
+name:               Arch
+version:            0.5.2
+abstract:           GNU Arch Perl library
+author:
+    - Mikhael Goikhman <migo at homemail.com>
+license:            gpl
+distribution_type:  module
+configure_requires:
+    ExtUtils::MakeMaker:  0
+build_requires:
+    ExtUtils::MakeMaker:  0
+requires:  {}
+no_index:
+    directory:
+        - t
+        - inc
+generated_by:       ExtUtils::MakeMaker version 6.55_02
+meta-spec:
+    url:      http://module-build.sourceforge.net/META-spec-v1.4.html
+    version:  1.4

Modified: branches/upstream/libarch-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libarch-perl/current/Makefile.PL?rev=54539&op=diff
==============================================================================
--- branches/upstream/libarch-perl/current/Makefile.PL (original)
+++ branches/upstream/libarch-perl/current/Makefile.PL Fri Mar 19 02:52:58 2010
@@ -31,6 +31,7 @@
 	VERSION_FROM => 'perllib/Arch.pm',
 	ABSTRACT_FROM => 'perllib/Arch.pm',
 	AUTHOR => 'Mikhael Goikhman <migo at homemail.com>',
+	LICENSE => 'gpl',
 );
 
 open MANIFEST, "<MANIFEST";

Modified: branches/upstream/libarch-perl/current/NEWS
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libarch-perl/current/NEWS?rev=54539&op=diff
==============================================================================
--- branches/upstream/libarch-perl/current/NEWS (original)
+++ branches/upstream/libarch-perl/current/NEWS Fri Mar 19 02:52:58 2010
@@ -1,5 +1,10 @@
-arch-perl-0.5.2 (not released yet)
+arch-perl-0.5.2 (08-Mar-2010)
 
+* Adapted all relevant tests to quietly pass (be skipped) without tla.
+* Applied fix for Changeset dir containing regexp chars.
+* Enabled caching of tree logs.
+* Enhanced history method of Arch::Tree.
+* Small improvements in documentation files.
 
 arch-perl-0.5.1 (08-Oct-2005)
 

Modified: branches/upstream/libarch-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libarch-perl/current/README?rev=54539&op=diff
==============================================================================
--- branches/upstream/libarch-perl/current/README (original)
+++ branches/upstream/libarch-perl/current/README Fri Mar 19 02:52:58 2010
@@ -1,14 +1,17 @@
 Welcome to Arch-Perl 0.5.2.
 
 The arch-perl project aims to create Perl library for GNU Arch.
+http://migo.sixbit.org/software/arch-perl/
 
-Currently, a pragmatic high-level interface is built around tla or baz.
+A pragmatic high-level interface is built around tla or baz
+(that is a fork of tla, before it was obsoleted in favour of bzr).
+
 This functionality was initially developed for ArchZoom project,
 and was highly enhanced to serve AXP and ArchWay projects as well.
 
 Feel free to participate in creating the best possible design.
 
-arch-perl is tested with perl-5.00503, perl-5.6.x and perl-5.8.x.
+arch-perl is tested with perl-5.00503, perl-5.6.x, perl-5.8.x and perl-5.10.x.
 arch-perl is tested with tla-1.1, tla-1.2, tla-1.3, tla-1.3.1, tla-1.3.3.
 arch-perl is tested with baz-1.1, baz-1.2, baz-1.3, baz-1.3.2, baz-1.4.2.
 Use environment variable ARCH_BACKEND to set path to tla or baz.
@@ -16,5 +19,7 @@
 -- 
 Mikhael Goikhman <migo at homemail.com>
 
+Commands to obtain the latest development code:
+
 % tla register-archive http://arch.wox.org/migo@homemail.com--Perl-GPL/
 % tla get migo at homemail.com--Perl-GPL/arch-perl--devel--0

Modified: branches/upstream/libarch-perl/current/perllib/Arch/Util.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libarch-perl/current/perllib/Arch/Util.pm?rev=54539&op=diff
==============================================================================
--- branches/upstream/libarch-perl/current/perllib/Arch/Util.pm (original)
+++ branches/upstream/libarch-perl/current/perllib/Arch/Util.pm Fri Mar 19 02:52:58 2010
@@ -28,6 +28,7 @@
 @EXPORT_OK = qw(
 	arch_backend is_baz
 	run_pipe_from run_cmd run_tla
+	is_tla_functional
 	load_file save_file
 	copy_dir remove_dir setup_config_dir
 	standardize_date date2daysago date2age
@@ -45,7 +46,7 @@
 
 	# perl-5.005 does not pass compilation without "eval"...
 	my $pipe_success = $] >= 5.006?
-		eval qq{ open(PIPE, '-|', \@args) }: open(PIPE, "$args[0]|");
+		eval qq{ no warnings; open(PIPE, '-|', \@args) }: open(PIPE, "$args[0]|");
 	die "Can't start (@args): $!\n" unless $pipe_success;
 	return \*PIPE;
 }
@@ -67,6 +68,10 @@
 	my $arg1 = shift || die;
 	unshift @_, $Arch::Backend::EXE, split(' ', $arg1);
 	goto \&run_cmd;
+}
+
+sub is_tla_functional () {
+	eval { run_tla("help --help") } ? 1 : 0;
 }
 
 sub load_file ($;$) {
@@ -298,6 +303,12 @@
 
 =over 4
 
+=item B<is_tla_functional>
+
+Verify whether the system has a working arch backend installed (and
+possibly configured by environment variables, like TLA or ARCH_BACKEND),
+needed for this perl library to function.
+
 =item B<run_tla> I<subcommand_with_args>
 
 =item B<run_tla> I<subcommand> arg ...

Modified: branches/upstream/libarch-perl/current/tests/inventory-1
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libarch-perl/current/tests/inventory-1?rev=54539&op=diff
==============================================================================
--- branches/upstream/libarch-perl/current/tests/inventory-1 (original)
+++ branches/upstream/libarch-perl/current/tests/inventory-1 Fri Mar 19 02:52:58 2010
@@ -5,12 +5,14 @@
 use FindBin;
 use lib "$FindBin::Bin/../perllib";
 
-use Test::More tests => 11;
+use Test::More;
+use Arch::Util qw(is_tla_functional);
 
-BEGIN {
-	use_ok("Arch::Inventory", qw(:category :type));
-	use_ok("Arch::Test::Framework");
-}
+plan skip_all => "No functional arch backend" unless is_tla_functional;
+plan tests => 11;
+
+use_ok("Arch::Inventory");
+use_ok("Arch::Test::Framework");
 
 my $framework = Arch::Test::Framework->new;
 my $archive   = $framework->make_archive;

Modified: branches/upstream/libarch-perl/current/tests/registry-1
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libarch-perl/current/tests/registry-1?rev=54539&op=diff
==============================================================================
--- branches/upstream/libarch-perl/current/tests/registry-1 (original)
+++ branches/upstream/libarch-perl/current/tests/registry-1 Fri Mar 19 02:52:58 2010
@@ -6,7 +6,12 @@
 use FindBin;
 use lib "$FindBin::Bin/../perllib";
 
-use Test::More tests => 20;
+use Test::More;
+use Arch::Util qw(is_tla_functional);
+
+plan skip_all => "No functional arch backend" unless is_tla_functional;
+plan tests => 20;
+
 use_ok("Arch::Registry");
 use_ok("Arch::Util", "run_tla");
 use_ok("Arch::Backend", "is_baz");

Modified: branches/upstream/libarch-perl/current/tests/session-1
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libarch-perl/current/tests/session-1?rev=54539&op=diff
==============================================================================
--- branches/upstream/libarch-perl/current/tests/session-1 (original)
+++ branches/upstream/libarch-perl/current/tests/session-1 Fri Mar 19 02:52:58 2010
@@ -5,7 +5,12 @@
 use FindBin;
 use lib "$FindBin::Bin/../perllib";
 
-use Test::More tests => 37;
+use Test::More;
+use Arch::Util qw(is_tla_functional);
+
+plan skip_all => "No functional arch backend" unless is_tla_functional;
+plan tests => 37;
+
 use_ok("Arch::Session");
 use_ok("Arch::Util", "run_tla", "save_file");
 use_ok("Arch::Backend", "has_archive_setup_cmd");

Modified: branches/upstream/libarch-perl/current/tests/test-archive-1
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libarch-perl/current/tests/test-archive-1?rev=54539&op=diff
==============================================================================
--- branches/upstream/libarch-perl/current/tests/test-archive-1 (original)
+++ branches/upstream/libarch-perl/current/tests/test-archive-1 Fri Mar 19 02:52:58 2010
@@ -5,7 +5,12 @@
 use FindBin;
 use lib "$FindBin::Bin/../perllib";
 
-use Test::More tests => 17;
+use Test::More;
+use Arch::Util qw(is_tla_functional);
+
+plan skip_all => "No functional arch backend" unless is_tla_functional;
+plan tests => 17;
+
 use_ok("Arch::Test::Framework");
 
 my $fw = Arch::Test::Framework->new();

Modified: branches/upstream/libarch-perl/current/tests/test-framework-1
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libarch-perl/current/tests/test-framework-1?rev=54539&op=diff
==============================================================================
--- branches/upstream/libarch-perl/current/tests/test-framework-1 (original)
+++ branches/upstream/libarch-perl/current/tests/test-framework-1 Fri Mar 19 02:52:58 2010
@@ -5,7 +5,12 @@
 use FindBin;
 use lib "$FindBin::Bin/../perllib";
 
-use Test::More tests => 17;
+use Test::More;
+use Arch::Util qw(is_tla_functional);
+
+plan skip_all => "No functional arch backend" unless is_tla_functional;
+plan tests => 17;
+
 use_ok("Arch::Test::Framework");
 
 my $arch_user = 'Arch Test';

Modified: branches/upstream/libarch-perl/current/tests/test-tree-1
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libarch-perl/current/tests/test-tree-1?rev=54539&op=diff
==============================================================================
--- branches/upstream/libarch-perl/current/tests/test-tree-1 (original)
+++ branches/upstream/libarch-perl/current/tests/test-tree-1 Fri Mar 19 02:52:58 2010
@@ -5,7 +5,12 @@
 use FindBin;
 use lib "$FindBin::Bin/../perllib";
 
-use Test::More tests => 14;
+use Test::More;
+use Arch::Util qw(is_tla_functional);
+
+plan skip_all => "No functional arch backend" unless is_tla_functional;
+plan tests => 14;
+
 use_ok("Arch::Test::Framework");
 use_ok("Arch::Backend", "is_baz", "arch_backend_version");
 

Modified: branches/upstream/libarch-perl/current/tests/tree-1
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libarch-perl/current/tests/tree-1?rev=54539&op=diff
==============================================================================
--- branches/upstream/libarch-perl/current/tests/tree-1 (original)
+++ branches/upstream/libarch-perl/current/tests/tree-1 Fri Mar 19 02:52:58 2010
@@ -5,7 +5,12 @@
 use FindBin;
 use lib "$FindBin::Bin/../perllib";
 
-use Test::More tests => 11;
+use Test::More;
+use Arch::Util qw(is_tla_functional);
+
+plan skip_all => "No functional arch backend" unless is_tla_functional;
+plan tests => 11;
+
 use_ok("Arch::Tree");
 
 my $arch_dir = "$FindBin::Bin/../{arch}";

Modified: branches/upstream/libarch-perl/current/tests/tree-2
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libarch-perl/current/tests/tree-2?rev=54539&op=diff
==============================================================================
--- branches/upstream/libarch-perl/current/tests/tree-2 (original)
+++ branches/upstream/libarch-perl/current/tests/tree-2 Fri Mar 19 02:52:58 2010
@@ -7,11 +7,18 @@
 use FindBin;
 use lib "$FindBin::Bin/../perllib";
 
-use Test::More tests => 5;
+use Test::More;
+use Arch::Util qw(is_tla_functional);
+
 BEGIN {
+	plan skip_all => "No functional arch backend" unless is_tla_functional;
+	plan tests => 5;
+
+	# import constants at compile time
 	use_ok("Arch::Inventory", qw(:category :type));
-	use_ok("Arch::Tree");
 }
+
+use_ok("Arch::Tree");
 
 my $expected_entry_path = 'perllib/Arch/Tree.pm';
 my $expected_entry = {

Modified: branches/upstream/libarch-perl/current/tests/tree-3
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libarch-perl/current/tests/tree-3?rev=54539&op=diff
==============================================================================
--- branches/upstream/libarch-perl/current/tests/tree-3 (original)
+++ branches/upstream/libarch-perl/current/tests/tree-3 Fri Mar 19 02:52:58 2010
@@ -7,15 +7,17 @@
 use FindBin;
 use lib "$FindBin::Bin/../perllib";
 
-use Test::More tests => 15;
+use Test::More;
+use Arch::Util qw(is_tla_functional);
 
-BEGIN {
-	use_ok("Arch::Tree");
-	use_ok("Arch::Util", "run_tla", "save_file");
-	use_ok("Arch::Backend", "has_archive_setup_cmd");
-	use_ok("Arch::TempFiles");
-	use_ok("Arch::Session");
-}
+plan skip_all => "No functional arch backend" unless is_tla_functional;
+plan tests => 15;
+
+use_ok("Arch::Tree");
+use_ok("Arch::Util", "run_tla", "save_file");
+use_ok("Arch::Backend", "has_archive_setup_cmd");
+use_ok("Arch::TempFiles");
+use_ok("Arch::Session");
 
 # setup testing environment
 my $TEMP     = Arch::TempFiles->new;

Modified: branches/upstream/libarch-perl/current/tests/util-2
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libarch-perl/current/tests/util-2?rev=54539&op=diff
==============================================================================
--- branches/upstream/libarch-perl/current/tests/util-2 (original)
+++ branches/upstream/libarch-perl/current/tests/util-2 Fri Mar 19 02:52:58 2010
@@ -5,7 +5,8 @@
 use FindBin;
 use lib "$FindBin::Bin/../perllib";
 
-use Test::More tests => 39;
+use Test::More tests => 40;
+
 use_ok("Arch::Util", "save_file", "load_file");
 use_ok("Arch::TempFiles");
 use_ok("Arch::Session");
@@ -17,7 +18,7 @@
 
 sub run_func (@) {
 	my $func = shift;
-	my $cmd = "$func('" . join("', '", map { ref($_) || $_ } @_) . "')";
+	my $cmd = "$func(" . join(", ", map { "'" . (ref($_) || $_) . "'" } @_) . ")";
 	$func = "Arch::Util::$func";
 	my ($result_assign, $result, @result) = ("");
 	if (defined wantarray && !wantarray) {
@@ -27,7 +28,7 @@
 		$result_assign = '@result = ';
 		$cmd .= " (list context)";
 	}
-	eval "$result_assign$func(\@_);";
+	eval "$result_assign$func(" . (@_ ? '@_' : '') . ");";
 	if ($@) {
 		fail($cmd . ": $@");
 	} else {
@@ -90,9 +91,13 @@
 }
 
 my $arch_backend = run_func("arch_backend");
-run_func("run_tla", "-h");
-my $tla_output = run_func("run_tla", "--version");
-my @tla_output = run_func("run_tla", "--version");
-like($tla_output, qr/\b(Tom Lord|Arch|Bazaar|tla|baz)\b/, "check $arch_backend --version output (scalar)");
-ok(@tla_output > 0,               "check $arch_backend --version output (list)");
+my $is_tla_functional = run_func("is_tla_functional");
 
+SKIP: {
+	skip "No functional arch backend", 5 unless $is_tla_functional;
+	run_func("run_tla", "-h");
+	my $tla_output = run_func("run_tla", "--version");
+	my @tla_output = run_func("run_tla", "--version");
+	like($tla_output, qr/\b(Tom Lord|Arch|Bazaar|tla|baz)\b/, "check $arch_backend --version output (scalar)");
+	ok(@tla_output > 0,               "check $arch_backend --version output (list)");
+}




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