apt repos
This commit is contained in:
Vendored
+1
-1
Submodule deps/semver updated: 95d9d6c99c...92af9d62a2
Vendored
+1
-1
Submodule deps/simple_logging updated: 1ec5e69603...81a00b835c
+1
-1
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
Reference in New Issue
Block a user