updating, upgrading, respawning working

This commit is contained in:
Jano at Zelda
2018-01-31 22:21:19 +01:00
parent 17b7226bfd
commit dfe375e495
3 changed files with 21 additions and 16 deletions
+5 -1
View File
@@ -20,7 +20,11 @@ package body Alire.Index is
Id,
Depends_On)
do
Releases.Insert (Rel);
if Releases.Contains (Rel) then
Log ("Attempt to register duplicate versions: " & Rel.Milestone_Image);
else
Releases.Insert (Rel);
end if;
end return;
end Register;
+14 -14
View File
@@ -2,7 +2,6 @@ with Alire.Containers;
with Alire.Depends;
with Alire.Releases;
with Alire.Repositories.Git;
with Alire.Repositories.Local;
with Semantic_Versioning;
@@ -35,10 +34,10 @@ package Alire.Index is
Depends_On : Dependencies := Depends.Nothing;
License : Licenses := Unknown) return Release;
function Register_Local (Project : Project_Name;
Version : Semantic_Versioning.Version;
Depends_On : Dependencies := Depends.Nothing;
License : Licenses := Unknown) return Release;
-- function Register_Local (Project : Project_Name;
-- Version : Semantic_Versioning.Version;
-- Depends_On : Dependencies := Depends.Nothing;
-- License : Licenses := Unknown) return Release;
-- Shortcuts to give dependencies:
@@ -79,15 +78,16 @@ private
Depends_On,
License));
function Register_Local (Project : Project_Name;
Version : Semantic_Versioning.Version;
Depends_On : Dependencies := Depends.Nothing;
License : Licenses := Unknown) return Release is
(Register (Project,
Version,
Repositories.Local.Repo, "",
Depends_On,
License));
-- function Register_Local (Project : Project_Name;
-- Version : Semantic_Versioning.Version;
-- Depends_On : Dependencies := Depends.Nothing;
-- License : Licenses := Unknown) return Release is
-- (Register (Project,
-- Version,
-- Repositories.Local.Repo,
-- "filesystem",
-- Depends_On,
-- License));
use Depends;
use Semantic_Versioning;
+2 -1
View File
@@ -2,7 +2,8 @@ with Ada.Containers.Indefinite_Holders;
package Alire.Repositories with Preelaborate is
subtype Release_Id is String;
subtype Release_Id is String
with Dynamic_Predicate => Release_Id'Length > 0;
-- Uniquely identifies a particular release within a repository
-- E.g., git/hg hashes, a zip file within a file server...