@@ -242,38 +242,31 @@ subroutine new_dependencies(deps, table, root, meta, error)
242
242
! > Parse all meta- and non-metapackage dependencies
243
243
do idep = 1 , size (list)
244
244
245
+ ! Check if this is a standard dependency node
245
246
call get_value(table, list(idep)% key, node, stat= stat)
246
- if (stat /= toml_stat% success) then
247
- call syntax_error(error, " Dependency " // list(idep)% key// " must be a table entry" )
248
- exit
249
- end if
250
-
251
- ! Try to parse as a standard dependency
252
- call new_dependency(all_deps(idep), node, root, error)
253
-
254
- is_standard_dependency: if (.not. allocated (error)) then
255
-
256
- ! If a valid git/local config is found, use it always
257
- is_meta(idep) = .false.
247
+ is_standard_dependency: if (stat /= toml_stat% success) then
258
248
259
- elseif (metapackages_allowed .and. is_meta_package(list(idep)% key)) then
260
-
261
- ! > Metapackage name: Check if this is a valid metapackage request
249
+ ! See if it can be a valid metapackage name
262
250
call new_meta_request(meta_request, list(idep)% key, table, error= error)
263
251
264
252
! > Neither a standard dep nor a metapackage
265
- if (allocated (error)) return
253
+ if (allocated (error)) then
254
+ call syntax_error(error, " Dependency " // list(idep)% key// " is not a valid metapackage or a table entry" )
255
+ return
256
+ endif
266
257
267
258
! > Valid meta dependency
268
259
is_meta(idep) = .true.
269
260
270
261
else
271
262
272
- ! > Not a standard dependency and not a metapackage: dump an error
273
- call syntax_error(error, " Dependency " // list(idep)% key// " cannot be parsed. Check input format" )
274
- return
263
+ ! Parse as a standard dependency
264
+ is_meta(idep) = .false.
265
+
266
+ call new_dependency(all_deps(idep), node, root, error)
267
+ if (allocated (error)) return
275
268
276
- endif is_standard_dependency
269
+ end if is_standard_dependency
277
270
278
271
end do
279
272
0 commit comments