osbase/build/fsspec: change order of arguments

We should always use the key as target path, as that's unique.

Change-Id: I09085448efda67cb6d1c0470fa15e4282b38e0d5
Reviewed-on: https://review.monogon.dev/c/monogon/+/4035
Tested-by: Jenkins CI
Reviewed-by: Lorenz Brun <lorenz@monogon.tech>
diff --git a/osbase/build/fsspec/def.bzl b/osbase/build/fsspec/def.bzl
index 8e68069..0165208 100644
--- a/osbase/build/fsspec/def.bzl
+++ b/osbase/build/fsspec/def.bzl
@@ -46,7 +46,7 @@
         fs_files.append(struct(path = p, source_path = src.path, mode = mode, uid = 0, gid = 0))
 
     fs_symlinks = []
-    for target, p in ctx.attr.symlinks.items():
+    for p, target in ctx.attr.symlinks.items():
         fs_symlinks.append(struct(path = p, target_path = target))
 
     fs_spec_content = struct(file = fs_files, directory = [], symbolic_link = fs_symlinks)
diff --git a/osbase/build/mkcpio/def.bzl b/osbase/build/mkcpio/def.bzl
index 402314e..3f93804 100644
--- a/osbase/build/mkcpio/def.bzl
+++ b/osbase/build/mkcpio/def.bzl
@@ -40,8 +40,8 @@
         "symlinks": attr.string_dict(
             default = {},
             doc = """
-                Symbolic links to create. Similar format as in files and files_cc, so the target of the symlink is the
-                key and the value of it is the location of the symlink itself. Only raw strings are allowed as targets,
+                Symbolic links to create. Similar format as in files and files_cc, so the key is the location of the
+                symlink itself and the value of it is target of the symlink. Only raw strings are allowed as targets,
                 labels are not permitted. Include the file using files or files_cc, then symlink to its location.
             """,
         ),
diff --git a/osbase/build/mkerofs/def.bzl b/osbase/build/mkerofs/def.bzl
index 45f00d8..ff4e137 100644
--- a/osbase/build/mkerofs/def.bzl
+++ b/osbase/build/mkerofs/def.bzl
@@ -39,10 +39,10 @@
         "symlinks": attr.string_dict(
             default = {},
             doc = """
-                Symbolic links to create. Similar format as in files and files_cc, so the target of the symlink is the
-                key and the value of it is the location of the symlink itself. Only raw strings are allowed as targets,
+                Symbolic links to create. Similar format as in files and files_cc, so the key is the location of the
+                symlink itself and the value of it is target of the symlink. Only raw strings are allowed as targets,
                 labels are not permitted. Include the file using files or files_cc, then symlink to its location.
-          """,
+            """,
         ),
         "fsspecs": attr.label_list(
             default = [],
diff --git a/osbase/test/ktest/ktest.bzl b/osbase/test/ktest/ktest.bzl
index 60a90a5..c7ecf59 100644
--- a/osbase/test/ktest/ktest.bzl
+++ b/osbase/test/ktest/ktest.bzl
@@ -87,8 +87,8 @@
         "symlinks": attr.string_dict(
             default = {},
             doc = """
-                Symbolic links to create. Similar format as in files and files_cc, so the target of the symlink is the
-                key and the value of it is the location of the symlink itself. Only raw strings are allowed as targets,
+                Symbolic links to create. Similar format as in files and files_cc, so the key is the location of the
+                symlink itself and the value of it is target of the symlink. Only raw strings are allowed as targets,
                 labels are not permitted. Include the file using files or files_cc, then symlink to its location.
             """,
         ),