rda-python-dsarch 3.0.8__tar.gz → 3.0.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. {rda_python_dsarch-3.0.8/src/rda_python_dsarch.egg-info → rda_python_dsarch-3.0.9}/PKG-INFO +1 -1
  2. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.9}/pyproject.toml +1 -1
  3. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.9}/src/rda_python_dsarch/dsarch.py +6 -2
  4. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.9/src/rda_python_dsarch.egg-info}/PKG-INFO +1 -1
  5. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.9}/LICENSE +0 -0
  6. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.9}/MANIFEST.in +0 -0
  7. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.9}/README.md +0 -0
  8. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.9}/setup.cfg +0 -0
  9. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.9}/src/rda_python_dsarch/PgArch.py +0 -0
  10. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.9}/src/rda_python_dsarch/PgMeta.py +0 -0
  11. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.9}/src/rda_python_dsarch/__init__.py +0 -0
  12. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.9}/src/rda_python_dsarch/ds_arch.py +0 -0
  13. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.9}/src/rda_python_dsarch/dsarch.usg +0 -0
  14. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.9}/src/rda_python_dsarch/pg_arch.py +0 -0
  15. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.9}/src/rda_python_dsarch/pg_meta.py +0 -0
  16. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.9}/src/rda_python_dsarch.egg-info/SOURCES.txt +0 -0
  17. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.9}/src/rda_python_dsarch.egg-info/dependency_links.txt +0 -0
  18. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.9}/src/rda_python_dsarch.egg-info/entry_points.txt +0 -0
  19. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.9}/src/rda_python_dsarch.egg-info/requires.txt +0 -0
  20. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.9}/src/rda_python_dsarch.egg-info/top_level.txt +0 -0
  21. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.9}/tests/test_dsarch.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rda_python_dsarch
3
- Version: 3.0.8
3
+ Version: 3.0.9
4
4
  Summary: RDA Python package for utility program dsarch archive RDA data
5
5
  Author-email: Zaihua Ji <zji@ucar.edu>
6
6
  Project-URL: Homepage, https://github.com/NCAR/rda-python-dsarch
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "rda_python_dsarch"
7
- version = "3.0.8"
7
+ version = "3.0.9"
8
8
  authors = [
9
9
  { name="Zaihua Ji", email="zji@ucar.edu" },
10
10
  ]
@@ -45,6 +45,7 @@ class DsArch(PgArch, PgMeta):
45
45
  MODCNT -- number of existing records modified during the current action
46
46
  OVERRIDE -- non-zero when the -OE (OverrideExist) flag is active
47
47
  TARFILES -- dict mapping tar archive paths to their member-file metadata
48
+ BCKNOTES -- dict mapping backup IDs to their bfile.note member/move history
48
49
  VINDEX -- dict mapping version indices to version records
49
50
  CHGGRPS -- dict of group indices whose file-number counts need updating
50
51
  ERRMSG -- accumulated error message string for the current action
@@ -54,6 +55,7 @@ class DsArch(PgArch, PgMeta):
54
55
  super().__init__() # initialize parent class
55
56
  self.ERRCNT = self.RETSTAT = self.ALLCNT = self.ADDCNT = self.MODCNT = self.OVERRIDE = 0
56
57
  self.TARFILES = {}
58
+ self.BCKNOTES = {}
57
59
  self.VINDEX = {}
58
60
  self.CHGGRPS = {}
59
61
  self.ERRMSG = ''
@@ -1639,6 +1641,7 @@ class DsArch(PgArch, PgMeta):
1639
1641
  tofile = "{}/{}".format(todir, op.basename(bfile))
1640
1642
  tarfile = "{}/{}".format(tardir, op.basename(bfile))
1641
1643
  self.TARFILES[pgrec['bid']] = tarfile
1644
+ self.BCKNOTES[pgrec['bid']] = pgrec['note']
1642
1645
  tinfo = self.check_local_file(tarfile, 0, self.PGOPT['extlog'])
1643
1646
  if tinfo:
1644
1647
  self.pglog(tarfile + ": tar file exists already", self.PGOPT['wrnlog'])
@@ -1744,8 +1747,9 @@ class DsArch(PgArch, PgMeta):
1744
1747
  Path to the extracted file, or None on failure.
1745
1748
  """
1746
1749
  mfile = wfile = pgrec['wfile'] if 'wfile' in pgrec else pgrec['sfile']
1747
- note = pgrec['note']
1748
- while not re.search(r'{}<:>'.format(mfile), note):
1750
+ # the member list and move history are on bfile.note, not on the wfile/sfile record
1751
+ note = self.BCKNOTES.get(pgrec['bid'])
1752
+ while note and not re.search(r'{}<:>'.format(mfile), note):
1749
1753
  ms = re.search(r'>MV .* File (\S+) To .*{}'.format(mfile), note)
1750
1754
  if not ms: break
1751
1755
  mfile = ms.group(1)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rda_python_dsarch
3
- Version: 3.0.8
3
+ Version: 3.0.9
4
4
  Summary: RDA Python package for utility program dsarch archive RDA data
5
5
  Author-email: Zaihua Ji <zji@ucar.edu>
6
6
  Project-URL: Homepage, https://github.com/NCAR/rda-python-dsarch