rda-python-dsarch 3.0.8__tar.gz → 3.0.10__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.10}/PKG-INFO +1 -1
  2. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.10}/pyproject.toml +1 -1
  3. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.10}/src/rda_python_dsarch/dsarch.py +8 -8
  4. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.10/src/rda_python_dsarch.egg-info}/PKG-INFO +1 -1
  5. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.10}/LICENSE +0 -0
  6. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.10}/MANIFEST.in +0 -0
  7. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.10}/README.md +0 -0
  8. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.10}/setup.cfg +0 -0
  9. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.10}/src/rda_python_dsarch/PgArch.py +0 -0
  10. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.10}/src/rda_python_dsarch/PgMeta.py +0 -0
  11. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.10}/src/rda_python_dsarch/__init__.py +0 -0
  12. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.10}/src/rda_python_dsarch/ds_arch.py +0 -0
  13. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.10}/src/rda_python_dsarch/dsarch.usg +0 -0
  14. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.10}/src/rda_python_dsarch/pg_arch.py +0 -0
  15. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.10}/src/rda_python_dsarch/pg_meta.py +0 -0
  16. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.10}/src/rda_python_dsarch.egg-info/SOURCES.txt +0 -0
  17. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.10}/src/rda_python_dsarch.egg-info/dependency_links.txt +0 -0
  18. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.10}/src/rda_python_dsarch.egg-info/entry_points.txt +0 -0
  19. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.10}/src/rda_python_dsarch.egg-info/requires.txt +0 -0
  20. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.10}/src/rda_python_dsarch.egg-info/top_level.txt +0 -0
  21. {rda_python_dsarch-3.0.8 → rda_python_dsarch-3.0.10}/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.10
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.10"
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'])
@@ -1707,10 +1710,8 @@ class DsArch(PgArch, PgMeta):
1707
1710
  self.pglog("{}: Backup tar file of Backup Id {} is not downloaded".format(wfile, pgrec['bid']), self.PGOPT['wrnlog'])
1708
1711
  continue
1709
1712
  tarfile = self.TARFILES[pgrec['bid']]
1713
+ self.make_local_directory(tardir, self.PGOPT['extlog'])
1710
1714
  ainfo = self.get_backup_member_file(pgrec, tarfile, tardir)
1711
- tarcmd = "tar -xvf {} -C {} {}".format(tarfile, tardir, wfile)
1712
- self.pgsystem(tarcmd, self.PGOPT['extlog'], 5)
1713
- ainfo = self.check_local_file(afile, 0, self.PGOPT['extlog'])
1714
1715
  if not ainfo:
1715
1716
  self.pglog("{}: Error untar File {}".format(tarfile, afile), self.PGOPT['wrnlog'])
1716
1717
  continue
@@ -1744,8 +1745,9 @@ class DsArch(PgArch, PgMeta):
1744
1745
  Path to the extracted file, or None on failure.
1745
1746
  """
1746
1747
  mfile = wfile = pgrec['wfile'] if 'wfile' in pgrec else pgrec['sfile']
1747
- note = pgrec['note']
1748
- while not re.search(r'{}<:>'.format(mfile), note):
1748
+ # the member list and move history are on bfile.note, not on the wfile/sfile record
1749
+ note = self.BCKNOTES.get(pgrec['bid'])
1750
+ while note and not re.search(r'{}<:>'.format(mfile), note):
1749
1751
  ms = re.search(r'>MV .* File (\S+) To .*{}'.format(mfile), note)
1750
1752
  if not ms: break
1751
1753
  mfile = ms.group(1)
@@ -1813,10 +1815,8 @@ class DsArch(PgArch, PgMeta):
1813
1815
  self.pglog("{}: Backup tar file of Backup Id {} is not downloaded".format(sfile, pgrec['bid']), self.PGOPT['wrnlog'])
1814
1816
  continue
1815
1817
  tarfile = self.TARFILES[pgrec['bid']]
1818
+ self.make_local_directory(tardir, self.PGOPT['extlog'])
1816
1819
  ainfo = self.get_backup_member_file(pgrec, tarfile, tardir)
1817
- tarcmd = "tar -xvf {} -C {} {}".format(tarfile, tardir, sfile)
1818
- self.pgsystem(tarcmd, self.PGOPT['extlog'], 5)
1819
- ainfo = self.check_local_file(afile, 0, self.PGOPT['extlog'])
1820
1820
  if not ainfo:
1821
1821
  self.pglog("{}: Error untar File {}".format(tarfile, afile), self.PGOPT['wrnlog'])
1822
1822
  continue
@@ -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.10
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