pyreposync 0.2.3__py3-none-any.whl → 0.2.5__py3-none-any.whl
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.
- pyreposync/sync_rpm.py +17 -9
- {pyreposync-0.2.3.dist-info → pyreposync-0.2.5.dist-info}/METADATA +1 -1
- {pyreposync-0.2.3.dist-info → pyreposync-0.2.5.dist-info}/RECORD +6 -6
- {pyreposync-0.2.3.dist-info → pyreposync-0.2.5.dist-info}/WHEEL +0 -0
- {pyreposync-0.2.3.dist-info → pyreposync-0.2.5.dist-info}/entry_points.txt +0 -0
- {pyreposync-0.2.3.dist-info → pyreposync-0.2.5.dist-info}/licenses/LICENSE.txt +0 -0
pyreposync/sync_rpm.py
CHANGED
@@ -2,6 +2,7 @@ from shutil import copyfile
|
|
2
2
|
|
3
3
|
import bz2
|
4
4
|
import gzip
|
5
|
+
import lzma
|
5
6
|
import configparser
|
6
7
|
import os
|
7
8
|
import shutil
|
@@ -57,15 +58,22 @@ class SyncRPM(SyncGeneric):
|
|
57
58
|
self.log.fatal("no primary.xml found in repomd.xml")
|
58
59
|
raise OSRepoSyncException("no primary.xml found in repomd.xml")
|
59
60
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
61
|
+
try:
|
62
|
+
if primary.endswith(".gz"):
|
63
|
+
with gzip.open(primary, "rb") as source:
|
64
|
+
root = xml.etree.ElementTree.parse(source).getroot()
|
65
|
+
elif primary.endswith(".bz2"):
|
66
|
+
with bz2.open(primary, "rb") as source:
|
67
|
+
root = xml.etree.ElementTree.parse(source).getroot()
|
68
|
+
elif primary.endswith(".xz"):
|
69
|
+
with lzma.open(primary, "rb") as source:
|
70
|
+
root = xml.etree.ElementTree.parse(source).getroot()
|
71
|
+
else:
|
72
|
+
with open(primary, "rb") as source:
|
73
|
+
root = xml.etree.ElementTree.parse(source).getroot()
|
74
|
+
except xml.etree.ElementTree.ParseError as err:
|
75
|
+
self.log.fatal(f"could not parse {primary}: {err}")
|
76
|
+
raise OSRepoSyncException(f"could not parse {primary}: {err}")
|
69
77
|
packages = root.findall("{http://linux.duke.edu/metadata/common}package")
|
70
78
|
for package in packages:
|
71
79
|
checksum = package.find("{http://linux.duke.edu/metadata/common}checksum")
|
@@ -3,9 +3,9 @@ pyreposync/downloader.py,sha256=828bIMCctd1X6I1w91-XHytQ1M5fmxkEw0YDKd5nvAY,4764
|
|
3
3
|
pyreposync/exceptions.py,sha256=IlnvhNaffQQ6geOgrjCciNFVbFpNcycH4ijSuMTbrGA,169
|
4
4
|
pyreposync/sync_deb.py,sha256=d9UggP-wW5CXXV4bjmd0gk7i0BM9xDeEJP8XEY_tYN0,8364
|
5
5
|
pyreposync/sync_generic.py,sha256=wN5hPcIacvQiMQoajcf7WSbiBGqxI86CYwfVnq1fR38,5693
|
6
|
-
pyreposync/sync_rpm.py,sha256=
|
7
|
-
pyreposync-0.2.
|
8
|
-
pyreposync-0.2.
|
9
|
-
pyreposync-0.2.
|
10
|
-
pyreposync-0.2.
|
11
|
-
pyreposync-0.2.
|
6
|
+
pyreposync/sync_rpm.py,sha256=1yf2-lQShKyY3CI_FW1i0tyWQ0sg69iBUn-4iWfoevk,11613
|
7
|
+
pyreposync-0.2.5.dist-info/METADATA,sha256=Vs779KRX_64pvfPldLU6yQvLvdk0w3xIPxMEUfUlKbQ,1565
|
8
|
+
pyreposync-0.2.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
9
|
+
pyreposync-0.2.5.dist-info/entry_points.txt,sha256=9LsBDWOF3O6_3ONP3Lc-4v1MTt5ay0Xv-TMcFbOIt2s,47
|
10
|
+
pyreposync-0.2.5.dist-info/licenses/LICENSE.txt,sha256=lwnJoIo7uwc0h6y6gC_RYqJkvjplViV3Ad6u7pQM4Bw,1084
|
11
|
+
pyreposync-0.2.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|