Better native origins

This commit is contained in:
Alejandro R. Mosteo
2018-03-03 18:27:10 +01:00
parent 68892cbaf2
commit 9a930c2c69
7 changed files with 206 additions and 45 deletions
+21 -1
View File
@@ -1,7 +1,10 @@
with Alire.Conditional_Values;
with Alire.Platforms;
with GNAT.IO; -- To keep preelaborable
with Table_IO;
package body Alire.Releases is
use all type Properties.Labeled.Labels;
@@ -137,7 +140,24 @@ package body Alire.Releases is
Put_Line (R.Milestone.Image & ": " & R.Description);
-- ORIGIN
Put_Line ("Origin: " & R.Origin.Image);
if R.Origin.Is_Native then
Put_Line ("Origin (native package):");
declare
Table : Table_IO.Table;
begin
for Dist in Platforms.Distributions loop
if R.Origin.Package_Name (Dist) /= Origins.Unavailable.Image then
Table.New_Row;
Table.Append (" ");
Table.Append (Utils.To_Mixed_Case (Dist'Img) & ":");
Table.Append (R.Origin.Package_Name (Dist));
end if;
end loop;
Table.Print;
end;
else
Put_Line ("Origin: " & R.Origin.Image);
end if;
-- AVAILABILITY
if not R.Available.Is_Empty then