From dbf982e9994db49a3a6645a2a0cf79656a0d9b34 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 7 Oct 2021 13:23:57 +0300 Subject: Fix loader to add base repository manifest implicitly if repositories.manifest contains no repository manifests --- load/load.cxx | 3 +++ tests/load/1/misc/packages.manifest | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/load/load.cxx b/load/load.cxx index 16bdd40..3408284 100644 --- a/load/load.cxx +++ b/load/load.cxx @@ -667,6 +667,9 @@ load_repositories (const options& lo, manifest_parser mp (ifs, p.string ()); rpm = pkg_repository_manifests (mp, ignore_unknown); + + if (rpm.empty ()) + rpm.emplace_back (repository_manifest ()); // Add the base repository. } catch (const io_error& e) { diff --git a/tests/load/1/misc/packages.manifest b/tests/load/1/misc/packages.manifest index f02ce01..b019920 100644 --- a/tests/load/1/misc/packages.manifest +++ b/tests/load/1/misc/packages.manifest @@ -25,7 +25,7 @@ license: MIT url: http://www.example.com/foo/ email: foo-users@example.com location: libfoo-1.0.tar.gz -sha256sum: 754cba3da34dd0296866027a26b6bacf08cacc80f54516d3b8d8eeccbe31ab93 +sha256sum: e89c6d746f8b1ea3ec58d294946d2f683d133438d2ac8c88549ba24c19627e76 : name: libfoo version: 0.1 @@ -43,7 +43,7 @@ license: MIT url: http://www.example.com/foo/ email: foo-users@example.com location: libfoo-1.2.4+1.tar.gz -sha256sum: 35ccba3da34dd0296866027a26b6bacf08cacc80f54516d3b8d8eeccbe31ab93 +sha256sum: 6692a487e0908598e36bdeb9c25ed1e4a35bb99587dbc475807d314fa0719ac6 : name: libfoo version: 1.2.4+2 -- cgit v1.1