diff --git a/repos/gems/include/depot/archive.h b/repos/gems/include/depot/archive.h index e3ded7b67e..79c005da27 100644 --- a/repos/gems/include/depot/archive.h +++ b/repos/gems/include/depot/archive.h @@ -30,7 +30,7 @@ struct Depot::Archive typedef String<80> Name; typedef String<40> Version; - enum Type { PKG, RAW, SRC, IMAGE }; + enum Type { PKG, RAW, SRC, BIN, DBG, IMAGE }; struct Unknown_archive_type : Exception { }; @@ -84,6 +84,8 @@ struct Depot::Archive if (name == "src") return SRC; if (name == "pkg") return PKG; if (name == "raw") return RAW; + if (name == "bin") return BIN; + if (name == "dbg") return DBG; if (name == "image") return IMAGE; throw Unknown_archive_type(); @@ -113,8 +115,22 @@ struct Depot::Archive return _path_element(path, 1) == "image" && name(path) != "index"; } - static Name name (Path const &path) { return _path_element (path, 2); } - static Version version (Path const &path) { return _path_element(path, 3); } + static Name name (Path const &path) + { + if ((type(path) == BIN) || (type(path) == DBG)) + return _path_element (path, 3); + + return _path_element (path, 2); + } + + static Version version (Path const &path) + { + if ((type(path) == BIN) || (type(path) == DBG)) + return _path_element(path, 4); + + return _path_element(path, 3); + } + static Version index_version(Path const &path) { return _path_element(path, 2); } /** diff --git a/repos/gems/run/depot_download.run b/repos/gems/run/depot_download.run index c68e25b3d5..2928c8eff7 100644 --- a/repos/gems/run/depot_download.run +++ b/repos/gems/run/depot_download.run @@ -151,6 +151,7 @@ set fd [open [run_dir]/genode/installation w] puts $fd { + } @@ -173,6 +174,7 @@ append_qemu_nic_args # watch the state reports generated by the depot-download manager set expected_pattern {} append expected_pattern {.*path="genodelabs/pkg/wm/2019-03-17" state="done".*} +append expected_pattern {.*path="genodelabs/bin/x86_64/backdrop/2019-03-17" state="done".*} append expected_pattern {.*path="genodelabs/index/19.02" state="done".*} append expected_pattern {.*path="genodelabs/index/19.03" state="failed".*} diff --git a/repos/gems/src/app/depot_query/main.cc b/repos/gems/src/app/depot_query/main.cc index 94f5d1ac97..f6273a6e74 100644 --- a/repos/gems/src/app/depot_query/main.cc +++ b/repos/gems/src/app/depot_query/main.cc @@ -65,6 +65,8 @@ Depot_query::Main::_find_rom_in_pkg(File_content const &archives, }); break; + case Archive::BIN: + case Archive::DBG: case Archive::IMAGE: break; } @@ -221,6 +223,12 @@ void Depot_query::Main::_collect_source_dependencies(Archive::Path const &path, break; } + case Archive::BIN: + case Archive::DBG: + dependencies.record(Archive::Path(Archive::user(path), "/src/", + Archive::name(path), "/", + Archive::version(path)), require_verify); + break; case Archive::RAW: case Archive::IMAGE: break; @@ -258,6 +266,8 @@ void Depot_query::Main::_collect_binary_dependencies(Archive::Path const &path, break; case Archive::RAW: + case Archive::BIN: + case Archive::DBG: dependencies.record(path, require_verify); break;