apt repos

This commit is contained in:
Alejandro R. Mosteo
2018-02-11 04:31:44 +01:00
parent 7233d619dc
commit 85a8f173a8
5 changed files with 37 additions and 3 deletions
Vendored
+1 -1
+1 -1
View File
@@ -19,7 +19,7 @@ package body Alire.Index is
Depends_On)
do
if Releases.Contains (Rel) then
Log ("Attempt to register duplicate versions: " & Rel.Milestone_Image);
Log ("Attempt to register duplicate versions: " & Rel.Milestone_Image, Warning);
else
Releases.Insert (Rel);
end if;
+15
View File
@@ -0,0 +1,15 @@
with Alire.OS_Lib;
package body Alire.Repositories.Apt is
--------------
-- Checkout --
--------------
overriding procedure Checkout (R : Repository; Id : Release_Id; Folder : String) is
pragma Unreferenced (R, Folder);
begin
OS_Lib.Spawn ("sudo", "apt install " & Id);
end Checkout;
end Alire.Repositories.Apt;
+19
View File
@@ -0,0 +1,19 @@
package Alire.Repositories.Apt is
type Repository (<>) is new Repositories.Repository with private;
Repo : constant Repository;
overriding function Image (Repo : Repository) return String;
overriding procedure Checkout (R : Repository; Id : Release_Id; Folder : String);
private
type Repository is new Repositories.Repository with null record;
Repo : constant Repository := (Repositories.Repository with null record);
function Image (Repo : Repository) return String is ("aptlocal");
end Alire.Repositories.Apt;