[fcm] 07/17: release 2016.12.0

Alastair McKinstry mckinstry at moszumanska.debian.org
Fri Jul 28 09:29:06 UTC 2017


This is an automated email from the git hooks/post-receive script.

mckinstry pushed a commit to branch debian/master
in repository fcm.

commit 147e858e4587145573b6f9f0559a33f9fb7fe949
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Thu Dec 15 15:25:38 2016 +0000

    release 2016.12.0
---
 CHANGES.md                                         | 20 ++++++--
 doc/etc/fcm-version.js                             |  2 +-
 lib/FCM/System/Make/Build.pm                       |  7 +--
 lib/FCM1/CmBranch.pm                               |  6 +--
 lib/FCM1/CmUrl.pm                                  | 28 ++++++----
 t/fcm-add-trac-env/00-basic.t                      |  2 +-
 t/fcm-branch-delete/02-rosie.t                     | 39 ++++++++++++++
 t/fcm-make/54-build-ignore-missing-dep-ns.t        | 60 ++++++++++++++++++++++
 .../54-build-ignore-missing-dep-ns/fcm-make.cfg    |  7 +++
 .../54-build-ignore-missing-dep-ns/src/greet.f90   |  4 ++
 .../src/greet_mod.f90                              |  3 ++
 .../src/greet_world.f90                            |  3 ++
 .../src2/hello_mod.f90                             |  6 +++
 t/lib/bash/svn_test_header                         |  3 +-
 14 files changed, 166 insertions(+), 24 deletions(-)

diff --git a/CHANGES.md b/CHANGES.md
index c5de0c8..8962206 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -5,9 +5,23 @@ for a full listing of issues for each release.
 
 --------------------------------------------------------------------------------
 
-## 2016.10.07 (2016-10-07)
+## 2016.12.0 (2016-12-06)
 
-FCM release 35.
+FCM release 37.
+
+### Noteworthy Changes
+
+[#241](https://github.com/metomi/fcm/pull/241):
+fcm branch-delete: fix Perl warning on branches in a Rosie repository.
+
+[#240](https://github.com/metomi/fcm/pull/240):
+fcm make: fix implementation of `build.prop{ignore-missing-dep-ns}`.
+
+--------------------------------------------------------------------------------
+
+## 2016.10.0 (2016-10-07)
+
+FCM release 36.
 
 ### Noteworthy Changes
 
@@ -23,7 +37,7 @@ load/dump of `ctx.gz`, instead of `/tmp/`.
 
 ## 2016.09.0 (2016-09-19)
 
-FCM release 34. Minor bug fix, and minor update to admin utilities.
+FCM release 35. Minor bug fix, and minor update to admin utilities.
 
 ### Noteworthy Changes
 
diff --git a/doc/etc/fcm-version.js b/doc/etc/fcm-version.js
index 36a4c69..0a16dd7 100644
--- a/doc/etc/fcm-version.js
+++ b/doc/etc/fcm-version.js
@@ -1 +1 @@
-FCM.VERSION="2016.10.0";
+FCM.VERSION="2016.12.0";
diff --git a/lib/FCM/System/Make/Build.pm b/lib/FCM/System/Make/Build.pm
index 75e75ce..882a5b3 100644
--- a/lib/FCM/System/Make/Build.pm
+++ b/lib/FCM/System/Make/Build.pm
@@ -1300,14 +1300,15 @@ sub _targets_select {
     if (keys(%dup_in)) {
         return $E->throw($E->BUILD_TARGET_DUP, \%dup_in);
     }
-    my @ignore_missing_dep_ns_list
-        = _props($attrib_ref, 'ignore-missing-dep-ns', $ctx);
+    my @ignore_missing_dep_ns_list = map {$_ eq q{/} ? q{} : $_} (
+        _props($attrib_ref, 'ignore-missing-dep-ns', $ctx)
+    );
     KEY:
     for my $key (sort(keys(%missing_deps_in))) {
         my $target = $target_of{$key};
         for my $ns (@ignore_missing_dep_ns_list) {
             if ($UTIL->ns_common($ns, $target->get_ns()) eq $ns) { # target in ns
-                my $hash_ref = @{delete($missing_deps_in{$key})};
+                my $hash_ref = delete($missing_deps_in{$key});
                 my @deps = @{$hash_ref->{"values"}};
                 for my $dep (@deps) {
                     $EVENT->(
diff --git a/lib/FCM1/CmBranch.pm b/lib/FCM1/CmBranch.pm
index b01dc86..ed881ad 100644
--- a/lib/FCM1/CmBranch.pm
+++ b/lib/FCM1/CmBranch.pm
@@ -675,14 +675,14 @@ sub del {
 
   # Create a temporary file for the commit log message
   my $temp_handle = $self->_commit_message(
-      sprintf("Deleted %s.\n", $self->branch_path()), 'D', $non_interactive,
+    sprintf("Deleted %s.\n", $self->branch_path()), 'D', $non_interactive,
   );
 
   # Check with the user to see if he/she wants to go ahead
   # ----------------------------------------------------------------------------
-  if (not $non_interactive) {
+  if (!$non_interactive) {
     my $mesg = '';
-    if (!$self->layout()->is_owned_by_user()) {
+    if ($self->branch_owner() && !$self->layout()->is_owned_by_user()) {
       $mesg .= "\n";
 
       if (exists $FCM1::CmUrl::owner_keywords{$self->branch_owner()}) {
diff --git a/lib/FCM1/CmUrl.pm b/lib/FCM1/CmUrl.pm
index cd4f9d0..3f2a45b 100644
--- a/lib/FCM1/CmUrl.pm
+++ b/lib/FCM1/CmUrl.pm
@@ -246,20 +246,26 @@ sub svnlog {
 
   # Check whether a "svn log" run is necessary
   # ----------------------------------------------------------------------------
-  my $need_update = ! ($revs [0] == $revs [1] and exists $self->{LOG}{$revs [0]});
-  my @ranges      = @revs;
-  if ($need_update and $self->{LOG_RANGE}) {
-    my %log_range = %{ $self->{LOG_RANGE} };
-
-    if ($stop_on_copy) {
-      $ranges [1] = $log_range{UPPER} if $ranges [1] >= $log_range{LOWER_SOC};
-
-    } else {
-      $ranges [1] = $log_range{UPPER} if $ranges [1] >= $log_range{LOWER};
+  my $need_update = !($revs[0] == $revs[1] && exists($self->{LOG}{$revs [0]}));
+  my @ranges = @revs;
+  if ($need_update && $self->{LOG_RANGE}) {
+    my %log_range = %{$self->{LOG_RANGE}};
+    $log_range{LOWER_SOC} ||= 0;
+    $log_range{LOWER} ||= 0;
+
+    if ($stop_on_copy && $ranges[1] >= $log_range{LOWER_SOC}) {
+      if ($ranges[1] >= $log_range{LOWER_SOC}) {
+        $ranges[1] = $log_range{UPPER};
+      }
+    }
+    else {
+      if ($ranges[1] >= $log_range{LOWER}) {
+        $ranges[1] = $log_range{UPPER};
+      }
     }
   }
 
-  $need_update = 0 if $ranges [0] < $ranges [1];
+  $need_update = 0 if $ranges[0] < $ranges[1];
 
   if ($need_update) {
     my @entries = @{$SVN->get_log(
diff --git a/t/fcm-add-trac-env/00-basic.t b/t/fcm-add-trac-env/00-basic.t
index ab3febe..8ca650b 100755
--- a/t/fcm-add-trac-env/00-basic.t
+++ b/t/fcm-add-trac-env/00-basic.t
@@ -62,7 +62,7 @@ for NAME in bus car lorry taxi; do
     # Subversion repository paths in place
     if [[ -d "srv/svn/$NAME" ]]; then
         file_grep "$TEST_KEY-repository_dir" \
-            "repository_dir=$PWD/srv/svn/$NAME" \
+            "dir=$PWD/srv/svn/$NAME" \
             "$PWD/srv/trac/$NAME/conf/trac.ini"
     fi
 done
diff --git a/t/fcm-branch-delete/02-rosie.t b/t/fcm-branch-delete/02-rosie.t
new file mode 100755
index 0000000..1a043cb
--- /dev/null
+++ b/t/fcm-branch-delete/02-rosie.t
@@ -0,0 +1,39 @@
+#!/bin/bash
+# ------------------------------------------------------------------------------
+# (C) British Crown Copyright 2006-16 Met Office.
+#
+# This file is part of FCM, tools for managing and building source code.
+#
+# FCM is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# FCM is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with FCM. If not, see <http://www.gnu.org/licenses/>.
+# ------------------------------------------------------------------------------
+# Test "fcm branch-delete" does not produce warnings for rosie branches.
+#-------------------------------------------------------------------------------
+. "$(dirname "$0")/test_header"
+tests 3
+#-------------------------------------------------------------------------------
+# Tests fcm branch-delete with bad argument, and in a working copy
+TEST_KEY="${TEST_KEY_BASE}"
+setup
+init_repos_layout_roses
+svn copy -q -m 'create a branch' \
+    "${REPOS_URL}/a/a/0/0/0/trunk" "${REPOS_URL}/a/a/0/0/0/my-branch"
+run_pass "${TEST_KEY}" \
+    fcm branch-delete --non-interactive "${REPOS_URL}/a/a/0/0/0/my-branch"
+file_cmp "${TEST_DIR}/${TEST_KEY}.err" "${TEST_KEY}.err" <'/dev/null'
+run_pass "${TEST_KEY}.out" \
+    grep -q -F "Deleting branch ${REPOS_URL}/a/a/0/0/0/my-branch ..." \
+    "../${TEST_KEY}.out"
+teardown
+#-------------------------------------------------------------------------------
+exit
diff --git a/t/fcm-make/54-build-ignore-missing-dep-ns.t b/t/fcm-make/54-build-ignore-missing-dep-ns.t
new file mode 100755
index 0000000..bc83a7b
--- /dev/null
+++ b/t/fcm-make/54-build-ignore-missing-dep-ns.t
@@ -0,0 +1,60 @@
+#!/bin/bash
+#-------------------------------------------------------------------------------
+# (C) British Crown Copyright 2006-16 Met Office.
+#
+# This file is part of FCM, tools for managing and building source code.
+#
+# FCM is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# FCM is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with FCM. If not, see <http://www.gnu.org/licenses/>.
+#-------------------------------------------------------------------------------
+# Test build.prop{ignore-missing-dep-ns}
+#-------------------------------------------------------------------------------
+. "$(dirname "$0")/test_header"
+tests 7
+#-------------------------------------------------------------------------------
+cp -r "${TEST_SOURCE_DIR}/${TEST_KEY_BASE}/"* '.'
+#-------------------------------------------------------------------------------
+TEST_KEY="${TEST_KEY_BASE}"
+
+run_fail "${TEST_KEY}-1" fcm make
+sed -n '/bad or missing/p; /required by/p' 'fcm-make.log' >'fcm-make.log.edited'
+file_cmp "${TEST_KEY}-1-log-edited" 'fcm-make.log.edited' <<'__LOG__'
+[FAIL] hello_mod.mod: bad or missing dependency (type=1.include)
+[FAIL]     required by: greet_mod.o
+[FAIL]     required by: greet_mod.mod
+[FAIL]     required by: greet.o
+[FAIL]     required by: greet.bin
+__LOG__
+
+# Remove dependency from target
+mkdir 'hello'
+(cd 'hello'; gfortran -c '../src2/hello_mod.f90')
+(cd 'hello'; ar rs 'libhello.a' 'hello_mod.o' 2>'/dev/null')
+run_pass "${TEST_KEY}-2" fcm make \
+    'build.prop{ignore-missing-dep-ns}=/'
+sed -n '/^\[info\] target /p; /ignore-missing-dep:/p' 'fcm-make.log' \
+    >"${TEST_KEY}.target.log"
+file_cmp "${TEST_KEY}-2.target.log" "${TEST_KEY}.target.log" <<'__LOG__'
+[WARN] greet_mod.o                   : ignore-missing-dep: (  include) hello_mod.mod
+[info] target greet.bin
+[info] target  - greet.o
+[info] target  -  - greet_mod.mod
+[info] target  -  -  - greet_mod.o
+[info] target  - greet_mod.o
+__LOG__
+
+run_pass "${TEST_KEY}.greet" "${PWD}/build/bin/greet.bin"
+file_cmp "${TEST_KEY}.greet.out" "${TEST_KEY}.greet.out" <<<'Greet world!'
+file_cmp "${TEST_KEY}.greet.err" "${TEST_KEY}.greet.err" <'/dev/null'
+#-------------------------------------------------------------------------------
+exit 0
diff --git a/t/fcm-make/54-build-ignore-missing-dep-ns/fcm-make.cfg b/t/fcm-make/54-build-ignore-missing-dep-ns/fcm-make.cfg
new file mode 100644
index 0000000..244e79e
--- /dev/null
+++ b/t/fcm-make/54-build-ignore-missing-dep-ns/fcm-make.cfg
@@ -0,0 +1,7 @@
+steps=build
+build.source=$HERE/src
+build.target{task}=link
+build.prop{file-ext.bin}=.bin
+build.prop{fc.include-paths} = $HERE/hello
+build.prop{fc.lib-paths} = $HERE/hello
+build.prop{fc.libs} = hello
diff --git a/t/fcm-make/54-build-ignore-missing-dep-ns/src/greet.f90 b/t/fcm-make/54-build-ignore-missing-dep-ns/src/greet.f90
new file mode 100644
index 0000000..a62f84f
--- /dev/null
+++ b/t/fcm-make/54-build-ignore-missing-dep-ns/src/greet.f90
@@ -0,0 +1,4 @@
+program greet
+use greet_mod, only: greet_world
+call greet_world()
+end program greet
diff --git a/t/fcm-make/54-build-ignore-missing-dep-ns/src/greet_mod.f90 b/t/fcm-make/54-build-ignore-missing-dep-ns/src/greet_mod.f90
new file mode 100644
index 0000000..71d0bda
--- /dev/null
+++ b/t/fcm-make/54-build-ignore-missing-dep-ns/src/greet_mod.f90
@@ -0,0 +1,3 @@
+module greet_mod
+use hello_mod, only: greet_world
+end module greet_mod
diff --git a/t/fcm-make/54-build-ignore-missing-dep-ns/src/greet_world.f90 b/t/fcm-make/54-build-ignore-missing-dep-ns/src/greet_world.f90
new file mode 100644
index 0000000..d6ca365
--- /dev/null
+++ b/t/fcm-make/54-build-ignore-missing-dep-ns/src/greet_world.f90
@@ -0,0 +1,3 @@
+subroutine greet_world()
+write(*, '(a)') 'Greet World'
+end subroutine greet_world
diff --git a/t/fcm-make/54-build-ignore-missing-dep-ns/src2/hello_mod.f90 b/t/fcm-make/54-build-ignore-missing-dep-ns/src2/hello_mod.f90
new file mode 100644
index 0000000..5948578
--- /dev/null
+++ b/t/fcm-make/54-build-ignore-missing-dep-ns/src2/hello_mod.f90
@@ -0,0 +1,6 @@
+module hello_mod
+contains
+subroutine greet_world()
+write(*, '(a)') 'Greet world!'
+end subroutine greet_world
+end module hello_mod
diff --git a/t/lib/bash/svn_test_header b/t/lib/bash/svn_test_header
index 4cfc7e9..6361434 100644
--- a/t/lib/bash/svn_test_header
+++ b/t/lib/bash/svn_test_header
@@ -99,9 +99,8 @@ function init_repos_layout_roses() {
         svnadmin create --fs-type fsfs $TEST_DIR/test_repos
         REPOS_URL="file://$TEST_DIR/test_repos"
     fi
-    svn mkdir -q --parents $REPOS_URL/a/a/0/0/0/trunk
     svn import -q $TEST_SOURCE_DIR/../etc/repo_files \
-        $REPOS_URL/a/a/0/0/0/trunk -m "initial trunk import"
+        $REPOS_URL/a/a/0/0/0/trunk/ -m "initial trunk import"
     TMPFILE=$(mktemp)
     cat >$TMPFILE <<__LAYOUT__
 depth-project = 5

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/fcm.git



More information about the debian-science-commits mailing list