pyreposync 0.2.4__py3-none-any.whl → 0.2.6__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/__init__.py +5 -5
- pyreposync/{sync_deb.py → sync_deb822.py} +1 -1
- pyreposync/sync_rpm.py +16 -12
- {pyreposync-0.2.4.dist-info → pyreposync-0.2.6.dist-info}/METADATA +2 -2
- pyreposync-0.2.6.dist-info/RECORD +11 -0
- pyreposync-0.2.4.dist-info/RECORD +0 -11
- {pyreposync-0.2.4.dist-info → pyreposync-0.2.6.dist-info}/WHEEL +0 -0
- {pyreposync-0.2.4.dist-info → pyreposync-0.2.6.dist-info}/entry_points.txt +0 -0
- {pyreposync-0.2.4.dist-info → pyreposync-0.2.6.dist-info}/licenses/LICENSE.txt +0 -0
pyreposync/__init__.py
CHANGED
@@ -10,7 +10,7 @@ import time
|
|
10
10
|
from pyreposync.downloader import Downloader
|
11
11
|
from pyreposync.exceptions import OSRepoSyncException, OSRepoSyncHashError
|
12
12
|
from pyreposync.sync_rpm import SyncRPM
|
13
|
-
from pyreposync.
|
13
|
+
from pyreposync.sync_deb822 import SyncDeb822
|
14
14
|
|
15
15
|
|
16
16
|
def main():
|
@@ -274,11 +274,11 @@ class PyRepoSync:
|
|
274
274
|
client_key=self.config.get(section, "sslclientkey", fallback=None),
|
275
275
|
ca_cert=self.config.get(section, "sslcacert", fallback=None),
|
276
276
|
)
|
277
|
-
elif section.endswith(":
|
278
|
-
return
|
277
|
+
elif section.endswith(":deb822"):
|
278
|
+
return SyncDeb822(
|
279
279
|
base_url=self.config.get(section, "baseurl"),
|
280
280
|
destination=self.config.get("main", "destination"),
|
281
|
-
reponame=section[:-
|
281
|
+
reponame=section[:-7],
|
282
282
|
date=date,
|
283
283
|
allow_missing_packages=self.config.getboolean(
|
284
284
|
section, "allow_missing_packages", fallback=False
|
@@ -295,7 +295,7 @@ class PyRepoSync:
|
|
295
295
|
def get_sections(self):
|
296
296
|
sections = set()
|
297
297
|
for section in self.config:
|
298
|
-
if section.endswith(":rpm") or section.endswith(":
|
298
|
+
if section.endswith(":rpm") or section.endswith(":deb822"):
|
299
299
|
if self.repo and section != self.repo:
|
300
300
|
continue
|
301
301
|
if self._tags:
|
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,19 +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:
|
69
73
|
root = xml.etree.ElementTree.parse(source).getroot()
|
70
|
-
|
71
|
-
|
72
|
-
|
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}")
|
73
77
|
packages = root.findall("{http://linux.duke.edu/metadata/common}package")
|
74
78
|
for package in packages:
|
75
79
|
checksum = package.find("{http://linux.duke.edu/metadata/common}checksum")
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: pyreposync
|
3
|
-
Version: 0.2.
|
4
|
-
Summary:
|
3
|
+
Version: 0.2.6
|
4
|
+
Summary: rpm and deb822 repository sync tool
|
5
5
|
Project-URL: Source, https://github.com/schlitzered/pyreposync
|
6
6
|
Author-email: "Stephan.Schultchen" <sschultchen@gmail.com>
|
7
7
|
License: The MIT License (MIT)
|
@@ -0,0 +1,11 @@
|
|
1
|
+
pyreposync/__init__.py,sha256=hhsb3ZqssxKAcSZ_rEiG_2XjgbRK1SveMtL_sI9pMnI,16577
|
2
|
+
pyreposync/downloader.py,sha256=828bIMCctd1X6I1w91-XHytQ1M5fmxkEw0YDKd5nvAY,4764
|
3
|
+
pyreposync/exceptions.py,sha256=IlnvhNaffQQ6geOgrjCciNFVbFpNcycH4ijSuMTbrGA,169
|
4
|
+
pyreposync/sync_deb822.py,sha256=XkIZfYfgshYFwdk1oL8TsysUge2_6iPiz5zOmKNaZRk,8367
|
5
|
+
pyreposync/sync_generic.py,sha256=wN5hPcIacvQiMQoajcf7WSbiBGqxI86CYwfVnq1fR38,5693
|
6
|
+
pyreposync/sync_rpm.py,sha256=1yf2-lQShKyY3CI_FW1i0tyWQ0sg69iBUn-4iWfoevk,11613
|
7
|
+
pyreposync-0.2.6.dist-info/METADATA,sha256=_iKcUStZxLy2goNOQgaIMgRE3CzmG34iDz-nXKN51Jw,1591
|
8
|
+
pyreposync-0.2.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
9
|
+
pyreposync-0.2.6.dist-info/entry_points.txt,sha256=9LsBDWOF3O6_3ONP3Lc-4v1MTt5ay0Xv-TMcFbOIt2s,47
|
10
|
+
pyreposync-0.2.6.dist-info/licenses/LICENSE.txt,sha256=lwnJoIo7uwc0h6y6gC_RYqJkvjplViV3Ad6u7pQM4Bw,1084
|
11
|
+
pyreposync-0.2.6.dist-info/RECORD,,
|
@@ -1,11 +0,0 @@
|
|
1
|
-
pyreposync/__init__.py,sha256=Y5wux97cZGbZfLJa2aXku1ZwISLVqoeYsgDDVTmbVpU,16562
|
2
|
-
pyreposync/downloader.py,sha256=828bIMCctd1X6I1w91-XHytQ1M5fmxkEw0YDKd5nvAY,4764
|
3
|
-
pyreposync/exceptions.py,sha256=IlnvhNaffQQ6geOgrjCciNFVbFpNcycH4ijSuMTbrGA,169
|
4
|
-
pyreposync/sync_deb.py,sha256=d9UggP-wW5CXXV4bjmd0gk7i0BM9xDeEJP8XEY_tYN0,8364
|
5
|
-
pyreposync/sync_generic.py,sha256=wN5hPcIacvQiMQoajcf7WSbiBGqxI86CYwfVnq1fR38,5693
|
6
|
-
pyreposync/sync_rpm.py,sha256=yL7fuGmg3yMbu3x5CtBF_3UAdsK4aFW-0saFJaiCB54,11428
|
7
|
-
pyreposync-0.2.4.dist-info/METADATA,sha256=W5rAwK4CK2UWpF-YpbiaeVZoovx49whfeVVXNr_e3Zo,1565
|
8
|
-
pyreposync-0.2.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
9
|
-
pyreposync-0.2.4.dist-info/entry_points.txt,sha256=9LsBDWOF3O6_3ONP3Lc-4v1MTt5ay0Xv-TMcFbOIt2s,47
|
10
|
-
pyreposync-0.2.4.dist-info/licenses/LICENSE.txt,sha256=lwnJoIo7uwc0h6y6gC_RYqJkvjplViV3Ad6u7pQM4Bw,1084
|
11
|
-
pyreposync-0.2.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|