Commit c81f2c4 1 parent c3d81b7 commit c81f2c4 Copy full SHA for c81f2c4
File tree 5 files changed +22
-1
lines changed
5 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
43
43
- Fix unusable version.dist variable in packaging code templates (#116 ).
44
44
- Fix crash on build on unsupported derivative in instance pipelines (#117 ).
45
45
- Fix crash on retrieving derivative version in artifact definition (#118 ).
46
+ - Fix crash when main archive source is not defined on build of Deb or RPM
47
+ package (#119 ).
46
48
47
49
## [ 2.0.0] - 2023-05-05
48
50
Original file line number Diff line number Diff line change 23
23
24
24
from .. import ArtifactEnvBuild
25
25
from ...utils import current_user , extract_artifact_sources_archives
26
+ from ...errors import FatbuildrTaskExecutionError
26
27
from ...log import logr
27
28
28
29
logger = logr (__name__ )
@@ -98,6 +99,12 @@ def _build_src(self):
98
99
self .artifact ,
99
100
)
100
101
102
+ if self .main_archive is None :
103
+ raise FatbuildrTaskExecutionError (
104
+ f"Main archive of deb package artifact { self .artifact } is not "
105
+ "defined"
106
+ )
107
+
101
108
# Deb source packages do not support source archives in zip format, then
102
109
# first convert all source archives in zip format to tarballs.
103
110
for archive in self .archives :
Original file line number Diff line number Diff line change 23
23
from ...registry .formats import ChangelogEntry
24
24
from ...templates import Templeter
25
25
from ...utils import current_user , current_group
26
+ from ...errors import FatbuildrTaskExecutionError
26
27
from ...log import logr
27
28
28
29
logger = logr (__name__ )
@@ -166,6 +167,12 @@ def _build_src(self):
166
167
self .native_env ,
167
168
)
168
169
170
+ if self .main_archive is None :
171
+ raise FatbuildrTaskExecutionError (
172
+ f"Main archive of rpm package artifact { self .artifact } is not "
173
+ "defined"
174
+ )
175
+
169
176
# Initialize templater
170
177
templater = Templeter ()
171
178
Original file line number Diff line number Diff line change @@ -22,6 +22,10 @@ class FatbuildrRuntimeError(Exception):
22
22
pass
23
23
24
24
25
+ class FatbuildrTaskExecutionError (FatbuildrRuntimeError ):
26
+ pass
27
+
28
+
25
29
class FatbuildrServerError (Exception ):
26
30
pass
27
31
Original file line number Diff line number Diff line change 23
23
import shutil
24
24
from collections import deque
25
25
26
+ from ..errors import FatbuildrTaskExecutionError
26
27
from ..log import logr
27
28
from ..protocols .exports import ProtocolRegistry
28
29
@@ -175,7 +176,7 @@ def run(self, task):
175
176
task .prerun ()
176
177
try :
177
178
task .run ()
178
- except RuntimeError as err :
179
+ except ( FatbuildrTaskExecutionError , RuntimeError ) as err :
179
180
logger .error ("error while running task %s: %s" , task .id , err )
180
181
logger .info ("Task failed" )
181
182
else :
You can’t perform that action at this time.
0 commit comments