Skip to content

Commit 419de9a

Browse files
reddevillgdengbo11
authored andcommitted
fix: Use module options when exporting UAB
Signed-off-by: reddevillg <reddevillg@gmail.com>
1 parent 33dc66f commit 419de9a

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

libs/linglong/src/linglong/builder/linglong_builder.cpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1528,17 +1528,18 @@ utils::error::Result<void> Builder::exportUAB(const ExportOption &option,
15281528

15291529
// export single ref
15301530
if (distributedOnly) {
1531-
auto layerDir = this->repo.getLayerDir(*curRef);
1532-
if (!layerDir) {
1533-
return LINGLONG_ERR(layerDir);
1534-
}
1531+
for (const auto &module : exportOpts.modules) {
1532+
auto layerDir = this->repo.getLayerDir(*curRef, module);
1533+
if (!layerDir) {
1534+
return LINGLONG_ERR(layerDir);
1535+
}
15351536

1536-
auto ret = packager.appendLayer(*layerDir);
1537-
if (!ret) {
1538-
return LINGLONG_ERR(ret);
1537+
auto ret = packager.appendLayer(*layerDir);
1538+
if (!ret) {
1539+
return LINGLONG_ERR(ret);
1540+
}
15391541
}
1540-
1541-
ret = packager.pack(uabFile, true);
1542+
auto ret = packager.pack(uabFile, true);
15421543
if (!ret) {
15431544
return LINGLONG_ERR(ret);
15441545
}

0 commit comments

Comments
 (0)