From 2e35598317fd4f622f8df8b5a38fe99f999b8e55 Mon Sep 17 00:00:00 2001 From: Alejandro R Mosteo Date: Fri, 7 Aug 2020 14:44:46 +0200 Subject: [PATCH] Move origin information to its own top-level table (#480) * Script to patch manifest with separate origin table A self-contained origin table is cleaner and allow each origin kind to have its own fields without polluting the rest of the properties top-level table * Alire:Index: bump expected index version * Load/Save new [origin] table * Testsuite: migrated indexes to new [origin] format * Fixes detected by testsuite --- scripts/python/alire/__init__.py | 0 scripts/python/alire/index.py | 24 ++ scripts/python/alire/utils.py | 18 ++ scripts/python/separate-origins.py | 79 ++++++ scripts/{ => python}/split-crates.py | 0 src/alire/alire-features-index.adb | 5 +- src/alire/alire-index.ads | 2 +- src/alire/alire-origins-tweaks.adb | 3 +- src/alire/alire-origins.adb | 251 +++++++++--------- src/alire/alire-origins.ads | 16 +- src/alire/alire-releases.adb | 4 +- src/alire/alire-toml_keys.ads | 3 - src/alire/alire-uri.ads | 26 +- src/alire/alire.ads | 8 +- .../basic_index/he/hello/hello-1.0.0.toml | 6 +- .../basic_index/he/hello/hello-1.0.1.toml | 6 +- testsuite/fixtures/basic_index/index.toml | 2 +- .../li/libhello/libhello-1.0.0.toml | 4 +- .../cases_index/he/hello/hello-1.0.1.toml | 19 +- testsuite/fixtures/cases_index/index.toml | 2 +- .../li/libhello/libhello-1.0.0-linuxonly.toml | 4 +- .../li/libhello/libhello-1.0.0-unavail.toml | 6 +- .../li/libhello/libhello-1.0.0.toml | 4 +- testsuite/fixtures/checked_index/index.toml | 2 +- .../li/libhello/libhello-1.0.0-git.toml | 8 +- .../li/libhello/libhello-1.0.0-gitbad.toml | 8 +- .../li/libhello/libhello-1.0.0-tarball.toml | 6 +- testsuite/fixtures/git_index/index.toml | 2 +- .../git_index/li/libfoo/libfoo-1.0.0-git.toml | 5 +- testsuite/fixtures/native_index/index.toml | 2 +- .../libhello-0.9.0-test-unav-native.toml | 4 +- .../li/libhello/libhello-1.0.0.toml | 4 +- testsuite/fixtures/run_index/index.toml | 2 +- .../run_index/no/noop/noop-1.0.0-default.toml | 6 +- .../run_index/no/noop/noop-1.0.0-multi.toml | 8 +- .../run_index/no/noop/noop-1.0.0-nondef.toml | 8 +- .../solver_index/he/hello/hello-1.0.0.toml | 6 +- .../solver_index/he/hello/hello-1.0.1.toml | 6 +- .../solver_index/he/hello/hello-2.0.0.toml | 6 +- .../solver_index/he/hello/hello-3.0.0.toml | 6 +- .../solver_index/he/hello/hello-4.0.0.toml | 6 +- testsuite/fixtures/solver_index/index.toml | 2 +- .../li/libhello/libhello-1.0.0.toml | 4 +- .../li/libhello/libhello-1.0.1.toml | 4 +- .../li/libhello/libhello-1.1.0.toml | 4 +- .../li/libhello/libhello-2.0.0.toml | 4 +- .../su/superhello/superhello-1.0.0.toml | 6 +- .../my_index/index/cr/crate/crate-1.0.0.toml | 4 +- .../local-index/my_index/index/index.toml | 2 +- .../my_index/index/ba/bad/bad-1.0.0.toml | 4 +- .../my_index/index/go/good/good-1.0.0.toml | 4 +- .../tests/get/build/my_index/index/index.toml | 2 +- .../my_index/index.toml | 2 +- .../my_index/ma/main/main-1.0.0.toml | 6 +- .../indirect-link/my_index/index/index.toml | 2 +- .../my_index/index/ti/tier1/tier1-1.0.0.toml | 4 +- .../my_index/index/ti/tier2/tier2-1.0.0.toml | 4 +- .../my_index/index/ti/tier3/tier3-1.0.0.toml | 4 +- .../he/hello_world/hello_world-0.1.0.toml | 4 +- .../my_index/index/index.toml | 2 +- .../my_index/index/index.toml | 2 +- .../he/hello_world/hello_world-0.1.0.toml | 4 +- .../bad-license/my_index/index/index.toml | 2 +- .../he/hello_world/hello_world-0.1.0.toml | 4 +- .../index/bad-tag/my_index/index/index.toml | 2 +- .../he/hello_world/hello_world-0.1.0.toml | 4 +- .../index/empty-tag/my_index/index/index.toml | 2 +- .../my_index/index/he/hello/hello-1.0.0.toml | 4 +- .../environment/my_index/index/index.toml | 2 +- .../external-available/my_index/index.toml | 2 +- .../my_index/index/index.toml | 2 +- .../cr/crate_master/crate_master-1.0.0.toml | 6 +- .../index/external-hint/my_index/index.toml | 2 +- .../index/external-msys2/my_index/index.toml | 2 +- .../my_index/ma/main/main-1.0.0.toml | 6 +- .../he/hello_world/hello_world-0.1.0.toml | 6 +- .../my_index/index/index.toml | 2 +- .../he/hello_world/hello_world-0.1.0.toml | 6 +- .../my_index/index/index.toml | 2 +- .../he/hello_world/hello_world-0.1.0.toml | 4 +- .../index/long-tag/my_index/index/index.toml | 2 +- .../he/hello_world/hello_world-0.1.0.toml | 4 +- .../maint-bad-email/my_index/index/index.toml | 2 +- .../he/hello_world/hello_world-0.1.0.toml | 4 +- .../maint-bad-login/my_index/index/index.toml | 2 +- .../index/cr/crate/misplaced_crate-1.0.0.toml | 4 +- .../my_index/index/index.toml | 2 +- .../index/cr/bad_parent/crate-1.0.0.toml | 4 +- .../my_index/index/index.toml | 2 +- .../bad_index_1/he/hello/hello-1.0.0.toml | 4 +- .../bad_index_1/index.toml | 2 +- .../bad_index_2/he/hello/hello-1.0.0.toml | 4 +- .../bad_index_2/index.toml | 2 +- .../he/hello_world/hello_world-0.1.0.toml | 6 +- .../my_index/index/index.toml | 2 +- .../he/hello_world/hello_world-0.1.0.toml | 4 +- .../my_index/index/index.toml | 2 +- .../tests/index/origin-unknown-kind/test.py | 2 +- .../he/hello_world/hello_world-0.1.0.toml | 4 +- .../my_index/index/index.toml | 2 +- .../my_index/index/cr/crate/crate-1.0.0.toml | 4 +- .../my_index/index/index.toml | 2 +- .../index/he/hello1/hello1-0.1.0.toml | 4 +- .../index/he/hello2/hello2-0.1.0.toml | 4 +- .../tests/pin/all/my_index/index/index.toml | 2 +- .../tests/pin/change-type/my_index/index.toml | 2 +- .../my_index/li/libhello/libhello-1.0.0.toml | 4 +- .../pin/downgrade/my_index/index/index.toml | 2 +- .../index/li/libchild/libchild-0.1.0.toml | 4 +- .../index/li/libchild/libchild-0.2.0.toml | 4 +- .../index/li/libparent/libparent-1.0.0.toml | 4 +- .../pin-dir-with-regular/my_index/index.toml | 2 +- .../my_index/li/libhello/libhello-1.0.0.toml | 4 +- .../tests/pin/pin-dir/my_index/index.toml | 2 +- .../my_index/li/libhello/libhello-1.0.0.toml | 4 +- .../pin/post-update/my_index/index/index.toml | 2 +- .../index/li/libchild/libchild-0.1.0.toml | 4 +- .../index/li/libchild/libchild-0.2.0.toml | 4 +- .../index/li/libparent/libparent-1.0.0.toml | 4 +- .../unneeded-held/my_index/index/index.toml | 2 +- .../index/li/libchild/libchild-0.1.0.toml | 4 +- .../index/li/libchild/libchild-0.2.0.toml | 4 +- .../index/li/libparent/libparent-1.0.0.toml | 4 +- .../index/ch/checkenv/checkenv-1.0.0.toml | 4 +- .../ch/checkparent/checkparent-1.0.0.toml | 4 +- .../my_index/index/index.toml | 2 +- .../crates/crate_1234/alire/crate_1234.toml | 4 +- .../linked-paths/my_index/index/index.toml | 2 +- .../my_index/index/he/hello/hello-1.0.0.toml | 4 +- .../action-test/my_index/index/index.toml | 2 +- .../index/he/hello1/hello1-0.1.0.toml | 4 +- .../index/he/hello2/hello2-0.1.0.toml | 4 +- .../selective/my_index/index/index.toml | 2 +- .../updated/index/he/hello1/hello1-0.1.0.toml | 4 +- .../updated/index/he/hello1/hello1-0.2.0.toml | 4 +- .../updated/index/he/hello2/hello2-0.1.0.toml | 4 +- .../updated/index/he/hello2/hello2-0.2.0.toml | 4 +- .../my_index/updated/index/index.toml | 2 +- .../auto-gpr-with/basic/my_index/index.toml | 2 +- .../libhello_nogprwith-1.0.0.toml | 6 +- .../gp/gpr_in_subdir/gpr_in_subdir-1.0.0.toml | 4 +- .../gpr_in_subdir/my_index/index.toml | 2 +- .../with/pin-dir/my_index/index/index.toml | 2 +- .../index/li/libhello/libhello-1.0.0.toml | 4 +- .../he/hello_world/hello_world-0.1.0.toml | 4 +- .../action-command/my_index/index/index.toml | 2 +- 146 files changed, 621 insertions(+), 312 deletions(-) create mode 100644 scripts/python/alire/__init__.py create mode 100644 scripts/python/alire/index.py create mode 100644 scripts/python/alire/utils.py create mode 100755 scripts/python/separate-origins.py rename scripts/{ => python}/split-crates.py (100%) diff --git a/scripts/python/alire/__init__.py b/scripts/python/alire/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/scripts/python/alire/index.py b/scripts/python/alire/index.py new file mode 100644 index 00000000..593f099a --- /dev/null +++ b/scripts/python/alire/index.py @@ -0,0 +1,24 @@ +import os.path +import rtoml + + +def is_index(path, semver): + # Look for an "index.toml" file that contains a matching 'version = "x.x"' + target = os.path.join(path, "index.toml") + if not os.path.isfile(target): + return False + with open(target) as file: + try: + contents = rtoml.load(file) + if "version" in contents: + version = contents["version"] + if version == semver: + return True + else: + print(f"Version mismatch: {path} version is {version}, expected {semver}") + return False + else: + print(f"Malformed index file: no version found inside {path}") + except rtoml.TomlParsingError: + print(f"Not a target: {target} failed to load as TOML") + raise diff --git a/scripts/python/alire/utils.py b/scripts/python/alire/utils.py new file mode 100644 index 00000000..cd139d69 --- /dev/null +++ b/scripts/python/alire/utils.py @@ -0,0 +1,18 @@ +def fix_manifest_order(obj): + # Not sure why rtoml is not honoring this order even for pure load/save cycles... oh well + + delayed = dict() + + # extract tables/table arrays: + for key in obj: + val = obj[key] + if isinstance(val, dict) or \ + (isinstance(val, list) and len(val) > 0 and isinstance(val[0], dict)): + delayed[key] = val + + # reinsert at last position + for key in delayed: + obj.pop(key) + obj[key] = delayed[key] + + return obj diff --git a/scripts/python/separate-origins.py b/scripts/python/separate-origins.py new file mode 100755 index 00000000..6aaa5981 --- /dev/null +++ b/scripts/python/separate-origins.py @@ -0,0 +1,79 @@ +#!/usr/bin/env python3 +# Find all crates in new index format and move origin-related fields to their own table +# +# The update is done in place and for all indexes found under the current directory. + +import glob +import os +import rtoml + +from alire import index, utils +from pathlib import Path + +FROM_VERSION = "0.1" +INTO_VERSION = {"version": "0.2"} + + +def fix_url(url): + # For good measure, replace incorrect local paths + return url.replace("file://", "file:") + + +def fix_manifest(file): + # file is the absolute path to a manifest + print(f" Patching {file}...") + try: + manifest = rtoml.load(Path(file)) + except rtoml.TomlParsingError as ex: + print(f"FAILED to patch {file}: " + str(ex)) + raise + + if "origin" not in manifest: + print(f" WARNING: manifest without origin? {file}") + return + + origin = dict() + url = fix_url(manifest.pop("origin")) + + # Move any '@commit' info to a separate key + origin["url"] = url.split('@')[0] + if '@' in url: + origin["commit"] = url.split('@')[1] + + if "origin-hashes" in manifest: + origin["hashes"] = manifest.pop("origin-hashes") + if "archive-name" in manifest: + origin["archive-name"] = manifest.pop("archive-name") + + manifest["origin"] = origin + + # Rewrite patched manifest + with open(file, "wt") as file: + rtoml.dump(utils.fix_manifest_order(manifest), file) + + +def migrate(path): + print(f"Migrating {path}...") + + # Visit all nested TOML files. We do not check for proper placement. + for file in glob.iglob(os.path.join(path, '**/*.toml'), recursive=True): + if "/index.toml" not in file and "-external.toml" not in file: + fix_manifest(file) + + # Finalize by updating the index version + with open(os.path.join(path, "index.toml"), "wt") as file: + rtoml.dump(INTO_VERSION, file) + + +def traverse(path): + if index.is_index(path, FROM_VERSION): + migrate(path) + else: + # keep looking for nested indexes + with os.scandir(path) as iterate: + for child in iterate: + if child.is_dir(): + traverse(child.path) + + +traverse(os.getcwd()) diff --git a/scripts/split-crates.py b/scripts/python/split-crates.py similarity index 100% rename from scripts/split-crates.py rename to scripts/python/split-crates.py diff --git a/src/alire/alire-features-index.adb b/src/alire/alire-features-index.adb index 1fd6c2c8..f815a0d2 100644 --- a/src/alire/alire-features-index.adb +++ b/src/alire/alire-features-index.adb @@ -388,11 +388,8 @@ package body Alire.Features.Index is Origin_Img : URL) return Hashing_Outcomes.Outcome is - Origin : Origins.Origin; - Create_Result : constant Outcome := Origins.From_String - (Origin, Origin_Img, Hashed => False); + Origin : constant Origins.Origin := Origins.From_String (Origin_Img); begin - Create_Result.Assert; -- Retrieve the given origin and compute its hash: diff --git a/src/alire/alire-index.ads b/src/alire/alire-index.ads index f9facaf2..15dd7497 100644 --- a/src/alire/alire-index.ads +++ b/src/alire/alire-index.ads @@ -35,7 +35,7 @@ package Alire.Index is and then Branch_String (Branch_String'Last) /= '-' and then (for some C of Branch_String => C = '-'); - Community_Branch : constant String := "tmp-0.1"; + Community_Branch : constant String := "tmp-0.2"; -- The branch used for the community index Version : constant Semantic_Versioning.Version := diff --git a/src/alire/alire-origins-tweaks.adb b/src/alire/alire-origins-tweaks.adb index a96e4a77..d7a61d9d 100644 --- a/src/alire/alire-origins-tweaks.adb +++ b/src/alire/alire-origins-tweaks.adb @@ -38,11 +38,10 @@ package body Alire.Origins.Tweaks is function Fix_VCS return Origin is use Ada.Directories; - use Utils; URL : constant String := This.URL; -- Doesn't include @commit begin -- Check for "xxx+file://" or return as-is: - if not Starts_With (URL, Prefix_File) then + if URI.Scheme (URL) not in URI.File_Schemes then return This; end if; diff --git a/src/alire/alire-origins.adb b/src/alire/alire-origins.adb index 707e3fda..d609e1b4 100644 --- a/src/alire/alire-origins.adb +++ b/src/alire/alire-origins.adb @@ -1,12 +1,21 @@ -with Alire.TOML_Keys; +with Alire.URI; with Alire.Utils; package body Alire.Origins is - function Ends_With (S : String; Suffix : String) return Boolean is - (S'Length >= Suffix'Length - and then S (S'Last - Suffix'Length + 1 .. S'Last) = Suffix); - -- Return whether the S string ends with the given Suffix sub-string + ---------- + -- Keys -- + ---------- + + package Keys is -- TOML keys for serialization + + Archive_Name : constant String := "archive-name"; + Commit : constant String := "commit"; + Hashes : constant String := "hashes"; + Origin : constant String := "origin"; + URL : constant String := "url"; + + end Keys; function URL_Basename (URL : Alire.URL) return String; -- Try to get a basename for the given URL. Return an empty string on @@ -57,6 +66,7 @@ package body Alire.Origins is -------------------- function Archive_Format (Name : String) return Source_Archive_Format is + use Utils; begin if Ends_With (Name, ".zip") then return Zip_Archive; @@ -109,28 +119,40 @@ package body Alire.Origins is -- From_String -- ----------------- - -- Loads a statically defined origin from its textual description. + function From_String (Image : String) return Origin is + Scheme : constant URI.Schemes := URI.Scheme (Image); + begin + case Scheme is + when URI.File_Schemes => + return New_Filesystem (URI.Local_Path (Image)); + when URI.HTTP => + return New_Source_Archive (Image); + when others => + Raise_Checked_Error ("Unsupported URL scheme: " & Image); + end case; + end From_String; + + --------------- + -- From_TOML -- + --------------- - function From_String - (This : out Origin; - From : String; - Parent : TOML_Adapters.Key_Queue := TOML_Adapters.Empty_Queue; - Hashed : Boolean := True) - return Outcome + overriding + function From_TOML (This : in out Origin; + From : TOML_Adapters.Key_Queue) + return Outcome is ---------------- -- Add_Hashes -- ---------------- - function Add_Hashes (Mandatory : Boolean) return Outcome is + function Add_Hashes (Parent : TOML_Adapters.Key_Queue) return Outcome is Val : TOML.TOML_Value; begin - if Parent.Pop (TOML_Keys.Origin_Hashes, Val) then + if Parent.Pop (Keys.Hashes, Val) then if Val.Kind /= TOML.TOML_Array then return Parent.Failure - (TOML_Keys.Origin_Hashes - & " must be an array of hash values"); + (Keys.Hashes & " must be an array of hash values"); end if; for I in 1 .. Val.Length loop @@ -150,130 +172,118 @@ package body Alire.Origins is This.Add_Hash (Hashes.Any_Hash (Hash)); end; end loop; - elsif Hashed and then Mandatory then + else return Parent.Failure - ("missing mandatory " & TOML_Keys.Origin_Hashes & " field"); + ("missing mandatory " & Keys.Hashes & " field"); end if; return Outcome_Success; end Add_Hashes; - use Utils; - Commit : constant String := Tail (From, '@'); - URL : constant String := Tail (Head (From, '@'), '+'); - Path : constant String := - From (From'First + Prefixes (Filesystem)'Length .. - From'Last); - Descr : constant String := Tail (From, ':'); + use TOML; + use all type URI.Schemes; + Archive : TOML_Value; + Table : constant TOML_Adapters.Key_Queue := + From.Descend (From.Checked_Pop (Keys.Origin, TOML_Table), + Context => Keys.Origin); + URL : constant String := + Table.Checked_Pop (Keys.URL, TOML_String).As_String; + VCS_URL : constant String := + (if Utils.Contains (URL, "file:") + then Utils.Tail (URL, ':') -- Remove file: that confuses git + else Utils.Tail (URL, '+')); -- remove prefix vcs+ + Scheme : constant URI.Schemes := URI.Scheme (URL); + Hashed : constant Boolean := Table.Unwrap.Has (Keys.Hashes); begin - -- Check easy ones first (unique prefixes): - for Kind in Prefixes'Range loop - if Prefixes (Kind) /= null and then - Utils.Starts_With (From, Prefixes (Kind).all) - then - case Kind is - when Git => - if Commit'Length /= Git_Commit'Length then - Raise_Checked_Error - ("invalid git commit id, " & - "40 digits hexadecimal expected"); - end if; - - This := New_Git (URL, Commit); - - when Hg => - if Commit'Length /= Hg_Commit'Length then - Raise_Checked_Error - ("invalid hg revision number, " & - "40 digits hexadecimal expected"); - end if; - - This := New_Hg (URL, Commit); - - when SVN => This := New_SVN (URL, Commit); - - when External => This := New_External (Descr); - - when Filesystem => - if Path = "" then - return Parent.Failure - ("empty path given in local origin"); - else - This := New_Filesystem (Path); - end if; - - when Source_Archive => - raise Program_Error with "can't happen"; - - when System => This := New_System (Descr); - end case; + case Scheme is + when External => + This := New_External (URI.Path (URL)); - if Hashed then - -- Add optional (for now) hashes: - return Add_Hashes (Mandatory => False); - else - return Outcome_Success; + when URI.File_Schemes => + if URI.Local_Path (URL) = "" then + From.Checked_Error ("empty path given in local origin"); end if; - end if; - end loop; + This := New_Filesystem (URI.Local_Path (URL)); - -- By elimination it must be a source archive (or erroneous): - if not (Starts_With (From, "http://") or else - Starts_With (From, "https://")) - then - return Parent.Failure ("unknown origin: " & From); - else - declare - Archive : TOML.TOML_Value; - begin + when URI.VCS_Schemes => null; + declare + Commit : constant String := Table.Checked_Pop + (Keys.Commit, TOML_String).As_String; + begin + case Scheme is + when Git => + if Commit'Length /= Git_Commit'Length then + Raise_Checked_Error + ("invalid git commit id, " & + "40 digits hexadecimal expected"); + end if; + This := New_Git (VCS_URL, Commit); + when Hg => + if Commit'Length /= Hg_Commit'Length then + Raise_Checked_Error + ("invalid mercurial commit id, " & + "40 digits hexadecimal expected"); + end if; + This := New_Hg (VCS_URL, Commit); + when SVN => + This := New_SVN (VCS_URL, Commit); + when others => + raise Program_Error; -- Can't happen + end case; + end; + + when HTTP => -- Optional filename checks: - if Parent.Pop (TOML_Keys.Archive_Name, Archive) then + if Table.Pop (Keys.Archive_Name, Archive) then if Archive.Kind /= TOML.TOML_String then - return Parent.Failure ("archive name must be a string"); + return Table.Failure ("archive name must be a string"); end if; end if; begin This := New_Source_Archive - (URL => From, + (URL => URL, Name => (if Archive.Is_Present then Archive.As_String else "")); exception when Unknown_Source_Archive_Name_Error => - return Parent.Failure + return Table.Failure ("unable to determine archive name from URL: " & "please specify one with '" - & TOML_Keys.Archive_Name & "'"); + & Keys.Archive_Name & "'"); end; - return Add_Hashes (Mandatory => True); - end; - end if; - end From_String; + when System => + This := New_System (URI.Path (URL)); - --------------- - -- From_TOML -- - --------------- + when Unknown => + From.Checked_Error ("unsupported scheme in URL: " & URL); + end case; - overriding - function From_TOML (This : in out Origin; - From : TOML_Adapters.Key_Queue) - return Outcome - is - Value : TOML.TOML_Value; - begin - if not From.Pop (TOML_Keys.Origin, Value) then - return From.Failure ("mandatory origin missing"); - - elsif Value.Kind = TOML.TOML_String then - -- Plain string: regular origin - return From_String (This, - Value.As_String, - From); - else - return From.Failure ("expected string description"); - end if; + -- Check hashes existence appropriateness + + case This.Kind is + when Filesystem => + if Hashed then + return Add_Hashes (Table); + end if; + -- Hashes are mandatory only for source archives. This is checked + -- on deployment, since at this moment we do not have the proper + -- absolute patch + + when Source_Archive => + return Add_Hashes (Table); -- mandatory + + when others => + if Hashed then + return Table.Failure + ("hashes cannot be provided for origins of kind " + & Utils.To_Mixed_Case (This.Kind'Img)); + end if; + end case; + + return Table.Report_Extra_Keys; end From_TOML; --------------------- @@ -321,23 +331,24 @@ package body Alire.Origins is begin case This.Kind is when Filesystem => - Table.Set (TOML_Keys.Origin, +("file://" & This.Path)); + Table.Set (Keys.URL, +("file:" & This.Path)); when VCS_Kinds => - Table.Set (TOML_Keys.Origin, +(Prefixes (This.Kind).all & - This.URL & "@" & This.Commit)); + Table.Set (Keys.URL, +(Prefixes (This.Kind).all & This.URL)); + Table.Set (Keys.Commit, +This.Commit); + when External => - Table.Set (TOML_Keys.Origin, + Table.Set (Keys.URL, +(Prefixes (This.Kind).all & (+This.Data.Description))); when Source_Archive => - Table.Set (TOML_Keys.Origin, +This.Archive_URL); + Table.Set (Keys.URL, +This.Archive_URL); if This.Archive_Name /= "" then - Table.Set (TOML_Keys.Archive_Name, +This.Archive_Name); + Table.Set (Keys.Archive_Name, +This.Archive_Name); end if; when System => - Table.Set (TOML_Keys.Origin, + Table.Set (Keys.URL, +(Prefixes (This.Kind).all & This.Package_Name)); end case; @@ -349,7 +360,7 @@ package body Alire.Origins is Hashes.Append (+String (Hash)); end loop; - Table.Set (TOML_Keys.Origin_Hashes, Hashes); + Table.Set (Keys.Hashes, Hashes); end; end if; diff --git a/src/alire/alire-origins.ads b/src/alire/alire-origins.ads index 881a46cd..c408810d 100644 --- a/src/alire/alire-origins.ads +++ b/src/alire/alire-origins.ads @@ -122,17 +122,11 @@ package Alire.Origins with Preelaborate is procedure Add_Hash (This : in out Origin; Hash : Hashes.Any_Hash); - function From_String - (This : out Origin; - From : String; - Parent : TOML_Adapters.Key_Queue := TOML_Adapters.Empty_Queue; - Hashed : Boolean := True) - return Outcome; - -- Parse a string and dispatch to the appropriate constructor. - -- Parent is an optional parent TOML table that may contain extra fields - -- (e.g., source_archive in case of an https: origin). - -- Hashed indicates if integrity hashes are expected, so this function can - -- be used to retrieve unhashed origins too (precisely for hashing). + function From_String (Image : String) return Origin with + Post => From_String'Result.Kind in Filesystem | Source_Archive; + -- Parse a string and dispatch to the appropriate constructor. This + -- function can be used to retrieve unhashed origins too (precisely + -- for hashing). overriding function From_TOML (This : in out Origin; diff --git a/src/alire/alire-releases.adb b/src/alire/alire-releases.adb index fdd2c54e..7925cfb3 100644 --- a/src/alire/alire-releases.adb +++ b/src/alire/alire-releases.adb @@ -653,7 +653,7 @@ package body Alire.Releases is use all type Alire.Properties.Labeled.Cardinalities; use all type Alire.Requisites.Tree; use TOML_Adapters; - Root : TOML.TOML_Value := R.Properties.To_TOML; + Root : constant TOML.TOML_Value := R.Properties.To_TOML; begin -- Name Root.Set (TOML_Keys.Name, +R.Name_Str); @@ -689,7 +689,7 @@ package body Alire.Releases is end loop; -- Origin - Root := TOML.Merge (Root, R.Origin.To_TOML); + Root.Set (TOML_Keys.Origin, R.Origin.To_TOML); -- Dependencies, wrapped as an array if not R.Dependencies.Is_Empty then diff --git a/src/alire/alire-toml_keys.ads b/src/alire/alire-toml_keys.ads index c1e05514..c5bfe1ed 100644 --- a/src/alire/alire-toml_keys.ads +++ b/src/alire/alire-toml_keys.ads @@ -6,7 +6,6 @@ package Alire.TOML_Keys with Preelaborate is Action_Type : constant String := "type"; Action_Command : constant String := "command"; Action_Folder : constant String := "directory"; - Archive_Name : constant String := "archive-name"; Author : constant String := "authors"; Auto_GPR_With : constant String := "auto-gpr-with"; Available : constant String := "available"; @@ -30,8 +29,6 @@ package Alire.TOML_Keys with Preelaborate is Name : constant String := "name"; Notes : constant String := "notes"; Origin : constant String := "origin"; - Origin_Hashes : constant String := "origin-hashes"; - Origin_Source : constant String := "archive-name"; OS : constant String := "os"; Path : constant String := "path"; Pinned : constant String := "pinned"; diff --git a/src/alire/alire-uri.ads b/src/alire/alire-uri.ads index 60115b79..a89c2390 100644 --- a/src/alire/alire-uri.ads +++ b/src/alire/alire-uri.ads @@ -3,7 +3,7 @@ with Alire.Errors; private with Alire.Utils; private with URI; -package Alire.URI is +package Alire.URI with Preelaborate is -- Helpers to process URLs provided by the user. Note: there's already an -- Alire.URL type which is simply a String renaming without any additional @@ -27,6 +27,9 @@ package Alire.URI is (None, -- For URLs without scheme (to be interpreted as local paths) + External, + -- external: denotes a crate detected by some external definition + File, -- A file: URI @@ -41,6 +44,9 @@ package Alire.URI is HTTP, -- Either http or https, since we don't differentiate treatment + System, + -- system:package is used to denote a native package from the platform + Unknown -- Anything else ); @@ -54,7 +60,7 @@ package Alire.URI is function Scheme (This : URL) return Schemes; -- Extract the Scheme part of a URL - function Local_Path (This : URL) return Any_Path + function Local_Path (This : URL) return String with Pre => Scheme (This) in None | File or else raise Checked_Error with Errors.Set ("Given URL does not seem to denote a path: " & This); @@ -70,6 +76,9 @@ package Alire.URI is -- TODO: fix incorrectly emitted file:// paths in Origins so at least we -- are not generating improper URIs. + function Path (This : URL) return String; + -- The path as properly defined (without the authority, if any) + private package U renames Standard.URI; @@ -80,9 +89,16 @@ private -- Local_Path -- ---------------- - function Local_Path (This : URL) return Any_Path + function Local_Path (This : URL) return String is (U.Permissive_Path (This)); + ---------- + -- Path -- + ---------- + + function Path (This : URL) return String + is (U.Extract (This, U.Path)); + ------------ -- Scheme -- ------------ @@ -90,6 +106,8 @@ private function Scheme (This : URL) return Schemes is (if U.Scheme (This) = "" then None + elsif L (U.Scheme (This)) = "external" then + External elsif L (U.Scheme (This)) = "file" then File elsif Utils.Starts_With (L (U.Scheme (This)), "git+") then @@ -102,6 +120,8 @@ private HTTP elsif L (U.Scheme (This)) = "https" then HTTP + elsif L (U.Scheme (This)) = "system" then + System else Unknown); diff --git a/src/alire/alire.ads b/src/alire/alire.ads index 9576312f..dc5e1511 100644 --- a/src/alire/alire.ads +++ b/src/alire/alire.ads @@ -99,7 +99,13 @@ package Alire with Preelaborate is -- Used for cross-platform folder names subtype Any_Path is String; - -- Base type for paths in Alire + -- Base type for paths in Alire. These paths are always platform-dependent + -- and can be used directly with filesystem functions. + + subtype Portable_Path is String with + Dynamic_Predicate => (for all Char of Portable_Path => Char /= '\'); + -- A portable path always uses forward slashes. For use in the current + -- platform, it should be adapted first. -- To clarify constants/functions declared herein: diff --git a/testsuite/fixtures/basic_index/he/hello/hello-1.0.0.toml b/testsuite/fixtures/basic_index/he/hello/hello-1.0.0.toml index d7120582..6d5271ec 100644 --- a/testsuite/fixtures/basic_index/he/hello/hello-1.0.0.toml +++ b/testsuite/fixtures/basic_index/he/hello/hello-1.0.0.toml @@ -1,9 +1,8 @@ description = "\"Hello, world!\" demonstration project" long-description = "This is an example of long description in a multi-line string.\n\nMarkdown formating `can` be used to have \"nice\" display on the website.\n" -website = "example.com" name = "hello" version = "1.0.0" -origin = "file://../../../crates/hello_1.0.0" +website = "example.com" authors = ["Bob", "Alice"] licenses = ["GPL 3.0", "MIT"] maintainers = ["alejandro@mosteo.com", "bob@example.com"] @@ -12,3 +11,6 @@ tags = ["tag1", "other-tag"] [[depends-on]] libhello = "^1.0" + +[origin] +url = "file:../../../crates/hello_1.0.0" diff --git a/testsuite/fixtures/basic_index/he/hello/hello-1.0.1.toml b/testsuite/fixtures/basic_index/he/hello/hello-1.0.1.toml index 25a0f448..cc5ccfcf 100644 --- a/testsuite/fixtures/basic_index/he/hello/hello-1.0.1.toml +++ b/testsuite/fixtures/basic_index/he/hello/hello-1.0.1.toml @@ -1,9 +1,8 @@ description = "\"Hello, world!\" demonstration project" long-description = "This is an example of long description in a multi-line string.\n\nMarkdown formating `can` be used to have \"nice\" display on the website.\n" -website = "example.com" name = "hello" version = "1.0.1" -origin = "file://../../../crates/hello_1.0.1" +website = "example.com" authors = ["Bob", "Alice"] licenses = ["GPL 3.0", "MIT"] maintainers = ["alejandro@mosteo.com", "bob@example.com"] @@ -12,3 +11,6 @@ tags = ["tag1", "other-tag"] [[depends-on]] libhello = "^1.0" + +[origin] +url = "file:../../../crates/hello_1.0.1" diff --git a/testsuite/fixtures/basic_index/index.toml b/testsuite/fixtures/basic_index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/fixtures/basic_index/index.toml +++ b/testsuite/fixtures/basic_index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/fixtures/basic_index/li/libhello/libhello-1.0.0.toml b/testsuite/fixtures/basic_index/li/libhello/libhello-1.0.0.toml index c7430101..0025babe 100644 --- a/testsuite/fixtures/basic_index/li/libhello/libhello-1.0.0.toml +++ b/testsuite/fixtures/basic_index/li/libhello/libhello-1.0.0.toml @@ -1,7 +1,6 @@ description = "\"Hello, world!\" demonstration project support library" name = "libhello" version = "1.0.0" -origin = "file://../../../crates/libhello_1.0.0" licenses = [] maintainers = ["alejandro@mosteo.com"] maintainers-logins = ["mylogin"] @@ -11,3 +10,6 @@ TEST_GPR_EXTERNAL = ["gpr_ext_A", "gpr_ext_B", "gpr_ext_C"] [gpr-set-externals] TEST_GPR_EXTERNAL = "gpr_ext_B" + +[origin] +url = "file:../../../crates/libhello_1.0.0" diff --git a/testsuite/fixtures/cases_index/he/hello/hello-1.0.1.toml b/testsuite/fixtures/cases_index/he/hello/hello-1.0.1.toml index b5cb480f..8192f77a 100644 --- a/testsuite/fixtures/cases_index/he/hello/hello-1.0.1.toml +++ b/testsuite/fixtures/cases_index/he/hello/hello-1.0.1.toml @@ -1,7 +1,6 @@ description = "\"Hello, world!\" demonstration project" name = "hello" version = "1.0.1" -origin = "file://../../../crates/hello_1.0.1" licenses = [] maintainers = ["alejandro@mosteo.com"] maintainers-logins = ["mylogin"] @@ -22,6 +21,12 @@ command = ["make"] [[actions."case(os)".linux]] type = "post-compile" command = ["hello"] +[available."case(os)"] +"..." = false +linux = true +[available."case(os)".windows."case(word_size)"] +"..." = false +bits_64 = true [executables."case(word-size)"] "..." = "bye" bits-32 = "hello32" @@ -40,16 +45,10 @@ OS = "macos" [gpr-set-externals."case(os)".windows] OS = "windows" - -[available."case(os)"] -"..." = false -linux = true - -[available."case(os)".windows."case(word_size)"] -"..." = false -bits_64 = true - [project-files."case(word-size)"] "..." = ["bye.gpr"] bits-32 = ["hello.gpr", "hello32.gpr"] bits-64 = ["hello.gpr"] + +[origin] +url = "file:../../../crates/hello_1.0.1" diff --git a/testsuite/fixtures/cases_index/index.toml b/testsuite/fixtures/cases_index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/fixtures/cases_index/index.toml +++ b/testsuite/fixtures/cases_index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/fixtures/cases_index/li/libhello/libhello-1.0.0-linuxonly.toml b/testsuite/fixtures/cases_index/li/libhello/libhello-1.0.0-linuxonly.toml index a555aed1..7ce33e42 100644 --- a/testsuite/fixtures/cases_index/li/libhello/libhello-1.0.0-linuxonly.toml +++ b/testsuite/fixtures/cases_index/li/libhello/libhello-1.0.0-linuxonly.toml @@ -1,7 +1,6 @@ description = "\"Hello, world!\" demonstration project support library" name = "libhello" version = "1.0.0-linuxonly" -origin = "file://../../../crates/libhello_1.0.0" licenses = [] maintainers = ["alejandro@mosteo.com"] maintainers-logins = ["mylogin"] @@ -11,3 +10,6 @@ linux = true [available."case(os)".windows."case(word_size)"] "..." = false bits_64 = true + +[origin] +url = "file:../../../crates/libhello_1.0.0" diff --git a/testsuite/fixtures/cases_index/li/libhello/libhello-1.0.0-unavail.toml b/testsuite/fixtures/cases_index/li/libhello/libhello-1.0.0-unavail.toml index 770bbc20..db708be5 100644 --- a/testsuite/fixtures/cases_index/li/libhello/libhello-1.0.0-unavail.toml +++ b/testsuite/fixtures/cases_index/li/libhello/libhello-1.0.0-unavail.toml @@ -1,8 +1,10 @@ +available = false description = "\"Hello, world!\" demonstration project support library" name = "libhello" version = "1.0.0-unavail" -available = false -origin = "file://../../../crates/libhello_1.0.0" licenses = [] maintainers = ["alejandro@mosteo.com"] maintainers-logins = ["mylogin"] + +[origin] +url = "file:../../../crates/libhello_1.0.0" diff --git a/testsuite/fixtures/cases_index/li/libhello/libhello-1.0.0.toml b/testsuite/fixtures/cases_index/li/libhello/libhello-1.0.0.toml index f8c16939..b9fe5c6f 100644 --- a/testsuite/fixtures/cases_index/li/libhello/libhello-1.0.0.toml +++ b/testsuite/fixtures/cases_index/li/libhello/libhello-1.0.0.toml @@ -1,7 +1,9 @@ description = "\"Hello, world!\" demonstration project support library" name = "libhello" version = "1.0.0" -origin = "file://../../../crates/libhello_1.0.0" licenses = [] maintainers = ["alejandro@mosteo.com"] maintainers-logins = ["mylogin"] + +[origin] +url = "file:../../../crates/libhello_1.0.0" diff --git a/testsuite/fixtures/checked_index/index.toml b/testsuite/fixtures/checked_index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/fixtures/checked_index/index.toml +++ b/testsuite/fixtures/checked_index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/fixtures/checked_index/li/libhello/libhello-1.0.0-git.toml b/testsuite/fixtures/checked_index/li/libhello/libhello-1.0.0-git.toml index fc48ea62..73a1cd00 100644 --- a/testsuite/fixtures/checked_index/li/libhello/libhello-1.0.0-git.toml +++ b/testsuite/fixtures/checked_index/li/libhello/libhello-1.0.0-git.toml @@ -1,8 +1,12 @@ description = "\"Hello, world!\" demonstration project support library" name = "libhello" version = "1.0.0-git" -origin = "git+file://../../../crates/libhello_git@ce78e7706c9d3f97605df48d8befca5407f8d328" licenses = [] maintainers = ["alejandro@mosteo.com"] maintainers-logins = ["mylogin"] -origin-hashes = ["sha512:f9d5a85fec4db46d5a2859057658c01ee4fe1ab412dab80bcbb426102b5dcb147ab7e0744e781d045e5d2b50ec3cb4f0990c8ce66e52cda37c88833d0f814500"] + +[origin] +url = "git+file:../../../crates/libhello_git" +commit = "ce78e7706c9d3f97605df48d8befca5407f8d328" +# hashes = ["sha512:f9d5a85fec4db46d5a2859057658c01ee4fe1ab412dab80bcbb426102b5dcb147ab7e0744e781d045e5d2b50ec3cb4f0990c8ce66e52cda37c88833d0f814500"] +# Hashes no longer accepted for git origins diff --git a/testsuite/fixtures/checked_index/li/libhello/libhello-1.0.0-gitbad.toml b/testsuite/fixtures/checked_index/li/libhello/libhello-1.0.0-gitbad.toml index cfa56869..2447b047 100644 --- a/testsuite/fixtures/checked_index/li/libhello/libhello-1.0.0-gitbad.toml +++ b/testsuite/fixtures/checked_index/li/libhello/libhello-1.0.0-gitbad.toml @@ -1,8 +1,12 @@ description = "\"Hello, world!\" demonstration project support library" name = "libhello" version = "1.0.0-gitbad" -origin = "git+file://../../../crates/libhello_git@ce78e7706c9d3f97605df48d8befca5407f8d328" licenses = [] maintainers = ["alejandro@mosteo.com"] maintainers-logins = ["mylogin"] -origin-hashes = ["sha512:deadbeef"] # Bad hash on purpose + +[origin] +url = "git+file:../../../crates/libhello_git" +commit = "ce78e7706c9d3f97605df48d8befca5407f8d328" +# hashes = ["sha512:deadbeef"] # Bad hash on purpose +# Hashes no longer accepted for vcs remotes diff --git a/testsuite/fixtures/checked_index/li/libhello/libhello-1.0.0-tarball.toml b/testsuite/fixtures/checked_index/li/libhello/libhello-1.0.0-tarball.toml index a90c3172..f2731887 100644 --- a/testsuite/fixtures/checked_index/li/libhello/libhello-1.0.0-tarball.toml +++ b/testsuite/fixtures/checked_index/li/libhello/libhello-1.0.0-tarball.toml @@ -1,8 +1,10 @@ description = "\"Hello, world!\" demonstration project support library" name = "libhello" version = "1.0.0-tarball" -origin = "file://../../../crates/libhello_1.0.0.tgz" licenses = [] maintainers = ["alejandro@mosteo.com"] maintainers-logins = ["mylogin"] -origin-hashes = ["sha512:99fa3a55540d0655c87605b54af732f76a8a363015f183b06e98aa91e54c0e69397872718c5c16f436dd6de0fba506dc50c66d34a0e5c61fb63cb01fa22f35ac"] + +[origin] +url = "file:../../../crates/libhello_1.0.0.tgz" +hashes = ["sha512:99fa3a55540d0655c87605b54af732f76a8a363015f183b06e98aa91e54c0e69397872718c5c16f436dd6de0fba506dc50c66d34a0e5c61fb63cb01fa22f35ac"] diff --git a/testsuite/fixtures/git_index/index.toml b/testsuite/fixtures/git_index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/fixtures/git_index/index.toml +++ b/testsuite/fixtures/git_index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/fixtures/git_index/li/libfoo/libfoo-1.0.0-git.toml b/testsuite/fixtures/git_index/li/libfoo/libfoo-1.0.0-git.toml index 473d3865..b8e335ec 100644 --- a/testsuite/fixtures/git_index/li/libfoo/libfoo-1.0.0-git.toml +++ b/testsuite/fixtures/git_index/li/libfoo/libfoo-1.0.0-git.toml @@ -1,7 +1,10 @@ description = "Custom repo to check proper retrieval of local git crates" name = "libfoo" version = "1.0.0-git" -origin = "git+file://../../../crates/libfoo_git@9ddda32bbbf117dcf2314cb8c23f127c735e5863" licenses = ["Public Domain"] maintainers = ["some@one.com"] maintainers-logins = ["mylogin"] + +[origin] +url = "git+file:../../../crates/libfoo_git" +commit = "9ddda32bbbf117dcf2314cb8c23f127c735e5863" diff --git a/testsuite/fixtures/native_index/index.toml b/testsuite/fixtures/native_index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/fixtures/native_index/index.toml +++ b/testsuite/fixtures/native_index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/fixtures/native_index/li/libhello/libhello-0.9.0-test-unav-native.toml b/testsuite/fixtures/native_index/li/libhello/libhello-0.9.0-test-unav-native.toml index a6d03706..3b456bc9 100644 --- a/testsuite/fixtures/native_index/li/libhello/libhello-0.9.0-test-unav-native.toml +++ b/testsuite/fixtures/native_index/li/libhello/libhello-0.9.0-test-unav-native.toml @@ -1,10 +1,12 @@ description = "\"Hello, world!\" demonstration project support library" name = "libhello" version = "0.9.0-test-unav-native" -origin = "file://../../../crates/libhello_1.0.0" licenses = [] maintainers = ["alejandro@mosteo.com"] maintainers-logins = ["mylogin"] [[depends-on]] make = "*" + +[origin] +url = "file:../../../crates/libhello_1.0.0" diff --git a/testsuite/fixtures/native_index/li/libhello/libhello-1.0.0.toml b/testsuite/fixtures/native_index/li/libhello/libhello-1.0.0.toml index f8c16939..b9fe5c6f 100644 --- a/testsuite/fixtures/native_index/li/libhello/libhello-1.0.0.toml +++ b/testsuite/fixtures/native_index/li/libhello/libhello-1.0.0.toml @@ -1,7 +1,9 @@ description = "\"Hello, world!\" demonstration project support library" name = "libhello" version = "1.0.0" -origin = "file://../../../crates/libhello_1.0.0" licenses = [] maintainers = ["alejandro@mosteo.com"] maintainers-logins = ["mylogin"] + +[origin] +url = "file:../../../crates/libhello_1.0.0" diff --git a/testsuite/fixtures/run_index/index.toml b/testsuite/fixtures/run_index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/fixtures/run_index/index.toml +++ b/testsuite/fixtures/run_index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/fixtures/run_index/no/noop/noop-1.0.0-default.toml b/testsuite/fixtures/run_index/no/noop/noop-1.0.0-default.toml index 37c569b4..cdda0eba 100644 --- a/testsuite/fixtures/run_index/no/noop/noop-1.0.0-default.toml +++ b/testsuite/fixtures/run_index/no/noop/noop-1.0.0-default.toml @@ -1,8 +1,10 @@ description = "Do nothing" name = "noop" version = "1.0.0-default" -origin = "file://../../../crates/noop_1.0-default.tgz" licenses = [] maintainers = ["mr@lazy.com"] maintainers-logins = ["mrlazy"] -origin-hashes = ["sha512:de676fbda9f16ba98fe1adc80e20dbd9b98a86352267825b55f1d719570adc0f92f1be2e96fd3df06aac4f6b5fee8686695e315be370cabe482edefc5a0570c5"] + +[origin] +url = "file:../../../crates/noop_1.0-default.tgz" +hashes = ["sha512:de676fbda9f16ba98fe1adc80e20dbd9b98a86352267825b55f1d719570adc0f92f1be2e96fd3df06aac4f6b5fee8686695e315be370cabe482edefc5a0570c5"] diff --git a/testsuite/fixtures/run_index/no/noop/noop-1.0.0-multi.toml b/testsuite/fixtures/run_index/no/noop/noop-1.0.0-multi.toml index 6dc591cf..046487ae 100644 --- a/testsuite/fixtures/run_index/no/noop/noop-1.0.0-multi.toml +++ b/testsuite/fixtures/run_index/no/noop/noop-1.0.0-multi.toml @@ -1,9 +1,11 @@ description = "Do nothing" name = "noop" version = "1.0.0-multi" -origin = "file://../../../crates/noop_1.0-multi.tgz" +executables = ["noop", "noop2"] licenses = [] maintainers = ["mr@lazy.com"] maintainers-logins = ["mrlazy"] -executables = ["noop", "noop2"] -origin-hashes = ["sha512:ce2fc754c166ead10e1fcc7bbd483cff0f95bf527ee78b443510f692b5f1cb95b21b48d65ee1dc6555dcc6bfd04e607e3a7cf510ac056cc209308aa4ec0be7cc"] + +[origin] +url = "file:../../../crates/noop_1.0-multi.tgz" +hashes = ["sha512:ce2fc754c166ead10e1fcc7bbd483cff0f95bf527ee78b443510f692b5f1cb95b21b48d65ee1dc6555dcc6bfd04e607e3a7cf510ac056cc209308aa4ec0be7cc"] diff --git a/testsuite/fixtures/run_index/no/noop/noop-1.0.0-nondef.toml b/testsuite/fixtures/run_index/no/noop/noop-1.0.0-nondef.toml index f83d6986..d8602181 100644 --- a/testsuite/fixtures/run_index/no/noop/noop-1.0.0-nondef.toml +++ b/testsuite/fixtures/run_index/no/noop/noop-1.0.0-nondef.toml @@ -1,9 +1,11 @@ description = "Do nothing" name = "noop" version = "1.0.0-nondef" -origin = "file://../../../crates/noop_1.0-nondef.tgz" +executables = ["noop2"] licenses = [] maintainers = ["mr@lazy.com"] maintainers-logins = ["mrlazy"] -executables = ["noop2"] -origin-hashes = ["sha512:a5807a3f7ea5bb9bc99f37e0ff23e13526fc6c928c7d90a75c0aa6f3ba9cc964978beedd4d5f890b8c82d969ec159315b4bb66dba18e1c559b2fa0bd71c66f2b"] + +[origin] +url = "file:../../../crates/noop_1.0-nondef.tgz" +hashes = ["sha512:a5807a3f7ea5bb9bc99f37e0ff23e13526fc6c928c7d90a75c0aa6f3ba9cc964978beedd4d5f890b8c82d969ec159315b4bb66dba18e1c559b2fa0bd71c66f2b"] diff --git a/testsuite/fixtures/solver_index/he/hello/hello-1.0.0.toml b/testsuite/fixtures/solver_index/he/hello/hello-1.0.0.toml index 0be56e94..29a2a8ac 100644 --- a/testsuite/fixtures/solver_index/he/hello/hello-1.0.0.toml +++ b/testsuite/fixtures/solver_index/he/hello/hello-1.0.0.toml @@ -1,8 +1,7 @@ description = "\"Hello, world!\" demonstration project" -website = "example.com" name = "hello" version = "1.0.0" -origin = "file://." +website = "example.com" authors = ["Bob", "Alice"] licenses = ["GPL 3.0", "MIT"] maintainers = ["bob@example.com"] @@ -10,3 +9,6 @@ maintainers-logins = ["mylogin"] [[depends-on]] libhello = "^1.0" + +[origin] +url = "file:." diff --git a/testsuite/fixtures/solver_index/he/hello/hello-1.0.1.toml b/testsuite/fixtures/solver_index/he/hello/hello-1.0.1.toml index 2979abbb..8760660e 100644 --- a/testsuite/fixtures/solver_index/he/hello/hello-1.0.1.toml +++ b/testsuite/fixtures/solver_index/he/hello/hello-1.0.1.toml @@ -1,8 +1,7 @@ description = "\"Hello, world!\" demonstration project" -website = "example.com" name = "hello" version = "1.0.1" -origin = "file://." +website = "example.com" authors = ["Bob", "Alice"] licenses = ["GPL 3.0", "MIT"] maintainers = ["bob@example.com"] @@ -11,3 +10,6 @@ maintainers-logins = ["mylogin"] # With plain dependencies [[depends-on]] libhello = "^1.0" + +[origin] +url = "file:." diff --git a/testsuite/fixtures/solver_index/he/hello/hello-2.0.0.toml b/testsuite/fixtures/solver_index/he/hello/hello-2.0.0.toml index d576a7c8..51009898 100644 --- a/testsuite/fixtures/solver_index/he/hello/hello-2.0.0.toml +++ b/testsuite/fixtures/solver_index/he/hello/hello-2.0.0.toml @@ -1,8 +1,7 @@ description = "\"Hello, world!\" demonstration project" -website = "example.com" name = "hello" version = "2.0.0" -origin = "file://." +website = "example.com" authors = ["Bob", "Alice"] licenses = ["GPL 3.0", "MIT"] maintainers = ["bob@example.com"] @@ -12,3 +11,6 @@ maintainers-logins = ["mylogin"] [[depends-on]] libhello = "^2.0" make = "*" + +[origin] +url = "file:." diff --git a/testsuite/fixtures/solver_index/he/hello/hello-3.0.0.toml b/testsuite/fixtures/solver_index/he/hello/hello-3.0.0.toml index 0aa29431..05e9992d 100644 --- a/testsuite/fixtures/solver_index/he/hello/hello-3.0.0.toml +++ b/testsuite/fixtures/solver_index/he/hello/hello-3.0.0.toml @@ -1,8 +1,7 @@ description = "\"Hello, world!\" demonstration project" -website = "example.com" name = "hello" version = "3.0.0" -origin = "file://." +website = "example.com" authors = ["Bob", "Alice"] licenses = ["GPL 3.0", "MIT"] maintainers = ["bob@example.com"] @@ -11,3 +10,6 @@ maintainers-logins = ["mylogin"] # With missing dependencies [[depends-on]] libhello = "^3.0" + +[origin] +url = "file:." diff --git a/testsuite/fixtures/solver_index/he/hello/hello-4.0.0.toml b/testsuite/fixtures/solver_index/he/hello/hello-4.0.0.toml index 0b4b77e5..a325d1db 100644 --- a/testsuite/fixtures/solver_index/he/hello/hello-4.0.0.toml +++ b/testsuite/fixtures/solver_index/he/hello/hello-4.0.0.toml @@ -1,8 +1,7 @@ description = "\"Hello, world!\" demonstration project" -website = "example.com" name = "hello" version = "4.0.0" -origin = "file://." +website = "example.com" authors = ["Bob", "Alice"] licenses = ["GPL 3.0", "MIT"] maintainers = ["bob@example.com"] @@ -12,3 +11,6 @@ maintainers-logins = ["mylogin"] [[depends-on]] libhello = "^4.0" make = "*" + +[origin] +url = "file:." diff --git a/testsuite/fixtures/solver_index/index.toml b/testsuite/fixtures/solver_index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/fixtures/solver_index/index.toml +++ b/testsuite/fixtures/solver_index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/fixtures/solver_index/li/libhello/libhello-1.0.0.toml b/testsuite/fixtures/solver_index/li/libhello/libhello-1.0.0.toml index d7a2c23e..25e99563 100644 --- a/testsuite/fixtures/solver_index/li/libhello/libhello-1.0.0.toml +++ b/testsuite/fixtures/solver_index/li/libhello/libhello-1.0.0.toml @@ -1,7 +1,9 @@ description = "\"Hello, world!\" demonstration project support library" name = "libhello" version = "1.0.0" -origin = "file://." licenses = [] maintainers = ["john@doe.com"] maintainers-logins = ["mylogin"] + +[origin] +url = "file:." diff --git a/testsuite/fixtures/solver_index/li/libhello/libhello-1.0.1.toml b/testsuite/fixtures/solver_index/li/libhello/libhello-1.0.1.toml index ecc5b315..5f0c1798 100644 --- a/testsuite/fixtures/solver_index/li/libhello/libhello-1.0.1.toml +++ b/testsuite/fixtures/solver_index/li/libhello/libhello-1.0.1.toml @@ -1,7 +1,9 @@ description = "\"Hello, world!\" demonstration project support library" name = "libhello" version = "1.0.1" -origin = "file://." licenses = [] maintainers = ["john@doe.com"] maintainers-logins = ["mylogin"] + +[origin] +url = "file:." diff --git a/testsuite/fixtures/solver_index/li/libhello/libhello-1.1.0.toml b/testsuite/fixtures/solver_index/li/libhello/libhello-1.1.0.toml index cc447a17..4cd62ab8 100644 --- a/testsuite/fixtures/solver_index/li/libhello/libhello-1.1.0.toml +++ b/testsuite/fixtures/solver_index/li/libhello/libhello-1.1.0.toml @@ -1,7 +1,9 @@ description = "\"Hello, world!\" demonstration project support library" name = "libhello" version = "1.1.0" -origin = "file://." licenses = [] maintainers = ["john@doe.com"] maintainers-logins = ["mylogin"] + +[origin] +url = "file:." diff --git a/testsuite/fixtures/solver_index/li/libhello/libhello-2.0.0.toml b/testsuite/fixtures/solver_index/li/libhello/libhello-2.0.0.toml index addc0a5b..0cd81575 100644 --- a/testsuite/fixtures/solver_index/li/libhello/libhello-2.0.0.toml +++ b/testsuite/fixtures/solver_index/li/libhello/libhello-2.0.0.toml @@ -1,7 +1,9 @@ description = "\"Hello, world!\" demonstration project support library" name = "libhello" version = "2.0.0" -origin = "file://." licenses = [] maintainers = ["john@doe.com"] maintainers-logins = ["mylogin"] + +[origin] +url = "file:." diff --git a/testsuite/fixtures/solver_index/su/superhello/superhello-1.0.0.toml b/testsuite/fixtures/solver_index/su/superhello/superhello-1.0.0.toml index 96b0dc44..17a46523 100644 --- a/testsuite/fixtures/solver_index/su/superhello/superhello-1.0.0.toml +++ b/testsuite/fixtures/solver_index/su/superhello/superhello-1.0.0.toml @@ -1,8 +1,7 @@ description = "A better hello" -website = "example.com" name = "superhello" version = "1.0.0" -origin = "file://." +website = "example.com" authors = ["Bob", "Alice"] licenses = ["GPL 3.0", "MIT"] maintainers = ["bob@example.com"] @@ -10,3 +9,6 @@ maintainers-logins = ["mylogin"] [[depends-on]] libhello = "~1.0" + +[origin] +url = "file:." diff --git a/testsuite/skels/local-index/my_index/index/cr/crate/crate-1.0.0.toml b/testsuite/skels/local-index/my_index/index/cr/crate/crate-1.0.0.toml index 51d9e942..97fb716e 100644 --- a/testsuite/skels/local-index/my_index/index/cr/crate/crate-1.0.0.toml +++ b/testsuite/skels/local-index/my_index/index/cr/crate/crate-1.0.0.toml @@ -1,7 +1,9 @@ description = "Sample crate" name = "crate" version = "1.0.0" -origin = "file://../../../crates/crate" licenses = [] maintainers = ["any@bo.dy"] maintainers-logins = ["someone"] + +[origin] +url = "file:../../../crates/crate" diff --git a/testsuite/skels/local-index/my_index/index/index.toml b/testsuite/skels/local-index/my_index/index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/skels/local-index/my_index/index/index.toml +++ b/testsuite/skels/local-index/my_index/index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/get/build/my_index/index/ba/bad/bad-1.0.0.toml b/testsuite/tests/get/build/my_index/index/ba/bad/bad-1.0.0.toml index 03666375..044d5d98 100644 --- a/testsuite/tests/get/build/my_index/index/ba/bad/bad-1.0.0.toml +++ b/testsuite/tests/get/build/my_index/index/ba/bad/bad-1.0.0.toml @@ -1,7 +1,9 @@ description = "Bad crate" name = "bad" version = "1.0.0" -origin = "file://./../../../crates/bad" licenses = [] maintainers = ["jane@doe.com"] maintainers-logins = ["mylogin"] + +[origin] +url = "file:./../../../crates/bad" diff --git a/testsuite/tests/get/build/my_index/index/go/good/good-1.0.0.toml b/testsuite/tests/get/build/my_index/index/go/good/good-1.0.0.toml index 0d6418f3..be36af34 100644 --- a/testsuite/tests/get/build/my_index/index/go/good/good-1.0.0.toml +++ b/testsuite/tests/get/build/my_index/index/go/good/good-1.0.0.toml @@ -1,7 +1,9 @@ description = "Good crate" name = "good" version = "1.0.0" -origin = "file://./../../../crates/good" licenses = [] maintainers = ["john@doe.com"] maintainers-logins = ["mylogin"] + +[origin] +url = "file:./../../../crates/good" diff --git a/testsuite/tests/get/build/my_index/index/index.toml b/testsuite/tests/get/build/my_index/index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/get/build/my_index/index/index.toml +++ b/testsuite/tests/get/build/my_index/index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/get/external-tool-dependency/my_index/index.toml b/testsuite/tests/get/external-tool-dependency/my_index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/get/external-tool-dependency/my_index/index.toml +++ b/testsuite/tests/get/external-tool-dependency/my_index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/get/external-tool-dependency/my_index/ma/main/main-1.0.0.toml b/testsuite/tests/get/external-tool-dependency/my_index/ma/main/main-1.0.0.toml index 24919e03..3f7549bb 100644 --- a/testsuite/tests/get/external-tool-dependency/my_index/ma/main/main-1.0.0.toml +++ b/testsuite/tests/get/external-tool-dependency/my_index/ma/main/main-1.0.0.toml @@ -1,11 +1,13 @@ description = "Main program" name = "main" version = "1.0.0" -origin = "file://./../../../crates/noop_1.0-default.tgz" licenses = [] maintainers = ["alejandro@mosteo.com"] maintainers-logins = ["mylogin"] -origin-hashes = ["sha512:de676fbda9f16ba98fe1adc80e20dbd9b98a86352267825b55f1d719570adc0f92f1be2e96fd3df06aac4f6b5fee8686695e315be370cabe482edefc5a0570c5"] [[depends-on]] make = "*" + +[origin] +url = "file:./../../../crates/noop_1.0-default.tgz" +hashes = ["sha512:de676fbda9f16ba98fe1adc80e20dbd9b98a86352267825b55f1d719570adc0f92f1be2e96fd3df06aac4f6b5fee8686695e315be370cabe482edefc5a0570c5"] diff --git a/testsuite/tests/get/indirect-link/my_index/index/index.toml b/testsuite/tests/get/indirect-link/my_index/index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/get/indirect-link/my_index/index/index.toml +++ b/testsuite/tests/get/indirect-link/my_index/index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/get/indirect-link/my_index/index/ti/tier1/tier1-1.0.0.toml b/testsuite/tests/get/indirect-link/my_index/index/ti/tier1/tier1-1.0.0.toml index 6d22199a..f09d3f14 100644 --- a/testsuite/tests/get/indirect-link/my_index/index/ti/tier1/tier1-1.0.0.toml +++ b/testsuite/tests/get/indirect-link/my_index/index/ti/tier1/tier1-1.0.0.toml @@ -1,10 +1,12 @@ description = "top-level crate" name = "tier1" version = "1.0.0" -origin = "file://." licenses = [] maintainers = ["john@doe.com"] maintainers-logins = ["mylogin"] [[depends-on]] tier2 = "*" + +[origin] +url = "file:." diff --git a/testsuite/tests/get/indirect-link/my_index/index/ti/tier2/tier2-1.0.0.toml b/testsuite/tests/get/indirect-link/my_index/index/ti/tier2/tier2-1.0.0.toml index f43b582a..dddecfa5 100644 --- a/testsuite/tests/get/indirect-link/my_index/index/ti/tier2/tier2-1.0.0.toml +++ b/testsuite/tests/get/indirect-link/my_index/index/ti/tier2/tier2-1.0.0.toml @@ -1,10 +1,12 @@ description = "2nd-level crate" name = "tier2" version = "1.0.0" -origin = "file://." licenses = [] maintainers = ["john@doe.com"] maintainers-logins = ["mylogin"] [[depends-on]] tier3 = "*" + +[origin] +url = "file:." diff --git a/testsuite/tests/get/indirect-link/my_index/index/ti/tier3/tier3-1.0.0.toml b/testsuite/tests/get/indirect-link/my_index/index/ti/tier3/tier3-1.0.0.toml index b839b8e6..1b92abbd 100644 --- a/testsuite/tests/get/indirect-link/my_index/index/ti/tier3/tier3-1.0.0.toml +++ b/testsuite/tests/get/indirect-link/my_index/index/ti/tier3/tier3-1.0.0.toml @@ -1,10 +1,12 @@ description = "2nd-level crate" name = "tier3" version = "1.0.0" -origin = "file://." licenses = [] maintainers = ["john@doe.com"] maintainers-logins = ["mylogin"] [[depends-on]] tier3 = "*" + +[origin] +url = "file:." diff --git a/testsuite/tests/index/bad-action-command/my_index/index/he/hello_world/hello_world-0.1.0.toml b/testsuite/tests/index/bad-action-command/my_index/index/he/hello_world/hello_world-0.1.0.toml index 97632ece..1b7810f2 100644 --- a/testsuite/tests/index/bad-action-command/my_index/index/he/hello_world/hello_world-0.1.0.toml +++ b/testsuite/tests/index/bad-action-command/my_index/index/he/hello_world/hello_world-0.1.0.toml @@ -1,10 +1,12 @@ description = "\"Hello, world!\" demonstration project" name = "hello_world" version = "0.1.0" -origin = "file://." licenses = [] maintainers = ["example@example.com"] maintainers-logins = ["mylogin"] [[actions."case(os)".linux]] command = "should be an array of strings" type = "post-fetch" + +[origin] +url = "file:." diff --git a/testsuite/tests/index/bad-action-command/my_index/index/index.toml b/testsuite/tests/index/bad-action-command/my_index/index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/index/bad-action-command/my_index/index/index.toml +++ b/testsuite/tests/index/bad-action-command/my_index/index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/index/bad-index-metadata/my_index/index/index.toml b/testsuite/tests/index/bad-index-metadata/my_index/index/index.toml index e524a208..f50d2d00 100644 --- a/testsuite/tests/index/bad-index-metadata/my_index/index/index.toml +++ b/testsuite/tests/index/bad-index-metadata/my_index/index/index.toml @@ -1,2 +1,2 @@ -version = "0.1" +version = "0.2" badkey = "sneaking around" diff --git a/testsuite/tests/index/bad-license/my_index/index/he/hello_world/hello_world-0.1.0.toml b/testsuite/tests/index/bad-license/my_index/index/he/hello_world/hello_world-0.1.0.toml index e8495989..dad3d715 100644 --- a/testsuite/tests/index/bad-license/my_index/index/he/hello_world/hello_world-0.1.0.toml +++ b/testsuite/tests/index/bad-license/my_index/index/he/hello_world/hello_world-0.1.0.toml @@ -1,7 +1,9 @@ description = "\"Hello, world!\" demonstration project" name = "hello_world" version = "0.1.0" -origin = "file://." licenses = ["Invalid license ID"] maintainers = ["Mr. User "] maintainers-logins = ["user"] + +[origin] +url = "file:." diff --git a/testsuite/tests/index/bad-license/my_index/index/index.toml b/testsuite/tests/index/bad-license/my_index/index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/index/bad-license/my_index/index/index.toml +++ b/testsuite/tests/index/bad-license/my_index/index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/index/bad-tag/my_index/index/he/hello_world/hello_world-0.1.0.toml b/testsuite/tests/index/bad-tag/my_index/index/he/hello_world/hello_world-0.1.0.toml index 9b0d1836..c19d9941 100644 --- a/testsuite/tests/index/bad-tag/my_index/index/he/hello_world/hello_world-0.1.0.toml +++ b/testsuite/tests/index/bad-tag/my_index/index/he/hello_world/hello_world-0.1.0.toml @@ -1,8 +1,10 @@ description = "\"Hello, world!\" demonstration project" name = "hello_world" version = "0.1.0" -origin = "file://." licenses = [] maintainers = ["example@example.com"] maintainers-logins = ["mylogin"] tags = ["invalid_tag"] + +[origin] +url = "file:." diff --git a/testsuite/tests/index/bad-tag/my_index/index/index.toml b/testsuite/tests/index/bad-tag/my_index/index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/index/bad-tag/my_index/index/index.toml +++ b/testsuite/tests/index/bad-tag/my_index/index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/index/empty-tag/my_index/index/he/hello_world/hello_world-0.1.0.toml b/testsuite/tests/index/empty-tag/my_index/index/he/hello_world/hello_world-0.1.0.toml index 82b106d4..731ed954 100644 --- a/testsuite/tests/index/empty-tag/my_index/index/he/hello_world/hello_world-0.1.0.toml +++ b/testsuite/tests/index/empty-tag/my_index/index/he/hello_world/hello_world-0.1.0.toml @@ -1,8 +1,10 @@ description = "\"Hello, world!\" demonstration project" name = "hello_world" version = "0.1.0" -origin = "file://." licenses = [] maintainers = ["example@example.com"] maintainers-logins = ["mylogin"] tags = [""] + +[origin] +url = "file:." diff --git a/testsuite/tests/index/empty-tag/my_index/index/index.toml b/testsuite/tests/index/empty-tag/my_index/index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/index/empty-tag/my_index/index/index.toml +++ b/testsuite/tests/index/empty-tag/my_index/index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/index/environment/my_index/index/he/hello/hello-1.0.0.toml b/testsuite/tests/index/environment/my_index/index/he/hello/hello-1.0.0.toml index aa1a2bb3..05e68223 100644 --- a/testsuite/tests/index/environment/my_index/index/he/hello/hello-1.0.0.toml +++ b/testsuite/tests/index/environment/my_index/index/he/hello/hello-1.0.0.toml @@ -1,7 +1,6 @@ description = "\"Hello, world!\" demonstration project" name = "hello" version = "1.0.0" -origin = "file://." licenses = [] maintainers = ["example@example.com"] maintainers-logins = ["mylogin"] @@ -33,3 +32,6 @@ set = "abc\\${_ALIRE_TEST_}abc" set = "${_ALIRE_TEST_}${_ALIRE_TEST_}${_ALIRE_TEST_}" [environment."case(os)"."...".CONDVAR] set = "uvw" + +[origin] +url = "file:." diff --git a/testsuite/tests/index/environment/my_index/index/index.toml b/testsuite/tests/index/environment/my_index/index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/index/environment/my_index/index/index.toml +++ b/testsuite/tests/index/environment/my_index/index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/index/external-available/my_index/index.toml b/testsuite/tests/index/external-available/my_index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/index/external-available/my_index/index.toml +++ b/testsuite/tests/index/external-available/my_index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/index/external-from-output/my_index/index/index.toml b/testsuite/tests/index/external-from-output/my_index/index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/index/external-from-output/my_index/index/index.toml +++ b/testsuite/tests/index/external-from-output/my_index/index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/index/external-hint/my_index/cr/crate_master/crate_master-1.0.0.toml b/testsuite/tests/index/external-hint/my_index/cr/crate_master/crate_master-1.0.0.toml index 43c530ba..d5fedea0 100644 --- a/testsuite/tests/index/external-hint/my_index/cr/crate_master/crate_master-1.0.0.toml +++ b/testsuite/tests/index/external-hint/my_index/cr/crate_master/crate_master-1.0.0.toml @@ -1,11 +1,13 @@ description = "A crate with a dependency" name = "crate_master" version = "1.0.0" -origin = "file://../../../crates/noop_1.0-default.tgz" licenses = [] maintainers = ["somebody@somewhere.com"] maintainers-logins = ["mylogin"] -origin-hashes = ["sha512:de676fbda9f16ba98fe1adc80e20dbd9b98a86352267825b55f1d719570adc0f92f1be2e96fd3df06aac4f6b5fee8686695e315be370cabe482edefc5a0570c5"] [[depends-on]] crate = "any" + +[origin] +url = "file://../../../crates/noop_1.0-default.tgz" +hashes = ["sha512:de676fbda9f16ba98fe1adc80e20dbd9b98a86352267825b55f1d719570adc0f92f1be2e96fd3df06aac4f6b5fee8686695e315be370cabe482edefc5a0570c5"] diff --git a/testsuite/tests/index/external-hint/my_index/index.toml b/testsuite/tests/index/external-hint/my_index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/index/external-hint/my_index/index.toml +++ b/testsuite/tests/index/external-hint/my_index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/index/external-msys2/my_index/index.toml b/testsuite/tests/index/external-msys2/my_index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/index/external-msys2/my_index/index.toml +++ b/testsuite/tests/index/external-msys2/my_index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/index/external-msys2/my_index/ma/main/main-1.0.0.toml b/testsuite/tests/index/external-msys2/my_index/ma/main/main-1.0.0.toml index 833211a3..3fa9eccd 100644 --- a/testsuite/tests/index/external-msys2/my_index/ma/main/main-1.0.0.toml +++ b/testsuite/tests/index/external-msys2/my_index/ma/main/main-1.0.0.toml @@ -1,14 +1,16 @@ description = "Main program" name = "main" version = "1.0.0" -origin = "file://./../../../crates/noop_1.0-default.tgz" licenses = [] maintainers = ["alejandro@mosteo.com"] maintainers-logins = ["mylogin"] -origin-hashes = ["sha512:de676fbda9f16ba98fe1adc80e20dbd9b98a86352267825b55f1d719570adc0f92f1be2e96fd3df06aac4f6b5fee8686695e315be370cabe482edefc5a0570c5"] [[depends-on]] dialog = "*" [[actions."case(os)".windows]] type = "post-fetch" command = ["bash", "-c", "uname && dialog --help"] + +[origin] +url = "file://./../../../crates/noop_1.0-default.tgz" +hashes = ["sha512:de676fbda9f16ba98fe1adc80e20dbd9b98a86352267825b55f1d719570adc0f92f1be2e96fd3df06aac4f6b5fee8686695e315be370cabe482edefc5a0570c5"] diff --git a/testsuite/tests/index/external-unindexed/my_index/index/he/hello_world/hello_world-0.1.0.toml b/testsuite/tests/index/external-unindexed/my_index/index/he/hello_world/hello_world-0.1.0.toml index bae0251d..4a283813 100644 --- a/testsuite/tests/index/external-unindexed/my_index/index/he/hello_world/hello_world-0.1.0.toml +++ b/testsuite/tests/index/external-unindexed/my_index/index/he/hello_world/hello_world-0.1.0.toml @@ -2,8 +2,10 @@ description = "This is the regular short description" long-description = "This is the long crate description.\n\nThis can be a multiline string, and TOML parsers are free to use the platform end-of-line character during loading.\n" name = "hello_world" version = "0.1.0" -origin = "http://blah.com/pkg.zip" licenses = [] maintainers = ["example@example.com"] maintainers-logins = ["mylogin"] -origin-hashes = ["sha512:deadbeef"] + +[origin] +url = "http://blah.com/pkg.zip" +hashes = ["sha512:deadbeef"] diff --git a/testsuite/tests/index/external-unindexed/my_index/index/index.toml b/testsuite/tests/index/external-unindexed/my_index/index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/index/external-unindexed/my_index/index/index.toml +++ b/testsuite/tests/index/external-unindexed/my_index/index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/index/long-description/my_index/index/he/hello_world/hello_world-0.1.0.toml b/testsuite/tests/index/long-description/my_index/index/he/hello_world/hello_world-0.1.0.toml index bae0251d..4a283813 100644 --- a/testsuite/tests/index/long-description/my_index/index/he/hello_world/hello_world-0.1.0.toml +++ b/testsuite/tests/index/long-description/my_index/index/he/hello_world/hello_world-0.1.0.toml @@ -2,8 +2,10 @@ description = "This is the regular short description" long-description = "This is the long crate description.\n\nThis can be a multiline string, and TOML parsers are free to use the platform end-of-line character during loading.\n" name = "hello_world" version = "0.1.0" -origin = "http://blah.com/pkg.zip" licenses = [] maintainers = ["example@example.com"] maintainers-logins = ["mylogin"] -origin-hashes = ["sha512:deadbeef"] + +[origin] +url = "http://blah.com/pkg.zip" +hashes = ["sha512:deadbeef"] diff --git a/testsuite/tests/index/long-description/my_index/index/index.toml b/testsuite/tests/index/long-description/my_index/index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/index/long-description/my_index/index/index.toml +++ b/testsuite/tests/index/long-description/my_index/index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/index/long-tag/my_index/index/he/hello_world/hello_world-0.1.0.toml b/testsuite/tests/index/long-tag/my_index/index/he/hello_world/hello_world-0.1.0.toml index ebf6402f..ee67daaa 100644 --- a/testsuite/tests/index/long-tag/my_index/index/he/hello_world/hello_world-0.1.0.toml +++ b/testsuite/tests/index/long-tag/my_index/index/he/hello_world/hello_world-0.1.0.toml @@ -1,8 +1,10 @@ description = "\"Hello, world!\" demonstration project" name = "hello_world" version = "0.1.0" -origin = "file://." licenses = [] maintainers = ["example@example.com"] maintainers-logins = ["mylogin"] tags = ["very-very-long-tag"] + +[origin] +url = "file:." diff --git a/testsuite/tests/index/long-tag/my_index/index/index.toml b/testsuite/tests/index/long-tag/my_index/index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/index/long-tag/my_index/index/index.toml +++ b/testsuite/tests/index/long-tag/my_index/index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/index/maint-bad-email/my_index/index/he/hello_world/hello_world-0.1.0.toml b/testsuite/tests/index/maint-bad-email/my_index/index/he/hello_world/hello_world-0.1.0.toml index 33a9ad60..46ee2096 100644 --- a/testsuite/tests/index/maint-bad-email/my_index/index/he/hello_world/hello_world-0.1.0.toml +++ b/testsuite/tests/index/maint-bad-email/my_index/index/he/hello_world/hello_world-0.1.0.toml @@ -1,7 +1,9 @@ description = "\"Hello, world!\" demonstration project" name = "hello_world" version = "0.1.0" -origin = "file://." licenses = [] maintainers = ["Mr. User"] maintainers-logins = ["mylogin"] + +[origin] +url = "file:." diff --git a/testsuite/tests/index/maint-bad-email/my_index/index/index.toml b/testsuite/tests/index/maint-bad-email/my_index/index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/index/maint-bad-email/my_index/index/index.toml +++ b/testsuite/tests/index/maint-bad-email/my_index/index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/index/maint-bad-login/my_index/index/he/hello_world/hello_world-0.1.0.toml b/testsuite/tests/index/maint-bad-login/my_index/index/he/hello_world/hello_world-0.1.0.toml index 275a2992..e7b69d9a 100644 --- a/testsuite/tests/index/maint-bad-login/my_index/index/he/hello_world/hello_world-0.1.0.toml +++ b/testsuite/tests/index/maint-bad-login/my_index/index/he/hello_world/hello_world-0.1.0.toml @@ -1,7 +1,9 @@ description = "\"Hello, world!\" demonstration project" name = "hello_world" version = "0.1.0" -origin = "file://." licenses = [] maintainers = ["Mr. User "] maintainers-logins = ["mr.user"] + +[origin] +url = "file:." diff --git a/testsuite/tests/index/maint-bad-login/my_index/index/index.toml b/testsuite/tests/index/maint-bad-login/my_index/index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/index/maint-bad-login/my_index/index/index.toml +++ b/testsuite/tests/index/maint-bad-login/my_index/index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/index/mismatched-crate/my_index/index/cr/crate/misplaced_crate-1.0.0.toml b/testsuite/tests/index/mismatched-crate/my_index/index/cr/crate/misplaced_crate-1.0.0.toml index 51d9e942..97fb716e 100644 --- a/testsuite/tests/index/mismatched-crate/my_index/index/cr/crate/misplaced_crate-1.0.0.toml +++ b/testsuite/tests/index/mismatched-crate/my_index/index/cr/crate/misplaced_crate-1.0.0.toml @@ -1,7 +1,9 @@ description = "Sample crate" name = "crate" version = "1.0.0" -origin = "file://../../../crates/crate" licenses = [] maintainers = ["any@bo.dy"] maintainers-logins = ["someone"] + +[origin] +url = "file:../../../crates/crate" diff --git a/testsuite/tests/index/mismatched-crate/my_index/index/index.toml b/testsuite/tests/index/mismatched-crate/my_index/index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/index/mismatched-crate/my_index/index/index.toml +++ b/testsuite/tests/index/mismatched-crate/my_index/index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/index/mismatched-parent/my_index/index/cr/bad_parent/crate-1.0.0.toml b/testsuite/tests/index/mismatched-parent/my_index/index/cr/bad_parent/crate-1.0.0.toml index 51d9e942..97fb716e 100644 --- a/testsuite/tests/index/mismatched-parent/my_index/index/cr/bad_parent/crate-1.0.0.toml +++ b/testsuite/tests/index/mismatched-parent/my_index/index/cr/bad_parent/crate-1.0.0.toml @@ -1,7 +1,9 @@ description = "Sample crate" name = "crate" version = "1.0.0" -origin = "file://../../../crates/crate" licenses = [] maintainers = ["any@bo.dy"] maintainers-logins = ["someone"] + +[origin] +url = "file:../../../crates/crate" diff --git a/testsuite/tests/index/mismatched-parent/my_index/index/index.toml b/testsuite/tests/index/mismatched-parent/my_index/index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/index/mismatched-parent/my_index/index/index.toml +++ b/testsuite/tests/index/mismatched-parent/my_index/index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/index/origin-filesystem-bad-path/bad_index_1/he/hello/hello-1.0.0.toml b/testsuite/tests/index/origin-filesystem-bad-path/bad_index_1/he/hello/hello-1.0.0.toml index 3f035bdf..ae797a55 100644 --- a/testsuite/tests/index/origin-filesystem-bad-path/bad_index_1/he/hello/hello-1.0.0.toml +++ b/testsuite/tests/index/origin-filesystem-bad-path/bad_index_1/he/hello/hello-1.0.0.toml @@ -1,7 +1,9 @@ description = "\"Hello, world!\" demonstration project" name = "hello" version = "1.0.0" -origin = "file://" licenses = [] maintainers = ["alejandro@mosteo.com"] maintainers-logins = ["mylogin"] + +[origin] +url = "file:" diff --git a/testsuite/tests/index/origin-filesystem-bad-path/bad_index_1/index.toml b/testsuite/tests/index/origin-filesystem-bad-path/bad_index_1/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/index/origin-filesystem-bad-path/bad_index_1/index.toml +++ b/testsuite/tests/index/origin-filesystem-bad-path/bad_index_1/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/index/origin-filesystem-bad-path/bad_index_2/he/hello/hello-1.0.0.toml b/testsuite/tests/index/origin-filesystem-bad-path/bad_index_2/he/hello/hello-1.0.0.toml index 295d5fdd..7162b8aa 100644 --- a/testsuite/tests/index/origin-filesystem-bad-path/bad_index_2/he/hello/hello-1.0.0.toml +++ b/testsuite/tests/index/origin-filesystem-bad-path/bad_index_2/he/hello/hello-1.0.0.toml @@ -1,7 +1,9 @@ description = "\"Hello, world!\" demonstration project" name = "hello" version = "1.0.0" -origin = "file://non-existing-path" licenses = [] maintainers = ["alejandro@mosteo.com"] maintainers-logins = ["mylogin"] + +[origin] +url = "file:non-existing-path" diff --git a/testsuite/tests/index/origin-filesystem-bad-path/bad_index_2/index.toml b/testsuite/tests/index/origin-filesystem-bad-path/bad_index_2/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/index/origin-filesystem-bad-path/bad_index_2/index.toml +++ b/testsuite/tests/index/origin-filesystem-bad-path/bad_index_2/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/index/origin-no-archive-name/my_index/index/he/hello_world/hello_world-0.1.0.toml b/testsuite/tests/index/origin-no-archive-name/my_index/index/he/hello_world/hello_world-0.1.0.toml index a12fc9ad..0aec157e 100644 --- a/testsuite/tests/index/origin-no-archive-name/my_index/index/he/hello_world/hello_world-0.1.0.toml +++ b/testsuite/tests/index/origin-no-archive-name/my_index/index/he/hello_world/hello_world-0.1.0.toml @@ -1,8 +1,10 @@ +archive-hash = "sha512:deadbeef" description = "\"Hello, world!\" demonstration project" name = "hello_world" version = "0.1.0" -archive-hash = "sha512:deadbeef" -origin = "http://example.com/" licenses = [] maintainers = ["user@example.com"] maintainers-logins = ["mylogin"] + +[origin] +url = "http://example.com/" diff --git a/testsuite/tests/index/origin-no-archive-name/my_index/index/index.toml b/testsuite/tests/index/origin-no-archive-name/my_index/index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/index/origin-no-archive-name/my_index/index/index.toml +++ b/testsuite/tests/index/origin-no-archive-name/my_index/index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/index/origin-unknown-kind/my_index/index/he/hello_world/hello_world-0.1.0.toml b/testsuite/tests/index/origin-unknown-kind/my_index/index/he/hello_world/hello_world-0.1.0.toml index e85123e1..a1a3c4ea 100644 --- a/testsuite/tests/index/origin-unknown-kind/my_index/index/he/hello_world/hello_world-0.1.0.toml +++ b/testsuite/tests/index/origin-unknown-kind/my_index/index/he/hello_world/hello_world-0.1.0.toml @@ -1,7 +1,9 @@ description = "\"Hello, world!\" demonstration project" name = "hello_world" version = "0.1.0" -origin = "foo+http://blah.com/pkg.html" licenses = [] maintainers = ["user@example.com"] maintainers-logins = ["mylogin"] + +[origin] +url = "foo+http://blah.com/pkg.html" diff --git a/testsuite/tests/index/origin-unknown-kind/my_index/index/index.toml b/testsuite/tests/index/origin-unknown-kind/my_index/index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/index/origin-unknown-kind/my_index/index/index.toml +++ b/testsuite/tests/index/origin-unknown-kind/my_index/index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/index/origin-unknown-kind/test.py b/testsuite/tests/index/origin-unknown-kind/test.py index a14ccc95..bfca7f64 100644 --- a/testsuite/tests/index/origin-unknown-kind/test.py +++ b/testsuite/tests/index/origin-unknown-kind/test.py @@ -9,7 +9,7 @@ from drivers.asserts import assert_match p = run_alr('show', 'hello_world', complain_on_error=False, debug=False, quiet=False) assert_match( - 'ERROR: .* unknown origin: .*' + 'ERROR: .* unsupported scheme .*' '\n', p.out) print('SUCCESS') diff --git a/testsuite/tests/index/too-long-short-description/my_index/index/he/hello_world/hello_world-0.1.0.toml b/testsuite/tests/index/too-long-short-description/my_index/index/he/hello_world/hello_world-0.1.0.toml index 488fbcf5..ba302404 100644 --- a/testsuite/tests/index/too-long-short-description/my_index/index/he/hello_world/hello_world-0.1.0.toml +++ b/testsuite/tests/index/too-long-short-description/my_index/index/he/hello_world/hello_world-0.1.0.toml @@ -1,7 +1,9 @@ description = "This is a very very very very very very very very very very long description" name = "hello_world" version = "0.1.0" -origin = "file://." licenses = [] maintainers = ["example@example.com"] maintainers-logins = ["mylogin"] + +[origin] +url = "file:." diff --git a/testsuite/tests/index/too-long-short-description/my_index/index/index.toml b/testsuite/tests/index/too-long-short-description/my_index/index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/index/too-long-short-description/my_index/index/index.toml +++ b/testsuite/tests/index/too-long-short-description/my_index/index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/index/unexpected-contents/my_index/index/cr/crate/crate-1.0.0.toml b/testsuite/tests/index/unexpected-contents/my_index/index/cr/crate/crate-1.0.0.toml index 0e5524ce..0d46ea63 100644 --- a/testsuite/tests/index/unexpected-contents/my_index/index/cr/crate/crate-1.0.0.toml +++ b/testsuite/tests/index/unexpected-contents/my_index/index/cr/crate/crate-1.0.0.toml @@ -1,7 +1,9 @@ description = "Sample crate" name = "crate" version = "1.0.0" -origin = "file://." licenses = [] maintainers = ["any@bo.dy"] maintainers-logins = ["someone"] + +[origin] +url = "file:." diff --git a/testsuite/tests/index/unexpected-contents/my_index/index/index.toml b/testsuite/tests/index/unexpected-contents/my_index/index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/index/unexpected-contents/my_index/index/index.toml +++ b/testsuite/tests/index/unexpected-contents/my_index/index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/pin/all/my_index/index/he/hello1/hello1-0.1.0.toml b/testsuite/tests/pin/all/my_index/index/he/hello1/hello1-0.1.0.toml index 7662ddf5..1ee43254 100644 --- a/testsuite/tests/pin/all/my_index/index/he/hello1/hello1-0.1.0.toml +++ b/testsuite/tests/pin/all/my_index/index/he/hello1/hello1-0.1.0.toml @@ -1,7 +1,9 @@ description = "\"Hello, world!\" demonstration project" name = "hello1" version = "0.1.0" -origin = "file://." licenses = [] maintainers = ["example@example.com"] maintainers-logins = ["mylogin"] + +[origin] +url = "file:." diff --git a/testsuite/tests/pin/all/my_index/index/he/hello2/hello2-0.1.0.toml b/testsuite/tests/pin/all/my_index/index/he/hello2/hello2-0.1.0.toml index 6fbae9b6..a3d6da66 100644 --- a/testsuite/tests/pin/all/my_index/index/he/hello2/hello2-0.1.0.toml +++ b/testsuite/tests/pin/all/my_index/index/he/hello2/hello2-0.1.0.toml @@ -1,7 +1,9 @@ description = "\"Hello, world!\" demonstration project" name = "hello2" version = "0.1.0" -origin = "file://." licenses = [] maintainers = ["example@example.com"] maintainers-logins = ["mylogin"] + +[origin] +url = "file:." diff --git a/testsuite/tests/pin/all/my_index/index/index.toml b/testsuite/tests/pin/all/my_index/index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/pin/all/my_index/index/index.toml +++ b/testsuite/tests/pin/all/my_index/index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/pin/change-type/my_index/index.toml b/testsuite/tests/pin/change-type/my_index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/pin/change-type/my_index/index.toml +++ b/testsuite/tests/pin/change-type/my_index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/pin/change-type/my_index/li/libhello/libhello-1.0.0.toml b/testsuite/tests/pin/change-type/my_index/li/libhello/libhello-1.0.0.toml index 463c1f32..3f8b42e5 100644 --- a/testsuite/tests/pin/change-type/my_index/li/libhello/libhello-1.0.0.toml +++ b/testsuite/tests/pin/change-type/my_index/li/libhello/libhello-1.0.0.toml @@ -1,7 +1,9 @@ description = "libhello" name = "libhello" version = "1.0.0" -origin = "file://../../../crates/libhello_1.0.0" licenses = [] maintainers = ["some@one.com"] maintainers-logins = ["mylogin"] + +[origin] +url = "file:../../../crates/libhello_1.0.0" diff --git a/testsuite/tests/pin/downgrade/my_index/index/index.toml b/testsuite/tests/pin/downgrade/my_index/index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/pin/downgrade/my_index/index/index.toml +++ b/testsuite/tests/pin/downgrade/my_index/index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/pin/downgrade/my_index/index/li/libchild/libchild-0.1.0.toml b/testsuite/tests/pin/downgrade/my_index/index/li/libchild/libchild-0.1.0.toml index 571098ce..6b7f8be1 100644 --- a/testsuite/tests/pin/downgrade/my_index/index/li/libchild/libchild-0.1.0.toml +++ b/testsuite/tests/pin/downgrade/my_index/index/li/libchild/libchild-0.1.0.toml @@ -1,7 +1,9 @@ description = "Child" name = "libchild" version = "0.1.0" -origin = "file://." licenses = [] maintainers = ["example@example.com"] maintainers-logins = ["mylogin"] + +[origin] +url = "file:." diff --git a/testsuite/tests/pin/downgrade/my_index/index/li/libchild/libchild-0.2.0.toml b/testsuite/tests/pin/downgrade/my_index/index/li/libchild/libchild-0.2.0.toml index ab6a40a3..47e09668 100644 --- a/testsuite/tests/pin/downgrade/my_index/index/li/libchild/libchild-0.2.0.toml +++ b/testsuite/tests/pin/downgrade/my_index/index/li/libchild/libchild-0.2.0.toml @@ -1,7 +1,9 @@ description = "Child" name = "libchild" version = "0.2.0" -origin = "file://." licenses = [] maintainers = ["example@example.com"] maintainers-logins = ["mylogin"] + +[origin] +url = "file:." diff --git a/testsuite/tests/pin/downgrade/my_index/index/li/libparent/libparent-1.0.0.toml b/testsuite/tests/pin/downgrade/my_index/index/li/libparent/libparent-1.0.0.toml index 47123d92..038423c5 100644 --- a/testsuite/tests/pin/downgrade/my_index/index/li/libparent/libparent-1.0.0.toml +++ b/testsuite/tests/pin/downgrade/my_index/index/li/libparent/libparent-1.0.0.toml @@ -1,10 +1,12 @@ description = "Parent" name = "libparent" version = "1.0.0" -origin = "file://." licenses = [] maintainers = ["example@example.com"] maintainers-logins = ["mylogin"] [[depends-on]] libchild = "*" + +[origin] +url = "file:." diff --git a/testsuite/tests/pin/pin-dir-with-regular/my_index/index.toml b/testsuite/tests/pin/pin-dir-with-regular/my_index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/pin/pin-dir-with-regular/my_index/index.toml +++ b/testsuite/tests/pin/pin-dir-with-regular/my_index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/pin/pin-dir-with-regular/my_index/li/libhello/libhello-1.0.0.toml b/testsuite/tests/pin/pin-dir-with-regular/my_index/li/libhello/libhello-1.0.0.toml index 463c1f32..3f8b42e5 100644 --- a/testsuite/tests/pin/pin-dir-with-regular/my_index/li/libhello/libhello-1.0.0.toml +++ b/testsuite/tests/pin/pin-dir-with-regular/my_index/li/libhello/libhello-1.0.0.toml @@ -1,7 +1,9 @@ description = "libhello" name = "libhello" version = "1.0.0" -origin = "file://../../../crates/libhello_1.0.0" licenses = [] maintainers = ["some@one.com"] maintainers-logins = ["mylogin"] + +[origin] +url = "file:../../../crates/libhello_1.0.0" diff --git a/testsuite/tests/pin/pin-dir/my_index/index.toml b/testsuite/tests/pin/pin-dir/my_index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/pin/pin-dir/my_index/index.toml +++ b/testsuite/tests/pin/pin-dir/my_index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/pin/pin-dir/my_index/li/libhello/libhello-1.0.0.toml b/testsuite/tests/pin/pin-dir/my_index/li/libhello/libhello-1.0.0.toml index 463c1f32..3f8b42e5 100644 --- a/testsuite/tests/pin/pin-dir/my_index/li/libhello/libhello-1.0.0.toml +++ b/testsuite/tests/pin/pin-dir/my_index/li/libhello/libhello-1.0.0.toml @@ -1,7 +1,9 @@ description = "libhello" name = "libhello" version = "1.0.0" -origin = "file://../../../crates/libhello_1.0.0" licenses = [] maintainers = ["some@one.com"] maintainers-logins = ["mylogin"] + +[origin] +url = "file:../../../crates/libhello_1.0.0" diff --git a/testsuite/tests/pin/post-update/my_index/index/index.toml b/testsuite/tests/pin/post-update/my_index/index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/pin/post-update/my_index/index/index.toml +++ b/testsuite/tests/pin/post-update/my_index/index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/pin/post-update/my_index/index/li/libchild/libchild-0.1.0.toml b/testsuite/tests/pin/post-update/my_index/index/li/libchild/libchild-0.1.0.toml index 571098ce..6b7f8be1 100644 --- a/testsuite/tests/pin/post-update/my_index/index/li/libchild/libchild-0.1.0.toml +++ b/testsuite/tests/pin/post-update/my_index/index/li/libchild/libchild-0.1.0.toml @@ -1,7 +1,9 @@ description = "Child" name = "libchild" version = "0.1.0" -origin = "file://." licenses = [] maintainers = ["example@example.com"] maintainers-logins = ["mylogin"] + +[origin] +url = "file:." diff --git a/testsuite/tests/pin/post-update/my_index/index/li/libchild/libchild-0.2.0.toml b/testsuite/tests/pin/post-update/my_index/index/li/libchild/libchild-0.2.0.toml index ab6a40a3..47e09668 100644 --- a/testsuite/tests/pin/post-update/my_index/index/li/libchild/libchild-0.2.0.toml +++ b/testsuite/tests/pin/post-update/my_index/index/li/libchild/libchild-0.2.0.toml @@ -1,7 +1,9 @@ description = "Child" name = "libchild" version = "0.2.0" -origin = "file://." licenses = [] maintainers = ["example@example.com"] maintainers-logins = ["mylogin"] + +[origin] +url = "file:." diff --git a/testsuite/tests/pin/post-update/my_index/index/li/libparent/libparent-1.0.0.toml b/testsuite/tests/pin/post-update/my_index/index/li/libparent/libparent-1.0.0.toml index 47123d92..038423c5 100644 --- a/testsuite/tests/pin/post-update/my_index/index/li/libparent/libparent-1.0.0.toml +++ b/testsuite/tests/pin/post-update/my_index/index/li/libparent/libparent-1.0.0.toml @@ -1,10 +1,12 @@ description = "Parent" name = "libparent" version = "1.0.0" -origin = "file://." licenses = [] maintainers = ["example@example.com"] maintainers-logins = ["mylogin"] [[depends-on]] libchild = "*" + +[origin] +url = "file:." diff --git a/testsuite/tests/pin/unneeded-held/my_index/index/index.toml b/testsuite/tests/pin/unneeded-held/my_index/index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/pin/unneeded-held/my_index/index/index.toml +++ b/testsuite/tests/pin/unneeded-held/my_index/index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/pin/unneeded-held/my_index/index/li/libchild/libchild-0.1.0.toml b/testsuite/tests/pin/unneeded-held/my_index/index/li/libchild/libchild-0.1.0.toml index 571098ce..6b7f8be1 100644 --- a/testsuite/tests/pin/unneeded-held/my_index/index/li/libchild/libchild-0.1.0.toml +++ b/testsuite/tests/pin/unneeded-held/my_index/index/li/libchild/libchild-0.1.0.toml @@ -1,7 +1,9 @@ description = "Child" name = "libchild" version = "0.1.0" -origin = "file://." licenses = [] maintainers = ["example@example.com"] maintainers-logins = ["mylogin"] + +[origin] +url = "file:." diff --git a/testsuite/tests/pin/unneeded-held/my_index/index/li/libchild/libchild-0.2.0.toml b/testsuite/tests/pin/unneeded-held/my_index/index/li/libchild/libchild-0.2.0.toml index ab6a40a3..47e09668 100644 --- a/testsuite/tests/pin/unneeded-held/my_index/index/li/libchild/libchild-0.2.0.toml +++ b/testsuite/tests/pin/unneeded-held/my_index/index/li/libchild/libchild-0.2.0.toml @@ -1,7 +1,9 @@ description = "Child" name = "libchild" version = "0.2.0" -origin = "file://." licenses = [] maintainers = ["example@example.com"] maintainers-logins = ["mylogin"] + +[origin] +url = "file:." diff --git a/testsuite/tests/pin/unneeded-held/my_index/index/li/libparent/libparent-1.0.0.toml b/testsuite/tests/pin/unneeded-held/my_index/index/li/libparent/libparent-1.0.0.toml index 47123d92..038423c5 100644 --- a/testsuite/tests/pin/unneeded-held/my_index/index/li/libparent/libparent-1.0.0.toml +++ b/testsuite/tests/pin/unneeded-held/my_index/index/li/libparent/libparent-1.0.0.toml @@ -1,10 +1,12 @@ description = "Parent" name = "libparent" version = "1.0.0" -origin = "file://." licenses = [] maintainers = ["example@example.com"] maintainers-logins = ["mylogin"] [[depends-on]] libchild = "*" + +[origin] +url = "file:." diff --git a/testsuite/tests/setenv/env-during-fetch/my_index/index/ch/checkenv/checkenv-1.0.0.toml b/testsuite/tests/setenv/env-during-fetch/my_index/index/ch/checkenv/checkenv-1.0.0.toml index 05e603ba..080cedbf 100644 --- a/testsuite/tests/setenv/env-during-fetch/my_index/index/ch/checkenv/checkenv-1.0.0.toml +++ b/testsuite/tests/setenv/env-during-fetch/my_index/index/ch/checkenv/checkenv-1.0.0.toml @@ -1,7 +1,6 @@ description = "Sample crate" name = "checkenv" version = "1.0.0" -origin = "file://../../../crates/checkenv" licenses = [] maintainers = ["any@bo.dy"] maintainers-logins = ["someone"] @@ -15,3 +14,6 @@ type = "post-fetch" command = ["./checkenv"] [environment.CHECKENV_TEST_VAR] set = "defined" + +[origin] +url = "file:../../../crates/checkenv" diff --git a/testsuite/tests/setenv/env-during-fetch/my_index/index/ch/checkparent/checkparent-1.0.0.toml b/testsuite/tests/setenv/env-during-fetch/my_index/index/ch/checkparent/checkparent-1.0.0.toml index 7a5b6046..b22776c2 100644 --- a/testsuite/tests/setenv/env-during-fetch/my_index/index/ch/checkparent/checkparent-1.0.0.toml +++ b/testsuite/tests/setenv/env-during-fetch/my_index/index/ch/checkparent/checkparent-1.0.0.toml @@ -1,10 +1,12 @@ description = "Sample crate" name = "checkparent" version = "1.0.0" -origin = "file://." licenses = [] maintainers = ["any@bo.dy"] maintainers-logins = ["someone"] [[depends-on]] checkenv = "*" + +[origin] +url = "file:." diff --git a/testsuite/tests/setenv/env-during-fetch/my_index/index/index.toml b/testsuite/tests/setenv/env-during-fetch/my_index/index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/setenv/env-during-fetch/my_index/index/index.toml +++ b/testsuite/tests/setenv/env-during-fetch/my_index/index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/setenv/linked-paths/my_index/crates/crate_1234/alire/crate_1234.toml b/testsuite/tests/setenv/linked-paths/my_index/crates/crate_1234/alire/crate_1234.toml index 339d9f12..4a89b495 100644 --- a/testsuite/tests/setenv/linked-paths/my_index/crates/crate_1234/alire/crate_1234.toml +++ b/testsuite/tests/setenv/linked-paths/my_index/crates/crate_1234/alire/crate_1234.toml @@ -1,7 +1,9 @@ name = "crate_1234" version = "0.0.0" -origin = "file://.." description = "Shiny new project" maintainers = ["your@email.here"] maintainers-logins = ["github-username"] project-files = ["nested/project.gpr"] + +[origin] +url = "file:.." diff --git a/testsuite/tests/setenv/linked-paths/my_index/index/index.toml b/testsuite/tests/setenv/linked-paths/my_index/index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/setenv/linked-paths/my_index/index/index.toml +++ b/testsuite/tests/setenv/linked-paths/my_index/index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/test/action-test/my_index/index/he/hello/hello-1.0.0.toml b/testsuite/tests/test/action-test/my_index/index/he/hello/hello-1.0.0.toml index 49084643..359d5518 100644 --- a/testsuite/tests/test/action-test/my_index/index/he/hello/hello-1.0.0.toml +++ b/testsuite/tests/test/action-test/my_index/index/he/hello/hello-1.0.0.toml @@ -1,7 +1,6 @@ description = "action test" name = "hello" version = "1.0.0" -origin = "file://../../../crates/hello_1.0.0" licenses = [] maintainers = ["some@one.com"] maintainers-logins = ["mylogin"] @@ -13,3 +12,6 @@ command = ["echo", "ABRACADABRA"] [[actions]] type = "test" command = ["gprbuild", "-p"] + +[origin] +url = "file:../../../crates/hello_1.0.0" diff --git a/testsuite/tests/test/action-test/my_index/index/index.toml b/testsuite/tests/test/action-test/my_index/index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/test/action-test/my_index/index/index.toml +++ b/testsuite/tests/test/action-test/my_index/index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/update/selective/my_index/index/he/hello1/hello1-0.1.0.toml b/testsuite/tests/update/selective/my_index/index/he/hello1/hello1-0.1.0.toml index 7662ddf5..1ee43254 100644 --- a/testsuite/tests/update/selective/my_index/index/he/hello1/hello1-0.1.0.toml +++ b/testsuite/tests/update/selective/my_index/index/he/hello1/hello1-0.1.0.toml @@ -1,7 +1,9 @@ description = "\"Hello, world!\" demonstration project" name = "hello1" version = "0.1.0" -origin = "file://." licenses = [] maintainers = ["example@example.com"] maintainers-logins = ["mylogin"] + +[origin] +url = "file:." diff --git a/testsuite/tests/update/selective/my_index/index/he/hello2/hello2-0.1.0.toml b/testsuite/tests/update/selective/my_index/index/he/hello2/hello2-0.1.0.toml index 6fbae9b6..a3d6da66 100644 --- a/testsuite/tests/update/selective/my_index/index/he/hello2/hello2-0.1.0.toml +++ b/testsuite/tests/update/selective/my_index/index/he/hello2/hello2-0.1.0.toml @@ -1,7 +1,9 @@ description = "\"Hello, world!\" demonstration project" name = "hello2" version = "0.1.0" -origin = "file://." licenses = [] maintainers = ["example@example.com"] maintainers-logins = ["mylogin"] + +[origin] +url = "file:." diff --git a/testsuite/tests/update/selective/my_index/index/index.toml b/testsuite/tests/update/selective/my_index/index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/update/selective/my_index/index/index.toml +++ b/testsuite/tests/update/selective/my_index/index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/update/selective/my_index/updated/index/he/hello1/hello1-0.1.0.toml b/testsuite/tests/update/selective/my_index/updated/index/he/hello1/hello1-0.1.0.toml index 7662ddf5..1ee43254 100644 --- a/testsuite/tests/update/selective/my_index/updated/index/he/hello1/hello1-0.1.0.toml +++ b/testsuite/tests/update/selective/my_index/updated/index/he/hello1/hello1-0.1.0.toml @@ -1,7 +1,9 @@ description = "\"Hello, world!\" demonstration project" name = "hello1" version = "0.1.0" -origin = "file://." licenses = [] maintainers = ["example@example.com"] maintainers-logins = ["mylogin"] + +[origin] +url = "file:." diff --git a/testsuite/tests/update/selective/my_index/updated/index/he/hello1/hello1-0.2.0.toml b/testsuite/tests/update/selective/my_index/updated/index/he/hello1/hello1-0.2.0.toml index a3d58cef..50d9ad76 100644 --- a/testsuite/tests/update/selective/my_index/updated/index/he/hello1/hello1-0.2.0.toml +++ b/testsuite/tests/update/selective/my_index/updated/index/he/hello1/hello1-0.2.0.toml @@ -1,7 +1,9 @@ description = "\"Hello, world!\" demonstration project" name = "hello1" version = "0.2.0" -origin = "file://." licenses = [] maintainers = ["example@example.com"] maintainers-logins = ["mylogin"] + +[origin] +url = "file:." diff --git a/testsuite/tests/update/selective/my_index/updated/index/he/hello2/hello2-0.1.0.toml b/testsuite/tests/update/selective/my_index/updated/index/he/hello2/hello2-0.1.0.toml index 6fbae9b6..a3d6da66 100644 --- a/testsuite/tests/update/selective/my_index/updated/index/he/hello2/hello2-0.1.0.toml +++ b/testsuite/tests/update/selective/my_index/updated/index/he/hello2/hello2-0.1.0.toml @@ -1,7 +1,9 @@ description = "\"Hello, world!\" demonstration project" name = "hello2" version = "0.1.0" -origin = "file://." licenses = [] maintainers = ["example@example.com"] maintainers-logins = ["mylogin"] + +[origin] +url = "file:." diff --git a/testsuite/tests/update/selective/my_index/updated/index/he/hello2/hello2-0.2.0.toml b/testsuite/tests/update/selective/my_index/updated/index/he/hello2/hello2-0.2.0.toml index 790e6fb5..6757a02c 100644 --- a/testsuite/tests/update/selective/my_index/updated/index/he/hello2/hello2-0.2.0.toml +++ b/testsuite/tests/update/selective/my_index/updated/index/he/hello2/hello2-0.2.0.toml @@ -1,7 +1,9 @@ description = "\"Hello, world!\" demonstration project" name = "hello2" version = "0.2.0" -origin = "file://." licenses = [] maintainers = ["example@example.com"] maintainers-logins = ["mylogin"] + +[origin] +url = "file:." diff --git a/testsuite/tests/update/selective/my_index/updated/index/index.toml b/testsuite/tests/update/selective/my_index/updated/index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/update/selective/my_index/updated/index/index.toml +++ b/testsuite/tests/update/selective/my_index/updated/index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/with/auto-gpr-with/basic/my_index/index.toml b/testsuite/tests/with/auto-gpr-with/basic/my_index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/with/auto-gpr-with/basic/my_index/index.toml +++ b/testsuite/tests/with/auto-gpr-with/basic/my_index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/with/auto-gpr-with/basic/my_index/li/libhello_nogprwith/libhello_nogprwith-1.0.0.toml b/testsuite/tests/with/auto-gpr-with/basic/my_index/li/libhello_nogprwith/libhello_nogprwith-1.0.0.toml index f3aeb73e..5ed05df7 100644 --- a/testsuite/tests/with/auto-gpr-with/basic/my_index/li/libhello_nogprwith/libhello_nogprwith-1.0.0.toml +++ b/testsuite/tests/with/auto-gpr-with/basic/my_index/li/libhello_nogprwith/libhello_nogprwith-1.0.0.toml @@ -1,9 +1,11 @@ +auto-gpr-with = false description = "auto-gpr-with=false" name = "libhello_nogprwith" version = "1.0.0" -auto-gpr-with = false -origin = "file://../../../crates/libhello_1.0.0" licenses = [] maintainers = ["alejandro@mosteo.com"] maintainers-logins = ["mylogin"] project-files = ["will_fail_if_withed.gpr"] + +[origin] +url = "file:../../../crates/libhello_1.0.0" diff --git a/testsuite/tests/with/auto-gpr-with/gpr_in_subdir/my_index/gp/gpr_in_subdir/gpr_in_subdir-1.0.0.toml b/testsuite/tests/with/auto-gpr-with/gpr_in_subdir/my_index/gp/gpr_in_subdir/gpr_in_subdir-1.0.0.toml index a2eb874e..577b339d 100644 --- a/testsuite/tests/with/auto-gpr-with/gpr_in_subdir/my_index/gp/gpr_in_subdir/gpr_in_subdir-1.0.0.toml +++ b/testsuite/tests/with/auto-gpr-with/gpr_in_subdir/my_index/gp/gpr_in_subdir/gpr_in_subdir-1.0.0.toml @@ -1,8 +1,10 @@ description = "gpr file in subdirs" name = "gpr_in_subdir" version = "1.0.0" -origin = "file://../../../crates/libhello_1.0.0" licenses = [] maintainers = ["example@example.com"] maintainers-logins = ["mylogin"] project-files = ["dir1/dir2/dir3/gpr_in_subdir.gpr"] + +[origin] +url = "file:../../../crates/libhello_1.0.0" diff --git a/testsuite/tests/with/auto-gpr-with/gpr_in_subdir/my_index/index.toml b/testsuite/tests/with/auto-gpr-with/gpr_in_subdir/my_index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/with/auto-gpr-with/gpr_in_subdir/my_index/index.toml +++ b/testsuite/tests/with/auto-gpr-with/gpr_in_subdir/my_index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/with/pin-dir/my_index/index/index.toml b/testsuite/tests/with/pin-dir/my_index/index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/with/pin-dir/my_index/index/index.toml +++ b/testsuite/tests/with/pin-dir/my_index/index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" diff --git a/testsuite/tests/with/pin-dir/my_index/index/li/libhello/libhello-1.0.0.toml b/testsuite/tests/with/pin-dir/my_index/index/li/libhello/libhello-1.0.0.toml index 463c1f32..3f8b42e5 100644 --- a/testsuite/tests/with/pin-dir/my_index/index/li/libhello/libhello-1.0.0.toml +++ b/testsuite/tests/with/pin-dir/my_index/index/li/libhello/libhello-1.0.0.toml @@ -1,7 +1,9 @@ description = "libhello" name = "libhello" version = "1.0.0" -origin = "file://../../../crates/libhello_1.0.0" licenses = [] maintainers = ["some@one.com"] maintainers-logins = ["mylogin"] + +[origin] +url = "file:../../../crates/libhello_1.0.0" diff --git a/testsuite/tests/workflows/action-command/my_index/index/he/hello_world/hello_world-0.1.0.toml b/testsuite/tests/workflows/action-command/my_index/index/he/hello_world/hello_world-0.1.0.toml index 735de942..0ed7d546 100644 --- a/testsuite/tests/workflows/action-command/my_index/index/he/hello_world/hello_world-0.1.0.toml +++ b/testsuite/tests/workflows/action-command/my_index/index/he/hello_world/hello_world-0.1.0.toml @@ -1,7 +1,6 @@ description = "\"Hello, world!\" demonstration project" name = "hello_world" version = "0.1.0" -origin = "file://." licenses = [] maintainers = ["example@example.com"] maintainers-logins = ["mylogin"] @@ -16,3 +15,6 @@ command = ["touch", "test_post_fetch"] [[actions."case(os)".windows]] type = "post-fetch" command = ["cmd", "/C", "copy NUL test_post_fetch"] + +[origin] +url = "file:." diff --git a/testsuite/tests/workflows/action-command/my_index/index/index.toml b/testsuite/tests/workflows/action-command/my_index/index/index.toml index 5f154108..7c969026 100644 --- a/testsuite/tests/workflows/action-command/my_index/index/index.toml +++ b/testsuite/tests/workflows/action-command/my_index/index/index.toml @@ -1 +1 @@ -version = "0.1" +version = "0.2" -- 2.39.5