Просмотр исходного кода

Better path handling for "destdir"

Billy Barrow 1 месяц назад
Родитель
Сommit
87f943ef1f

+ 3 - 1
src/cli/Install.vala

@@ -10,7 +10,8 @@ private int install_main(string[] args) {
     var state = new Usm.SystemState(paths);
     
     printerr("Refreshing repositories...\n");
-    var resolver = new Usm.Resolver();
+    var local_finder = new Usm.ResourceFinder();
+    var resolver = new Usm.Resolver(local_finder);
     var repos = state.get_repositories();
     foreach (var repo in repos) {
         state.refresh_list(repo, (f, c, t) => printerr(@"Refreshing list for $(repo.name): downloading $f $c/$t bytes\r"));
@@ -36,6 +37,7 @@ private int install_main(string[] args) {
 
     var transaction = new Usm.Transaction() {
         paths = paths,
+        resource_finder = new Usm.ResourceFinder(paths),
         to_remove = new HashSet<Usm.CachedPackage>(),
         to_install = cached_packages,
         state = state

+ 18 - 14
src/cli/Manifest.vala

@@ -2,10 +2,16 @@ Usm.Manifest manifest = null;
 string? build_path = null;
 bool replace_provides = false;
 bool debug_mode = false;
+Usm.ResourceFinder resfinder = null;
+Usm.ResourceFinder destresfinder = null;
 
 
 public static int manifest_main(string[] args) {
     paths = new Usm.Paths();
+    var resfinder_paths = paths.clone();
+    resfinder_paths.destination = "/";
+    resfinder = new Usm.ResourceFinder(resfinder_paths);
+    destresfinder = new Usm.ResourceFinder(paths);
 
     if(args.length < 2) {
         manifest_usage();
@@ -116,10 +122,8 @@ private void manifest_usage() {
 
 private int build() {
     // Create build directory if it doesn't exist
-
-
-    var missing_management_deps = manifest.dependencies.manage.where(d => !d.is_satisfied());
-    var missing_build_deps = manifest.dependencies.build.where(d => !d.is_satisfied());
+    var missing_management_deps = manifest.dependencies.manage.where(d => !resfinder.has_resource(d));
+    var missing_build_deps = manifest.dependencies.build.where(d => !resfinder.has_resource(d));
 
     var sane = true;
     if(missing_management_deps.any()) {
@@ -166,9 +170,9 @@ private int install() {
         }
     }
 
-    var missing_management_deps = manifest.dependencies.manage.where(d => !d.is_satisfied());
-    var missing_build_deps = manifest.dependencies.build.where(d => !d.is_satisfied());
-    var missing_runtime_deps = manifest.dependencies.runtime.where(d => !d.is_satisfied());
+    var missing_management_deps = manifest.dependencies.manage.where(d => !resfinder.has_resource(d));
+    var missing_build_deps = manifest.dependencies.build.where(d => !resfinder.has_resource(d));
+    var missing_runtime_deps = manifest.dependencies.runtime.where(d => !destresfinder.has_resource(d));
 
     var sane = true;
     if(missing_management_deps.any()) {
@@ -261,7 +265,7 @@ private int acquire() {
     }
 
     if(manifest.dependencies.acquire != null) {
-        var missing_acquire_deps = manifest.dependencies.manage.where(d => !d.is_satisfied());
+        var missing_acquire_deps = manifest.dependencies.manage.where(d => !resfinder.has_resource(d));
         if(missing_acquire_deps.any()) {
             foreach (var item in missing_acquire_deps) {
                 printerr(@"Missing acquire dependency \"$item\".\n");
@@ -285,7 +289,7 @@ private int acquire() {
 }
 
 private int uininstall() {
-    var missing_management_deps = manifest.dependencies.manage.where(d => !d.is_satisfied());
+    var missing_management_deps = manifest.dependencies.manage.where(d => !resfinder.has_resource(d));
 
     if(missing_management_deps.any()) {
         foreach (var item in missing_management_deps) {
@@ -394,9 +398,9 @@ private int autoprovides() {
         }
     }
 
-    var missing_management_deps = manifest.dependencies.manage.where(d => !d.is_satisfied());
-    var missing_build_deps = manifest.dependencies.build.where(d => !d.is_satisfied());
-    var missing_runtime_deps = manifest.dependencies.runtime.where(d => !d.is_satisfied());
+    var missing_management_deps = manifest.dependencies.manage.where(d => !resfinder.has_resource(d));
+    var missing_build_deps = manifest.dependencies.build.where(d => !resfinder.has_resource(d));
+    var missing_runtime_deps = manifest.dependencies.runtime.where(d => !destresfinder.has_resource(d));
 
     if(manifest.executables.install == null) {
         printerr(@"Autoprovides command only works with manifests that specify an installation executable.\n");
@@ -735,8 +739,8 @@ private int test() {
         }
     }
 
-    var missing_management_deps = manifest.dependencies.manage.where(d => !d.is_satisfied());
-    var missing_build_deps = manifest.dependencies.build.where(d => !d.is_satisfied());
+    var missing_management_deps = manifest.dependencies.manage.where(d => !resfinder.has_resource(d));
+    var missing_build_deps = manifest.dependencies.build.where(d => !resfinder.has_resource(d));
 
     var sane = true;
     if(missing_management_deps.any()) {

+ 12 - 10
src/lib/Resolver.vala

@@ -7,6 +7,11 @@ namespace Usm {
 
         private Dictionary<Repository, RepositoryListing> listings = new Dictionary<Repository, RepositoryListing>();
         private Set<AbstractPackage> supplied = new HashSet<AbstractPackage>();
+        private ResourceFinder resource_finder;
+
+        public Resolver(ResourceFinder local_resource_finder) {
+            this.resource_finder = local_resource_finder;
+        }
 
         private Enumerable<AbstractPackage> available_packages() {
             return 
@@ -50,7 +55,7 @@ namespace Usm {
                     .concat(item.manifest.dependencies.runtime);
 
                 foreach (var dep in dependencies) {
-                    if(package_set.provides(dep) || dep.is_satisfied()) {
+                    if(package_set.provides(dep) || resource_finder.has_resource(dep)) {
                         continue;
                     }
 
@@ -77,15 +82,12 @@ namespace Usm {
             add(new AbstractPackage.from_repository(repository, entry));
         }
 
-        public bool is_satisfied() {
-            return all(check_satisfied);
-        }
-
-        private bool check_satisfied(AbstractPackage package) {
-            return package.manifest.dependencies.build.all(d => provides(d) || d.is_satisfied()) &&
-                package.manifest.dependencies.manage.all(d => provides(d) || d.is_satisfied()) &&
-                package.manifest.dependencies.runtime.all(d => provides(d) || d.is_satisfied());
-
+        public bool is_satisfied(ResourceFinder local_resource_finder) {
+            return all(package => 
+                package.manifest.dependencies.build.all(d => provides(d) || local_resource_finder.has_resource(d)) &&
+                package.manifest.dependencies.manage.all(d => provides(d) || local_resource_finder.has_resource(d)) &&
+                package.manifest.dependencies.runtime.all(d => provides(d) || local_resource_finder.has_resource(d))
+            );
         }
 
         public bool provides(ResourceRef resource) {

+ 259 - 0
src/lib/ResourceFinder.vala

@@ -0,0 +1,259 @@
+using Invercargill;
+namespace Usm {
+
+    public class ResourceFinder {
+        public Paths paths { get; set; }
+
+        public ResourceFinder(Paths? paths = null) {
+            this.paths = paths ?? new Paths();
+        }
+
+        public bool has_resource(ResourceRef resource_ref) {
+            return locate_resource(resource_ref) != null;
+        }
+
+        public string? locate_resource(ResourceRef resource_ref) {
+            switch (resource_ref.resource_type) {
+                case ResourceType.ROOT_PATH:
+                    return locate_rootpath(resource_ref);
+                case ResourceType.PATH:
+                    return locate_path(resource_ref);
+                case ResourceType.OPTIONAL:
+                    return locate_opt(resource_ref);
+                case ResourceType.RESOURCE:
+                    return locate_res(resource_ref);
+                case ResourceType.CONFIGURATION:
+                    return locate_cfg(resource_ref);
+                case ResourceType.BINARY:
+                    return locate_bin(resource_ref);
+                case ResourceType.SUPER_BINARY:
+                    return locate_sbin(resource_ref);
+                case ResourceType.LIBRARY:
+                    return locate_lib(resource_ref);
+                case ResourceType.LIBRARY_EXECUTABLE:
+                    return locate_libexec(resource_ref);
+                case ResourceType.LIBRARY_RESOURCE:
+                    return locate_libres(resource_ref);
+                case ResourceType.CANONICAL_LIBRARY:
+                    return locate_canonlib(resource_ref);
+                case ResourceType.CANONICAL_LIBRARY_RESOURCE:
+                    return locate_canonlibres(resource_ref);
+                case ResourceType.INFO_PAGE:
+                    return locate_info(resource_ref);
+                case ResourceType.MANUAL_PAGE:
+                    return locate_man(resource_ref);
+                case ResourceType.LOCALE:
+                    return locate_locale(resource_ref);
+                case ResourceType.APPLICATION:
+                    return locate_app(resource_ref);
+                case ResourceType.INCLUDE:
+                    return locate_inc(resource_ref);
+                case ResourceType.PKG_CONFIG:
+                    return locate_pc(resource_ref);
+                case ResourceType.VALA_API:
+                    return locate_vapi(resource_ref);
+                case ResourceType.GOBJECT_IR:
+                    return locate_gir(resource_ref);
+                case ResourceType.TYPELIB:
+                    return locate_typelib(resource_ref);
+                case ResourceType.TAG:
+                    return locate_tag(resource_ref);
+                default:
+                    assert_not_reached();
+            }
+        }
+
+        private string? locate_tag(ResourceRef resource) {
+            if(Tag.read(resource.resource) != null) {
+                return paths.get_tag_file_path(resource.resource);
+            }
+            return null;
+        }
+
+        private string? locate_lib(ResourceRef resource) {
+            try {
+                var proc = new Subprocess.newv(new string[] { "ldconfig", "-p" }, SubprocessFlags.STDOUT_PIPE);
+                var pipe = new DataInputStream(proc.get_stdout_pipe());
+                string line = null;
+                while((line = pipe.read_line()) != null) {
+                    if(line.has_prefix("\t")) {
+                        var name = line.substring(1).split(" ", 2)[0];
+                        if(resource.resource == name) {
+                            return line.substring(1).split("=>", 2)[1].chomp().chug();
+                        }
+                    }
+                }
+                proc.wait_check();
+            }
+            catch(Error e) {
+                warning(@"Error checking for resource $resource: $(e.message)");
+            }
+            return null;
+        }
+
+        private string? locate_canonlib(ResourceRef resource) {
+            try {
+                var proc = new Subprocess.newv(new string[] { "ldconfig", "-p" }, SubprocessFlags.STDOUT_PIPE);
+                var pipe = new DataInputStream(proc.get_stdout_pipe());
+                string line = null;
+                while((line = pipe.read_line()) != null) {
+                    if(line.has_prefix("\t")) {
+                        var name = line.substring(1).split(" ", 2)[0];
+                        // Only return true for libraries found in the canonical lib directory (e.g. not in /lib64)
+                        if(resource.resource == name && (name.has_prefix("/usr/lib") || name.has_prefix("/lib"))) {
+                            return line.substring(1).split("=>", 2)[1].chomp().chug();
+                        }
+                    }
+                }
+                proc.wait_check();
+            }
+            catch(Error e) {
+                warning(@"Error checking for resource $resource: $(e.message)");
+            }
+            return null;
+        }
+
+        private string? locate_bin(ResourceRef resource) {
+            var env_paths = Environment.get_variable("PATH").split(":");
+            foreach (var path in env_paths) {
+                var file = File.new_build_filename(paths.destination, path, resource.resource);
+                if(file.query_exists()) {
+                    return file.get_path();
+                }
+            }
+            return null;
+        }
+
+        private string? locate_path(ResourceRef resource) {
+            var file = File.new_build_filename(paths.destination, paths.prefix, resource.resource);
+            return file.query_exists() ? file.get_path() : null;
+        }
+
+        private string? locate_rootpath(ResourceRef resource) {
+            var file = File.new_build_filename(paths.destination, resource.resource);
+            return file.query_exists() ? file.get_path() : null;
+        }
+
+        private string? locate_res(ResourceRef resource) {
+            var file = File.new_build_filename(paths.destination, paths.prefix, paths.data, resource.resource);
+            return file.query_exists() ? file.get_path() : null;
+        }
+
+        private string? locate_opt(ResourceRef resource) {
+            var file = File.new_build_filename(paths.destination, "opt", resource.resource);
+            return file.query_exists() ? file.get_path() : null;
+        }
+
+        private string? locate_cfg(ResourceRef resource) {
+            var file = File.new_build_filename(paths.destination, paths.sys_config, resource.resource);
+            return file.query_exists() ? file.get_path() : null;
+        }
+
+        private string? locate_libres(ResourceRef resource) {
+            var search = new string[] { "/usr/lib", "/usr/lib64", "/lib", "/lib64" };
+            foreach (var path in search) {
+                var file = File.new_build_filename(paths.destination, path, resource.resource);
+                if(file.query_exists()) {
+                    return file.get_path();
+                }
+            }
+            return null;
+        }
+
+        private string? locate_canonlibres(ResourceRef resource) {
+            var search = new string[] { "/usr/lib", "/lib" };
+            foreach (var path in search) {
+                var file = File.new_build_filename(paths.destination, path, resource.resource);
+                if(file.query_exists()) {
+                    return file.get_path();
+                }
+            }
+            return null;
+        }
+
+        private string? locate_app(ResourceRef resource) {
+            var file = File.new_build_filename("/usr/share/applications", resource.resource);
+            return file.query_exists() ? file.get_path() : null;
+        }
+
+        private string? locate_inc(ResourceRef resource) {
+            var file = File.new_build_filename("/usr/include", resource.resource);
+            return file.query_exists() ? file.get_path() : null;
+        }
+
+        private string? locate_sbin(ResourceRef resource) {
+            var search = new string[] { "/usr/sbin", "/sbin" };
+            foreach (var path in search) {
+                var file = File.new_build_filename(paths.destination, path, resource.resource);
+                if(file.query_exists()) {
+                    return file.get_path();
+                }
+            }
+            return null;
+        }
+
+        private string? locate_libexec(ResourceRef resource) {
+            var file = File.new_build_filename("/usr/libexec", resource.resource);
+            return file.query_exists() ? file.get_path() : null;
+        }
+
+        private string? locate_info(ResourceRef resource) {
+            var file = File.new_build_filename("/usr/share/info", resource.resource);
+            return file.query_exists() ? file.get_path() : null;
+        }
+
+        private string? locate_man(ResourceRef resource) {
+            var file = File.new_build_filename("/usr/share/man", resource.resource);
+            return file.query_exists() ? file.get_path() : null;
+        }
+
+        private string? locate_locale(ResourceRef resource) {
+            var file = File.new_build_filename("/usr/share/locale", resource.resource);
+            return file.query_exists() ? file.get_path() : null;
+        }
+
+        private string? locate_vapi(ResourceRef resource) {
+            var search = new string[] { "/usr/share/vala/vapi", "/usr/share/vala-0.56/vapi" };
+            foreach (var path in search) {
+                var file = File.new_build_filename(paths.destination, path, resource.resource);
+                if(file.query_exists()) {
+                    return file.get_path();
+                }
+            }
+            return null;
+        }
+
+        private string? locate_pc(ResourceRef resource) {
+            var search = Iterate.these("/usr/lib/pkgconfig", "/usr/lib64/pkgconfig", "/usr/share/pkgconfig");
+            var env = Environment.get_variable("PKG_CONFIG_PATH");
+            if(env != null) {
+                search = search.concat(Wrap.array(env.split(":")));
+            }
+
+            foreach (var path in search) {
+                var file = File.new_build_filename(paths.destination, path, resource.resource);
+                if(file.query_exists()) {
+                    return file.get_path();
+                }
+            }
+            return null;
+        }
+
+        private string? locate_gir(ResourceRef resource) {
+            var file = File.new_build_filename("/usr/share/gir", resource.resource);
+            return file.query_exists() ? file.get_path() : null;
+        }
+
+        private string? locate_typelib(ResourceRef resource) {
+            var search = new string[] { "/usr/lib64/girepository-1.0", "/usr/lib/girepository-1.0", "/lib64/girepository-1.0", "/lib/girepository-1.0"  };
+            foreach (var path in search) {
+                var file = File.new_build_filename(paths.destination, path, resource.resource);
+                if(file.query_exists()) {
+                    return file.get_path();
+                }
+            }
+            return null;
+        }
+    }
+
+}

+ 0 - 240
src/lib/ResourceRef.vala

@@ -199,246 +199,6 @@ namespace Usm {
             
             return false;
         }
-        
-        public bool is_satisfied() {
-            switch (resource_type) {
-                case ResourceType.ROOT_PATH:
-                    return check_rootpath();
-                case ResourceType.PATH:
-                    return check_path();
-                case ResourceType.OPTIONAL:
-                    return check_opt();
-                case ResourceType.RESOURCE:
-                    return check_res();
-                case ResourceType.CONFIGURATION:
-                    return check_cfg();
-                case ResourceType.BINARY:
-                    return check_bin();
-                case ResourceType.SUPER_BINARY:
-                    return check_sbin();
-                case ResourceType.LIBRARY:
-                    return check_lib();
-                case ResourceType.LIBRARY_EXECUTABLE:
-                    return check_libexec();
-                case ResourceType.LIBRARY_RESOURCE:
-                    return check_libres();
-                case ResourceType.CANONICAL_LIBRARY:
-                    return check_canonlib();
-                case ResourceType.CANONICAL_LIBRARY_RESOURCE:
-                    return check_canonlibres();
-                case ResourceType.INFO_PAGE:
-                    return check_info();
-                case ResourceType.MANUAL_PAGE:
-                    return check_man();
-                case ResourceType.LOCALE:
-                    return check_locale();
-                case ResourceType.APPLICATION:
-                    return check_app();
-                case ResourceType.INCLUDE:
-                    return check_inc();
-                case ResourceType.PKG_CONFIG:
-                    return check_pc();
-                case ResourceType.VALA_API:
-                    return check_vapi();
-                case ResourceType.GOBJECT_IR:
-                    return check_gir();
-                case ResourceType.TYPELIB:
-                    return check_typelib();
-                case ResourceType.TAG:
-                    return check_tag();
-                default:
-                    assert_not_reached();
-            }
-        }
-
-        private bool check_tag() {
-            return Tag.read(resource) != null;
-        }
-
-        private bool check_lib() {
-            try {
-                var proc = new Subprocess.newv(new string[] { "ldconfig", "-p" }, SubprocessFlags.STDOUT_PIPE);
-                var pipe = new DataInputStream(proc.get_stdout_pipe());
-                string line = null;
-                while((line = pipe.read_line()) != null) {
-                    if(line.has_prefix("\t")) {
-                        var name = line.substring(1).split(" ", 2)[0];
-                        if(resource == name) {
-                            return true;
-                        }
-                    }
-                }
-                proc.wait_check();
-            }
-            catch(Error e) {
-                warning(@"Error checking for resource $this: $(e.message)");
-            }
-            return false;
-        }
-
-        private bool check_canonlib() {
-            try {
-                var proc = new Subprocess.newv(new string[] { "ldconfig", "-p" }, SubprocessFlags.STDOUT_PIPE);
-                var pipe = new DataInputStream(proc.get_stdout_pipe());
-                string line = null;
-                while((line = pipe.read_line()) != null) {
-                    if(line.has_prefix("\t")) {
-                        var name = line.substring(1).split(" ", 2)[0];
-                        // Only return true for libraries found in the canonical lib directory (e.g. not in /lib64)
-                        if(resource == name && (name.has_prefix("/usr/lib") || name.has_prefix("/lib"))) {
-                            return true;
-                        }
-                    }
-                }
-                proc.wait_check();
-            }
-            catch(Error e) {
-                warning(@"Error checking for resource $this: $(e.message)");
-            }
-            return false;
-        }
-
-        private bool check_bin() {
-            var paths = Environment.get_variable("PATH").split(":");
-            foreach (var path in paths) {
-                var file = File.new_build_filename(path, resource);
-                if(file.query_exists()) {
-                    return true;
-                }
-            }
-            return false;
-        }
-
-        private bool check_path() {
-            var file = File.new_build_filename("/usr", resource);
-            return file.query_exists();
-        }
-
-        private bool check_rootpath() {
-            var file = File.new_build_filename("/", resource);
-            return file.query_exists();
-        }
-
-        private bool check_res() {
-            var file = File.new_build_filename("/usr/share", resource);
-            return file.query_exists();
-        }
-
-        private bool check_opt() {
-            var file = File.new_build_filename("/opt", resource);
-            return file.query_exists();
-        }
-
-        private bool check_cfg() {
-            var file = File.new_build_filename("/etc", resource);
-            return file.query_exists();
-        }
-
-        private bool check_libres() {
-            var paths = new string[] { "/usr/lib", "/usr/lib64", "/lib", "/lib64" };
-            foreach (var path in paths) {
-                var file = File.new_build_filename(path, resource);
-                if(file.query_exists()) {
-                    return true;
-                }
-            }
-            return false;
-        }
-
-        private bool check_canonlibres() {
-            var paths = new string[] { "/usr/lib", "/lib" };
-            foreach (var path in paths) {
-                var file = File.new_build_filename(path, resource);
-                if(file.query_exists()) {
-                    return true;
-                }
-            }
-            return false;
-        }
-
-        private bool check_app() {
-            var file = File.new_build_filename("/usr/share/applications", resource);
-            return file.query_exists();
-        }
-
-        private bool check_inc() {
-            var file = File.new_build_filename("/usr/include", resource);
-            return file.query_exists();
-        }
-
-        private bool check_sbin() {
-            var paths = new string[] { "/usr/sbin", "/sbin" };
-            foreach (var path in paths) {
-                var file = File.new_build_filename(path, resource);
-                if(file.query_exists()) {
-                    return true;
-                }
-            }
-            return false;
-        }
-
-        private bool check_libexec() {
-            var file = File.new_build_filename("/usr/libexec", resource);
-            return file.query_exists();
-        }
-
-        private bool check_info() {
-            var file = File.new_build_filename("/usr/share/info", resource);
-            return file.query_exists();
-        }
-
-        private bool check_man() {
-            var file = File.new_build_filename("/usr/share/man", resource);
-            return file.query_exists();
-        }
-
-        private bool check_locale() {
-            var file = File.new_build_filename("/usr/share/locale", resource);
-            return file.query_exists();
-        }
-
-        private bool check_vapi() {
-            var paths = new string[] { "/usr/share/vala/vapi", "/usr/share/vala-0.56/vapi" };
-            foreach (var path in paths) {
-                var file = File.new_build_filename(path, resource);
-                if(file.query_exists()) {
-                    return true;
-                }
-            }
-            return false;
-        }
-
-        private bool check_pc() {
-            var paths = Iterate.these("/usr/lib/pkgconfig", "/usr/lib64/pkgconfig", "/usr/share/pkgconfig");
-            var env = Environment.get_variable("PKG_CONFIG_PATH");
-            if(env != null) {
-                paths = paths.concat(Wrap.array(env.split(":")));
-            }
-
-            foreach (var path in paths) {
-                var file = File.new_build_filename(path, resource);
-                if(file.query_exists()) {
-                    return true;
-                }
-            }
-            return false;
-        }
-
-        private bool check_gir() {
-            var file = File.new_build_filename("/usr/share/gir", resource);
-            return file.query_exists();
-        }
-
-        private bool check_typelib() {
-            var paths = new string[] { "/usr/lib64/girepository-1.0", "/usr/lib/girepository-1.0", "/lib64/girepository-1.0", "/lib/girepository-1.0"  };
-            foreach (var path in paths) {
-                var file = File.new_build_filename(path, resource);
-                if(file.query_exists()) {
-                    return true;
-                }
-            }
-            return false;
-        }
     }
 
 }

+ 2 - 1
src/lib/Transaction.vala

@@ -6,6 +6,7 @@ namespace Usm {
     public class Transaction {
 
         public Paths paths { get; set; }
+        public ResourceFinder resource_finder { get; set; }
         public SystemState state { get; set; }
         public Set<CachedPackage> to_install { get; set; }
         public Set<CachedPackage> to_remove { get; set; }
@@ -92,7 +93,7 @@ namespace Usm {
                     try {
                         var manifest = package.get_manifest();
                         var installtime_dependencies = manifest.dependencies.manage.concat(manifest.dependencies.build);
-                        if(installtime_dependencies.all(d => d.is_satisfied() || available_resources.any(r => d.satisfied_by(r)))) {
+                        if(installtime_dependencies.all(d => resource_finder.has_resource(d) || available_resources.any(r => d.satisfied_by(r)))) {
                             lot.add(package);
                             touched.add(package);
                             available_resources.union_with(manifest.provides.select<ResourceRef>(p => p.key));

+ 1 - 0
src/lib/meson.build

@@ -9,6 +9,7 @@ sources += files('Git.vala')
 sources += files('Licence.vala')
 sources += files('Paths.vala')
 sources += files('ResourceRef.vala')
+sources += files('ResourceFinder.vala')
 sources += files('Version.vala')
 sources += files('Resolver.vala')
 sources += files('Util.vala')