Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package spack for openSUSE:Factory checked 
in at 2021-10-08 00:05:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/spack (Old)
 and      /work/SRC/openSUSE:Factory/.spack.new.2443 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "spack"

Fri Oct  8 00:05:57 2021 rev:13 rq:923607 version:0.16.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/spack/spack.changes      2021-08-11 
11:47:54.661696424 +0200
+++ /work/SRC/openSUSE:Factory/.spack.new.2443/spack.changes    2021-10-08 
00:06:53.221838408 +0200
@@ -1,0 +2,15 @@
+Fri Oct  1 05:55:10 UTC 2021 - Egbert Eich <[email protected]>
+
+- Utilize sysuser infrastructure to set group spack. 
+
+-------------------------------------------------------------------
+Wed Sep 29 20:32:58 UTC 2021 - Antoine Ginies <[email protected]>
+
+- update to version 0.16.3 (JSC#SLE-22137):
+  * clang/llvm: fix version detection
+  * Fix use of quotes in Python build system
+  * Ensure all roots of an installed environment are marked explicit in db
+  * Fix fetching for Python 3.8 and 3.9
+  * locks: only open lockfiles once instead of for every lock held
+
+-------------------------------------------------------------------
@@ -24 +39 @@
-- fix typo to export prefix in patch:
+- fix typo to export prefix in patch (bsc#1191395):

Old:
----
  spack-0.16.2.tar.gz

New:
----
  spack-0.16.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ spack.spec ++++++
--- /var/tmp/diff_new_pack.oXH9Vk/_old  2021-10-08 00:06:53.785839364 +0200
+++ /var/tmp/diff_new_pack.oXH9Vk/_new  2021-10-08 00:06:53.789839370 +0200
@@ -36,7 +36,7 @@
 # non oss packages
 %define spack_trigger_external cuda-nvcc
 Name:           spack
-Version:        0.16.2
+Version:        0.16.3
 Release:        0
 Summary:        Package manager for HPC systems
 License:        Apache-2.0 AND MIT AND Python-2.0 AND BSD-3-Clause
@@ -63,6 +63,7 @@
 BuildRequires:  python-base
 BuildRequires:  python3-urllib3
 BuildRequires:  sudo
+BuildRequires:  sysuser-tools
 Requires:       %{name}-recipes = %{version}
 Requires:       bzip2
 Requires:       curl
@@ -352,6 +353,11 @@
 # Remove problematic binaries which are removed upstream with
 # 0889be20e0d9dcdf4346cdeaa0647285187375f3
 rm -r 
%{buildroot}%{_localstatedir}/lib/spack/repos/builtin/packages/patchelf/test/
+
+echo "g %{name} -" > system-user-%{name}.conf
+%sysusers_generate_pre system-user-%{name}.conf %{name} 
system-user-%{name}.conf
+install -D -m 644 system-user-%{name}.conf 
%{buildroot}%{_sysusersdir}/system-user-%{name}.conf
+
 %fdupes %{buildroot}%{spack_dir}
 %fdupes %{buildroot}%{_datarootdir}/spack
 %fdupes %{buildroot}%{_localstatedir}/lib/spack
@@ -364,8 +370,7 @@
 [ -d texinfo/Spack-figures ] && cp -r texinfo/Spack-figures 
%{buildroot}%{_infodir}
 %endif
 
-%pre
-getent group %spack_group >/dev/null || groupadd -r %spack_group
+%pre -f %{name}.pre
 
 %post
 # Replace /etc/spack/compilers.yaml
@@ -419,6 +424,7 @@
 %dir %{_sysconfdir}/skel/.spack
 %config %{_sysconfdir}/skel/.spack/config.yaml
 # repos directory is installed in -recipes
+%{_sysusersdir}/system-user-%{name}.conf
 %exclude %{_localstatedir}/lib/spack/repos
 
 %files recipes

++++++ spack-0.16.2.tar.gz -> spack-0.16.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spack-0.16.2/.flake8 new/spack-0.16.3/.flake8
--- old/spack-0.16.2/.flake8    2021-05-22 23:57:30.000000000 +0200
+++ new/spack-0.16.3/.flake8    2021-09-22 01:58:41.000000000 +0200
@@ -29,4 +29,4 @@
 #
 [flake8]
 ignore = E129,E221,E241,E272,E731,W503,W504,F999,N801,N813,N814
-max-line-length = 79
+max-line-length = 88
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spack-0.16.2/CHANGELOG.md 
new/spack-0.16.3/CHANGELOG.md
--- old/spack-0.16.2/CHANGELOG.md       2021-05-22 23:57:30.000000000 +0200
+++ new/spack-0.16.3/CHANGELOG.md       2021-09-22 01:58:41.000000000 +0200
@@ -1,3 +1,15 @@
+# v0.16.3 (2021-09-21)
+
+* clang/llvm: fix version detection (#19978)
+* Fix use of quotes in Python build system (#22279)
+* Cray: fix extracting paths from module files (#23472)
+* Use AWS CloudFront for source mirror (#23978)
+* Ensure all roots of an installed environment are marked explicit in db 
(#24277)
+* Fix fetching for Python 3.8 and 3.9 (#24686)
+* locks: only open lockfiles once instead of for every lock held (#24794)
+* Remove the EOL centos:6 docker image
+
+
 # v0.16.2 (2021-05-22)
 
 * Major performance improvement for `spack load` and other commands. (#23661)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spack-0.16.2/etc/spack/defaults/mirrors.yaml 
new/spack-0.16.3/etc/spack/defaults/mirrors.yaml
--- old/spack-0.16.2/etc/spack/defaults/mirrors.yaml    2021-05-22 
23:57:30.000000000 +0200
+++ new/spack-0.16.3/etc/spack/defaults/mirrors.yaml    2021-09-22 
01:58:41.000000000 +0200
@@ -1,2 +1,2 @@
 mirrors:
-  spack-public: https://spack-llnl-mirror.s3-us-west-2.amazonaws.com/
+  spack-public: https://mirror.spack.io
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spack-0.16.2/lib/spack/docs/containers.rst 
new/spack-0.16.3/lib/spack/docs/containers.rst
--- old/spack-0.16.2/lib/spack/docs/containers.rst      2021-05-22 
23:57:30.000000000 +0200
+++ new/spack-0.16.3/lib/spack/docs/containers.rst      2021-09-22 
01:58:41.000000000 +0200
@@ -126,9 +126,6 @@
    * - Ubuntu 18.04
      - ``ubuntu:18.04``
      - ``spack/ubuntu-bionic``
-   * - CentOS 6
-     - ``centos:6``
-     - ``spack/centos6``
    * - CentOS 7
      - ``centos:7``
      - ``spack/centos7``
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spack-0.16.2/lib/spack/llnl/util/lock.py 
new/spack-0.16.3/lib/spack/llnl/util/lock.py
--- old/spack-0.16.2/lib/spack/llnl/util/lock.py        2021-05-22 
23:57:30.000000000 +0200
+++ new/spack-0.16.3/lib/spack/llnl/util/lock.py        2021-09-22 
01:58:41.000000000 +0200
@@ -26,6 +26,126 @@
 true_fn = lambda: True
 
 
+class OpenFile(object):
+    """Record for keeping track of open lockfiles (with reference counting).
+
+    There's really only one ``OpenFile`` per inode, per process, but we record 
the
+    filehandle here as it's the thing we end up using in python code.  You can 
get
+    the file descriptor from the file handle if needed -- or we could make 
this track
+    file descriptors as well in the future.
+    """
+    def __init__(self, fh):
+        self.fh = fh
+        self.refs = 0
+
+
+class OpenFileTracker(object):
+    """Track open lockfiles, to minimize number of open file descriptors.
+
+    The ``fcntl`` locks that Spack uses are associated with an inode and a 
process.
+    This is convenient, because if a process exits, it releases its locks.
+    Unfortunately, this also means that if you close a file, *all* locks 
associated
+    with that file's inode are released, regardless of whether the process has 
any
+    other open file descriptors on it.
+
+    Because of this, we need to track open lock files so that we only close 
them when
+    a process no longer needs them.  We do this by tracking each lockfile by 
its
+    inode and process id.  This has several nice properties:
+
+    1. Tracking by pid ensures that, if we fork, we don't inadvertently track 
the parent
+       process's lockfiles. ``fcntl`` locks are not inherited across forks, so 
we'll
+       just track new lockfiles in the child.
+    2. Tracking by inode ensures that referencs are counted per inode, and 
that we don't
+       inadvertently close a file whose inode still has open locks.
+    3. Tracking by both pid and inode ensures that we only open lockfiles the 
minimum
+       number of times necessary for the locks we have.
+
+    Note: as mentioned elsewhere, these locks aren't thread safe -- they're 
designed to
+    work in Python and assume the GIL.
+    """
+
+    def __init__(self):
+        """Create a new ``OpenFileTracker``."""
+        self._descriptors = {}
+
+    def get_fh(self, path):
+        """Get a filehandle for a lockfile.
+
+        This routine will open writable files for read/write even if you're 
asking
+        for a shared (read-only) lock. This is so that we can upgrade to an 
exclusive
+        (write) lock later if requested.
+
+        Arguments:
+          path (str): path to lock file we want a filehandle for
+        """
+        # Open writable files as 'r+' so we can upgrade to write later
+        os_mode, fh_mode = (os.O_RDWR | os.O_CREAT), 'r+'
+
+        pid = os.getpid()
+        open_file = None  # OpenFile object, if there is one
+        stat = None       # stat result for the lockfile, if it exists
+
+        try:
+            # see whether we've seen this inode/pid before
+            stat = os.stat(path)
+            key = (stat.st_ino, pid)
+            open_file = self._descriptors.get(key)
+
+        except OSError as e:
+            if e.errno != errno.ENOENT:  # only handle file not found
+                raise
+
+            # path does not exist -- fail if we won't be able to create it
+            parent = os.path.dirname(path) or '.'
+            if not os.access(parent, os.W_OK):
+                raise CantCreateLockError(path)
+
+        # if there was no already open file, we'll need to open one
+        if not open_file:
+            if stat and not os.access(path, os.W_OK):
+                # we know path exists but not if it's writable. If it's 
read-only,
+                # only open the file for reading (and fail if we're trying to 
get
+                # an exclusive (write) lock on it)
+                os_mode, fh_mode = os.O_RDONLY, 'r'
+
+            fd = os.open(path, os_mode)
+            fh = os.fdopen(fd, fh_mode)
+            open_file = OpenFile(fh)
+
+            # if we just created the file, we'll need to get its inode here
+            if not stat:
+                inode = os.fstat(fd).st_ino
+                key = (inode, pid)
+
+            self._descriptors[key] = open_file
+
+        open_file.refs += 1
+        return open_file.fh
+
+    def release_fh(self, path):
+        """Release a filehandle, only closing it if there are no more 
references."""
+        try:
+            inode = os.stat(path).st_ino
+        except OSError as e:
+            if e.errno != errno.ENOENT:  # only handle file not found
+                raise
+            inode = None  # this will not be in self._descriptors
+
+        key = (inode, os.getpid())
+        open_file = self._descriptors.get(key)
+        assert open_file, "Attempted to close non-existing lock path: %s" % 
path
+
+        open_file.refs -= 1
+        if not open_file.refs:
+            del self._descriptors[key]
+            open_file.fh.close()
+
+
+#: Open file descriptors for locks in this process. Used to prevent one process
+#: from opening the sam file many times for different byte range locks
+file_tracker = OpenFileTracker()
+
+
 def _attempts_str(wait_time, nattempts):
     # Don't print anything if we succeeded on the first try
     if nattempts <= 1:
@@ -46,7 +166,8 @@
     Note that this is for managing contention over resources *between*
     processes and not for managing contention between threads in a process: the
     functions of this object are not thread-safe. A process also must not
-    maintain multiple locks on the same file.
+    maintain multiple locks on the same file (or, more specifically, on
+    overlapping byte ranges in the same file).
     """
 
     def __init__(self, path, start=0, length=0, default_timeout=None,
@@ -151,25 +272,10 @@
 
         # Create file and parent directories if they don't exist.
         if self._file is None:
-            parent = self._ensure_parent_directory()
-
-            # Open writable files as 'r+' so we can upgrade to write later
-            os_mode, fd_mode = (os.O_RDWR | os.O_CREAT), 'r+'
-            if os.path.exists(self.path):
-                if not os.access(self.path, os.W_OK):
-                    if op == fcntl.LOCK_SH:
-                        # can still lock read-only files if we open 'r'
-                        os_mode, fd_mode = os.O_RDONLY, 'r'
-                    else:
-                        raise LockROFileError(self.path)
+            self._ensure_parent_directory()
+            self._file = file_tracker.get_fh(self.path)
 
-            elif not os.access(parent, os.W_OK):
-                raise CantCreateLockError(self.path)
-
-            fd = os.open(self.path, os_mode)
-            self._file = os.fdopen(fd, fd_mode)
-
-        elif op == fcntl.LOCK_EX and self._file.mode == 'r':
+        if op == fcntl.LOCK_EX and self._file.mode == 'r':
             # Attempt to upgrade to write lock w/a read-only file.
             # If the file were writable, we'd have opened it 'r+'
             raise LockROFileError(self.path)
@@ -282,7 +388,8 @@
         """
         fcntl.lockf(self._file, fcntl.LOCK_UN,
                     self._length, self._start, os.SEEK_SET)
-        self._file.close()
+
+        file_tracker.release_fh(self.path)
         self._file = None
         self._reads = 0
         self._writes = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spack-0.16.2/lib/spack/spack/__init__.py 
new/spack-0.16.3/lib/spack/spack/__init__.py
--- old/spack-0.16.2/lib/spack/spack/__init__.py        2021-05-22 
23:57:30.000000000 +0200
+++ new/spack-0.16.3/lib/spack/spack/__init__.py        2021-09-22 
01:58:41.000000000 +0200
@@ -5,7 +5,7 @@
 
 
 #: major, minor, patch version for Spack, in a tuple
-spack_version_info = (0, 16, 2)
+spack_version_info = (0, 16, 3)
 
 #: String containing Spack version joined with .'s
 spack_version = '.'.join(str(v) for v in spack_version_info)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spack-0.16.2/lib/spack/spack/build_systems/python.py 
new/spack-0.16.3/lib/spack/spack/build_systems/python.py
--- old/spack-0.16.2/lib/spack/spack/build_systems/python.py    2021-05-22 
23:57:30.000000000 +0200
+++ new/spack-0.16.3/lib/spack/spack/build_systems/python.py    2021-09-22 
01:58:41.000000000 +0200
@@ -252,7 +252,7 @@
                  '--install-purelib=%s' % pure_site_packages_dir,
                  '--install-platlib=%s' % plat_site_packages_dir,
                  '--install-scripts=bin',
-                 '--install-data=""',
+                 '--install-data=',
                  '--install-headers=%s' % inc_dir
                  ]
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spack-0.16.2/lib/spack/spack/cmd/tutorial.py 
new/spack-0.16.3/lib/spack/spack/cmd/tutorial.py
--- old/spack-0.16.2/lib/spack/spack/cmd/tutorial.py    2021-05-22 
23:57:30.000000000 +0200
+++ new/spack-0.16.3/lib/spack/spack/cmd/tutorial.py    2021-09-22 
01:58:41.000000000 +0200
@@ -26,7 +26,7 @@
 
 # tutorial configuration parameters
 tutorial_branch = "releases/v0.16"
-tutorial_mirror = "s3://spack-binaries-prs/tutorial/ecp21/mirror"
+tutorial_mirror = "file:///mirror"
 tutorial_key    = os.path.join(spack.paths.share_path, "keys", "tutorial.pub")
 
 # configs to remove
@@ -78,7 +78,7 @@
     # Note that checkout MUST be last. It changes Spack under our feet.
     # If you don't put this last, you'll get import errors for the code
     # that follows (exacerbated by the various lazy singletons we use)
-    tty.msg("Ensuring we're on the releases/v0.15 branch")
+    tty.msg("Ensuring we're on the releases/v0.16 branch")
     git = which("git", required=True)
     with working_dir(spack.paths.prefix):
         git("checkout", tutorial_branch)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spack-0.16.2/lib/spack/spack/compilers/clang.py 
new/spack-0.16.3/lib/spack/spack/compilers/clang.py
--- old/spack-0.16.2/lib/spack/spack/compilers/clang.py 2021-05-22 
23:57:30.000000000 +0200
+++ new/spack-0.16.3/lib/spack/spack/compilers/clang.py 2021-09-22 
01:58:41.000000000 +0200
@@ -159,11 +159,11 @@
 
         match = re.search(
             # Normal clang compiler versions are left as-is
-            r'clang version ([^ )]+)-svn[~.\w\d-]*|'
+            r'clang version ([^ )\n]+)-svn[~.\w\d-]*|'
             # Don't include hyphenated patch numbers in the version
             # (see https://github.com/spack/spack/pull/14365 for details)
-            r'clang version ([^ )]+?)-[~.\w\d-]*|'
-            r'clang version ([^ )]+)',
+            r'clang version ([^ )\n]+?)-[~.\w\d-]*|'
+            r'clang version ([^ )\n]+)',
             output
         )
         if match:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spack-0.16.2/lib/spack/spack/container/images.json 
new/spack-0.16.3/lib/spack/spack/container/images.json
--- old/spack-0.16.2/lib/spack/spack/container/images.json      2021-05-22 
23:57:30.000000000 +0200
+++ new/spack-0.16.3/lib/spack/spack/container/images.json      2021-09-22 
01:58:41.000000000 +0200
@@ -21,13 +21,6 @@
       "build_tags": {
         "develop": "latest"
       }
-    },
-    "centos:6": {
-      "os_package_manager": "yum",
-      "build": "spack/centos6",
-      "build_tags": {
-        "develop": "latest"
-      }
     }
   },
   "os_package_managers": {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spack-0.16.2/lib/spack/spack/environment.py 
new/spack-0.16.3/lib/spack/spack/environment.py
--- old/spack-0.16.2/lib/spack/spack/environment.py     2021-05-22 
23:57:30.000000000 +0200
+++ new/spack-0.16.3/lib/spack/spack/environment.py     2021-09-22 
01:58:41.000000000 +0200
@@ -1420,6 +1420,13 @@
         # DB read transaction to reduce time spent in this case.
         specs_to_install = self.uninstalled_specs()
 
+        # ensure specs already installed are marked explicit
+        all_specs = [cs for _, cs in self.concretized_specs()]
+        specs_installed = [s for s in all_specs if s.package.installed]
+        with spack.store.db.write_transaction():  # do all in one transaction
+            for spec in specs_installed:
+                spack.store.db.update_explicit(spec, True)
+
         if not specs_to_install:
             tty.msg('All of the packages are already installed')
             return
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spack-0.16.2/lib/spack/spack/schema/container.py 
new/spack-0.16.3/lib/spack/spack/schema/container.py
--- old/spack-0.16.2/lib/spack/spack/schema/container.py        2021-05-22 
23:57:30.000000000 +0200
+++ new/spack-0.16.3/lib/spack/spack/schema/container.py        2021-09-22 
01:58:41.000000000 +0200
@@ -12,8 +12,7 @@
             'type': 'string',
             'enum': ['ubuntu:18.04',
                      'ubuntu:16.04',
-                     'centos:7',
-                     'centos:6']
+                     'centos:7']
         },
         'spack': {
             'type': 'string',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spack-0.16.2/lib/spack/spack/test/cmd/env.py 
new/spack-0.16.3/lib/spack/spack/test/cmd/env.py
--- old/spack-0.16.2/lib/spack/spack/test/cmd/env.py    2021-05-22 
23:57:30.000000000 +0200
+++ new/spack-0.16.3/lib/spack/spack/test/cmd/env.py    2021-09-22 
01:58:41.000000000 +0200
@@ -176,6 +176,27 @@
     assert e.specs_by_hash[e.concretized_order[0]].name == 'cmake-client'
 
 
+def test_env_roots_marked_explicit(install_mockery, mock_fetch):
+    install = SpackCommand('install')
+    install('dependent-install')
+
+    # Check one explicit, one implicit install
+    dependent = spack.store.db.query(explicit=True)
+    dependency = spack.store.db.query(explicit=False)
+    assert len(dependent) == 1
+    assert len(dependency) == 1
+
+    env('create', 'test')
+    with ev.read('test') as e:
+        # make implicit install a root of the env
+        e.add(dependency[0].name)
+        e.concretize()
+        e.install_all()
+
+    explicit = spack.store.db.query(explicit=True)
+    assert len(explicit) == 2
+
+
 def test_env_modifications_error_on_activate(
         install_mockery, mock_fetch, monkeypatch, capfd):
     env('create', 'test')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/spack-0.16.2/lib/spack/spack/test/compilers/detection.py 
new/spack-0.16.3/lib/spack/spack/test/compilers/detection.py
--- old/spack-0.16.2/lib/spack/spack/test/compilers/detection.py        
2021-05-22 23:57:30.000000000 +0200
+++ new/spack-0.16.3/lib/spack/spack/test/compilers/detection.py        
2021-09-22 01:58:41.000000000 +0200
@@ -96,7 +96,11 @@
     ('clang version 8.0.0-3 (tags/RELEASE_800/final)\n'
      'Target: aarch64-unknown-linux-gnu\n'
      'Thread model: posix\n'
-     'InstalledDir: /usr/bin\n', '8.0.0')
+     'InstalledDir: /usr/bin\n', '8.0.0'),
+    ('clang version 11.0.0\n'
+     'Target: aarch64-unknown-linux-gnu\n'
+     'Thread model: posix\n'
+     'InstalledDir: /usr/bin\n', '11.0.0')
 ])
 def test_clang_version_detection(version_str, expected_version):
     version = spack.compilers.clang.Clang.extract_version_from_output(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spack-0.16.2/lib/spack/spack/test/module_parsing.py 
new/spack-0.16.3/lib/spack/spack/test/module_parsing.py
--- old/spack-0.16.2/lib/spack/spack/test/module_parsing.py     2021-05-22 
23:57:30.000000000 +0200
+++ new/spack-0.16.3/lib/spack/spack/test/module_parsing.py     2021-09-22 
01:58:41.000000000 +0200
@@ -123,3 +123,9 @@
     for bl in bad_lines:
         with pytest.raises(ValueError):
             get_path_args_from_module_line(bl)
+
+
+def test_lmod_quote_parsing():
+    lines = 
['setenv("SOME_PARTICULAR_DIR","-L/opt/cray/pe/mpich/8.1.4/gtl/lib")']
+    result = get_path_from_module_contents(lines, 'some-module')
+    assert '/opt/cray/pe/mpich/8.1.4/gtl' == result
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spack-0.16.2/lib/spack/spack/util/module_cmd.py 
new/spack-0.16.3/lib/spack/spack/util/module_cmd.py
--- old/spack-0.16.2/lib/spack/spack/util/module_cmd.py 2021-05-22 
23:57:30.000000000 +0200
+++ new/spack-0.16.3/lib/spack/spack/util/module_cmd.py 2021-09-22 
01:58:41.000000000 +0200
@@ -195,9 +195,13 @@
     def match_flag_and_strip(line, flag, strip=[]):
         flag_idx = line.find(flag)
         if flag_idx >= 0:
-            end = line.find(' ', flag_idx)
-            if end >= 0:
-                path = line[flag_idx + len(flag):end]
+            # Search for the first occurence of any separator marking the end 
of
+            # the path.
+            separators = (' ', '"', "'")
+            occurrences = [line.find(s, flag_idx) for s in separators]
+            indices = [idx for idx in occurrences if idx >= 0]
+            if indices:
+                path = line[flag_idx + len(flag):min(indices)]
             else:
                 path = line[flag_idx + len(flag):]
             path = strip_path(path, strip)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spack-0.16.2/lib/spack/spack/util/url.py 
new/spack-0.16.3/lib/spack/spack/util/url.py
--- old/spack-0.16.2/lib/spack/spack/util/url.py        2021-05-22 
23:57:30.000000000 +0200
+++ new/spack-0.16.3/lib/spack/spack/util/url.py        2021-09-22 
01:58:41.000000000 +0200
@@ -11,8 +11,8 @@
 import os.path
 import re
 
-from six import string_types
 import six.moves.urllib.parse as urllib_parse
+from six import string_types
 
 import spack.util.path
 
@@ -151,21 +151,21 @@
         for x in itertools.chain((base_url, path), extra)]
     n = len(paths)
     last_abs_component = None
-    scheme = None
+    scheme = ''
     for i in range(n - 1, -1, -1):
         obj = urllib_parse.urlparse(
-            paths[i], scheme=None, allow_fragments=False)
+            paths[i], scheme='', allow_fragments=False)
 
         scheme = obj.scheme
 
         # in either case the component is absolute
-        if scheme is not None or obj.path.startswith('/'):
-            if scheme is None:
+        if scheme or obj.path.startswith('/'):
+            if not scheme:
                 # Without a scheme, we have to go back looking for the
                 # next-last component that specifies a scheme.
                 for j in range(i - 1, -1, -1):
                     obj = urllib_parse.urlparse(
-                        paths[j], scheme=None, allow_fragments=False)
+                        paths[j], scheme='', allow_fragments=False)
 
                     if obj.scheme:
                         paths[i] = '{SM}://{NL}{PATH}'.format(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spack-0.16.2/share/spack/docker/centos-6.dockerfile 
new/spack-0.16.3/share/spack/docker/centos-6.dockerfile
--- old/spack-0.16.2/share/spack/docker/centos-6.dockerfile     2021-05-22 
23:57:30.000000000 +0200
+++ new/spack-0.16.3/share/spack/docker/centos-6.dockerfile     1970-01-01 
01:00:00.000000000 +0100
@@ -1,72 +0,0 @@
-FROM centos:6
-MAINTAINER Spack Maintainers <[email protected]>
-
-ENV DOCKERFILE_BASE=centos            \
-    DOCKERFILE_DISTRO=centos          \
-    DOCKERFILE_DISTRO_VERSION=6       \
-    SPACK_ROOT=/opt/spack             \
-    DEBIAN_FRONTEND=noninteractive    \
-    CURRENTLY_BUILDING_DOCKER_IMAGE=1 \
-    container=docker
-
-RUN yum update -y \
- && yum install -y epel-release \
- && yum update -y \
- && yum --enablerepo epel groupinstall -y "Development Tools" \
- && yum --enablerepo epel install -y \
-        curl \
-        findutils \
-        gcc-c++ \
-        gcc \
-        gcc-gfortran \
-        git \
-        gnupg2 \
-        hostname \
-        iproute \
-        Lmod \
-        make \
-        patch \
-        python \
-        python-pip \
-        python-setuptools \
-        tcl \
-        unzip \
-        which \
- && pip install boto3 \
- && rm -rf /var/cache/yum \
- && yum clean all
-
-COPY bin   $SPACK_ROOT/bin
-COPY etc   $SPACK_ROOT/etc
-COPY lib   $SPACK_ROOT/lib
-COPY share $SPACK_ROOT/share
-COPY var   $SPACK_ROOT/var
-RUN mkdir -p $SPACK_ROOT/opt/spack
-
-RUN ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \
-          /usr/local/bin/docker-shell \
- && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \
-          /usr/local/bin/interactive-shell \
- && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \
-          /usr/local/bin/spack-env
-
-RUN mkdir -p /root/.spack \
- && cp $SPACK_ROOT/share/spack/docker/modules.yaml \
-        /root/.spack/modules.yaml \
- && rm -rf /root/*.* /run/nologin $SPACK_ROOT/.git
-
-# [WORKAROUND]
-# https://superuser.com/questions/1241548/
-#     xubuntu-16-04-ttyname-failed-inappropriate-ioctl-for-device#1253889
-RUN [ -f ~/.profile ]                                               \
- && sed -i 's/mesg n/( tty -s \\&\\& mesg n || true )/g' ~/.profile \
- || true
-
-WORKDIR /root
-SHELL ["docker-shell"]
-
-# TODO: add a command to Spack that (re)creates the package cache
-RUN spack spec hdf5+mpi
-
-ENTRYPOINT ["/bin/bash", "/opt/spack/share/spack/docker/entrypoint.bash"]
-CMD ["interactive-shell"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/spack-0.16.2/var/spack/repos/builtin/packages/llvm/package.py 
new/spack-0.16.3/var/spack/repos/builtin/packages/llvm/package.py
--- old/spack-0.16.2/var/spack/repos/builtin/packages/llvm/package.py   
2021-05-22 23:57:30.000000000 +0200
+++ new/spack-0.16.3/var/spack/repos/builtin/packages/llvm/package.py   
2021-09-22 01:58:41.000000000 +0200
@@ -244,11 +244,11 @@
     def determine_version(cls, exe):
         version_regex = re.compile(
             # Normal clang compiler versions are left as-is
-            r'clang version ([^ )]+)-svn[~.\w\d-]*|'
+            r'clang version ([^ )\n]+)-svn[~.\w\d-]*|'
             # Don't include hyphenated patch numbers in the version
             # (see https://github.com/spack/spack/pull/14365 for details)
-            r'clang version ([^ )]+?)-[~.\w\d-]*|'
-            r'clang version ([^ )]+)|'
+            r'clang version ([^ )\n]+?)-[~.\w\d-]*|'
+            r'clang version ([^ )\n]+)|'
             # LLDB
             r'lldb version ([^ )\n]+)|'
             # LLD

Reply via email to