lockss-turtles 0.6.0.dev11__py3-none-any.whl → 0.6.0.dev13__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.
- lockss/turtles/__init__.py +1 -1
- lockss/turtles/plugin_registry.py +8 -8
- {lockss_turtles-0.6.0.dev11.dist-info → lockss_turtles-0.6.0.dev13.dist-info}/METADATA +1 -1
- {lockss_turtles-0.6.0.dev11.dist-info → lockss_turtles-0.6.0.dev13.dist-info}/RECORD +7 -7
- {lockss_turtles-0.6.0.dev11.dist-info → lockss_turtles-0.6.0.dev13.dist-info}/LICENSE +0 -0
- {lockss_turtles-0.6.0.dev11.dist-info → lockss_turtles-0.6.0.dev13.dist-info}/WHEEL +0 -0
- {lockss_turtles-0.6.0.dev11.dist-info → lockss_turtles-0.6.0.dev13.dist-info}/entry_points.txt +0 -0
lockss/turtles/__init__.py
CHANGED
|
@@ -132,11 +132,11 @@ class DirectoryPluginRegistryLayout(BasePluginRegistryLayout):
|
|
|
132
132
|
file_naming_convention: Optional[PluginRegistryLayoutFileNamingConvention] = Field(BasePluginRegistryLayout.FILE_NAMING_CONVENTION_DEFAULT, **BasePluginRegistryLayout.FILE_NAMING_CONVENTION_FIELD)
|
|
133
133
|
|
|
134
134
|
def _copy_jar(self, src_path: Path, dst_path: Path, interactive: bool=False) -> None:
|
|
135
|
-
basename = dst_path.name
|
|
136
|
-
subprocess.run(['cp', str(src_path), str(dst_path)], check=True, cwd=
|
|
135
|
+
dst_dir, basename = dst_path.parent, dst_path.name
|
|
136
|
+
subprocess.run(['cp', str(src_path), str(dst_path)], check=True, cwd=dst_dir)
|
|
137
137
|
if subprocess.run('command -v selinuxenabled > /dev/null && selinuxenabled && command -v chcon > /dev/null', shell=True).returncode == 0:
|
|
138
138
|
cmd = ['chcon', '-t', 'httpd_sys_content_t', basename]
|
|
139
|
-
subprocess.run(cmd, check=True, cwd=
|
|
139
|
+
subprocess.run(cmd, check=True, cwd=dst_dir)
|
|
140
140
|
|
|
141
141
|
|
|
142
142
|
class RcsPluginRegistryLayout(DirectoryPluginRegistryLayout):
|
|
@@ -144,13 +144,13 @@ class RcsPluginRegistryLayout(DirectoryPluginRegistryLayout):
|
|
|
144
144
|
file_naming_convention: Optional[PluginRegistryLayoutFileNamingConvention] = Field(BasePluginRegistryLayout.FILE_NAMING_CONVENTION_DEFAULT, **BasePluginRegistryLayout.FILE_NAMING_CONVENTION_FIELD)
|
|
145
145
|
|
|
146
146
|
def _copy_jar(self, src_path: Path, dst_path: Path, interactive: bool=False) -> None:
|
|
147
|
-
basename = dst_path.name
|
|
147
|
+
dst_dir, basename = dst_path.parent, dst_path.name
|
|
148
148
|
plugin = Plugin.from_jar(src_path)
|
|
149
|
-
rcs_path =
|
|
149
|
+
rcs_path = dst_path.joinpath('RCS', f'{basename},v')
|
|
150
150
|
# Maybe do co -l before the parent's copy
|
|
151
151
|
if dst_path.exists() and rcs_path.is_file():
|
|
152
152
|
cmd = ['co', '-l', basename]
|
|
153
|
-
subprocess.run(cmd, check=True, cwd=
|
|
153
|
+
subprocess.run(cmd, check=True, cwd=dst_dir)
|
|
154
154
|
# Do the parent's copy
|
|
155
155
|
super()._copy_jar(src_path, dst_path)
|
|
156
156
|
# Do ci -u after the parent's copy
|
|
@@ -158,7 +158,7 @@ class RcsPluginRegistryLayout(DirectoryPluginRegistryLayout):
|
|
|
158
158
|
if not rcs_path.is_file():
|
|
159
159
|
cmd.append(f'-t-{plugin.get_name()}')
|
|
160
160
|
cmd.append(basename)
|
|
161
|
-
subprocess.run(cmd, check=True, cwd=
|
|
161
|
+
subprocess.run(cmd, check=True, cwd=dst_dir)
|
|
162
162
|
|
|
163
163
|
|
|
164
164
|
PluginRegistryLayout = Annotated[Union[DirectoryPluginRegistryLayout, RcsPluginRegistryLayout], Field(discriminator='type')]
|
|
@@ -178,7 +178,7 @@ class PluginRegistryLayer(BaseModel, ABC):
|
|
|
178
178
|
_plugin_registry: Optional[PluginRegistry]
|
|
179
179
|
|
|
180
180
|
def deploy_plugin(self, plugin_id: PluginIdentifier, src_path: Path, interactive: bool=False) -> Optional[tuple[Path, Plugin]]:
|
|
181
|
-
self.get_plugin_registry().get_layout().deploy_plugin(plugin_id, self, src_path, interactive)
|
|
181
|
+
return self.get_plugin_registry().get_layout().deploy_plugin(plugin_id, self, src_path, interactive)
|
|
182
182
|
|
|
183
183
|
def get_id(self) -> PluginRegistryLayerIdentifier:
|
|
184
184
|
return self.id
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
lockss/turtles/__init__.py,sha256=
|
|
1
|
+
lockss/turtles/__init__.py,sha256=4XdDDkFOphHi3A4NDRksCjp0n68iUeEcdS6WlQKSvGY,1744
|
|
2
2
|
lockss/turtles/__main__.py,sha256=825geLIwXS0LKRqxifJXlLaAZrY8nllXfHzw5ch5ysM,1624
|
|
3
3
|
lockss/turtles/app.py,sha256=7jC9fhVxfG9RDM8_yLxWzZ2cx_9HOzFZX3aJ9Np2hbg,13410
|
|
4
4
|
lockss/turtles/cli.py,sha256=pLZAG1hmYarCp0R4vHSJcTs3G1umk2esvaLhM5JX7rg,18435
|
|
5
5
|
lockss/turtles/plugin.py,sha256=re44YVlzXVU8azDshxn7oHw1GdTQLLQgYwkvZlur-60,5384
|
|
6
|
-
lockss/turtles/plugin_registry.py,sha256=
|
|
6
|
+
lockss/turtles/plugin_registry.py,sha256=M7mBFAccn1IVBIZ3yFbV2ljF7tbJqOFIEHxqr9PVsZ4,11921
|
|
7
7
|
lockss/turtles/plugin_set.py,sha256=hKUXOSRyhHxxcMWE3I69Wykod32Ig871oeJsMTvbXfU,11291
|
|
8
8
|
lockss/turtles/util.py,sha256=wGCrw_YySvyqaCzT0PItzXpkLHOCMMC_DQHhGU7zudI,2500
|
|
9
9
|
unittest/lockss/turtles/__init__.py,sha256=hrgWx4GaP-hhPBuRlbLndJnOQmZicKCLaP-dQTCu1sQ,3162
|
|
10
10
|
unittest/lockss/turtles/test_plugin_set.py,sha256=i-VM8mvrPuW2KqUlh2HPVRtgh3-F7RhmRAwcvhwpoDA,3354
|
|
11
|
-
lockss_turtles-0.6.0.
|
|
12
|
-
lockss_turtles-0.6.0.
|
|
13
|
-
lockss_turtles-0.6.0.
|
|
14
|
-
lockss_turtles-0.6.0.
|
|
15
|
-
lockss_turtles-0.6.0.
|
|
11
|
+
lockss_turtles-0.6.0.dev13.dist-info/LICENSE,sha256=O9ONND4uDxY_jucI4jZDf2liAk05ScEJaYu-Al7EOdQ,1506
|
|
12
|
+
lockss_turtles-0.6.0.dev13.dist-info/METADATA,sha256=vKitUPeHBz-NVzlVs0aFsybuTxNRQwdeqgmUCvGRBVo,39611
|
|
13
|
+
lockss_turtles-0.6.0.dev13.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
14
|
+
lockss_turtles-0.6.0.dev13.dist-info/entry_points.txt,sha256=25BAVFSBRKWAWiXIGZgcr1ypt2mV7nj31Jl8WcNZZOk,51
|
|
15
|
+
lockss_turtles-0.6.0.dev13.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
{lockss_turtles-0.6.0.dev11.dist-info → lockss_turtles-0.6.0.dev13.dist-info}/entry_points.txt
RENAMED
|
File without changes
|