From 0af8323d1e9915e28feb5348b6bdbafe2096067a Mon Sep 17 00:00:00 2001 From: "alex@thor" Date: Sat, 10 Mar 2018 20:43:12 +0100 Subject: [PATCH] Fixed issues related to typed names --- src/alire-root.adb | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/alire-root.adb b/src/alire-root.adb index e3bac2ff..d6a897ad 100644 --- a/src/alire-root.adb +++ b/src/alire-root.adb @@ -28,9 +28,16 @@ package body Alire.Root is return Roots.Root is begin - Root := new Roots.Root'(Roots.New_Root (Index.Find (Projects.Image (Project), Version))); - Trace.Debug ("Storing indexed release as root: " & Root.Release.Milestone.Image); - return Root.all; + if Index.Exists (Projects.Image (Project), Version) then + Root := new Roots.Root'(Roots.New_Root (Index.Find (Projects.Image (Project), Version))); + Trace.Debug ("Storing indexed release as root: " & Root.Release.Milestone.Image); + return Root.all; + else + -- Session is outdated or outside + Trace.Debug ("Storing incomplete root for outdated session"); + return Set (Projects.Image (Project), + Conditional.For_Dependencies.Empty); + end if; end Set; ---------