Algorithm:

Foreach dependency in package:
	target = dependency.name;

	if target contains '/':
		# Absolute file dependency
		Search file db for owner of target;

		If found:
			Next dependency;
		Else:
			# We may want to think about this a bit more...
			# If we do this, we'll have to restrict this to common
			# directories (/usr/lib, etc.)
			Search filesystem for owner of target;

			If found:
				Next dependency;
			End If;
		End If;
	End If;

	If target contains '.':
		# Relative file dependency
		baseTarget = baseName(target);
		
		Search file db for owner of baseTarget;

		If found:
			Next dependency;
		Else:
			# If we do this, we'll have to restrict this to common
			# directories (/usr/lib, etc.)
			Search filesystem for owner of baseTarget;

			If found:
				Next dependency;
			End If;
		End If;
	End If;

	# Look in the package list in the database.
	Search package db for target;

	If found:
		Next dependency;
	End If;

	# No owner was found.
	Add dependency to list of failed dependencies;

End Foreach;

# Check the failed dependency list
If failed dependency list is not empty:
	Return list of failed dependencies;
Else:
	Install package;
End If;

# From here, the client (gpkg, etc.) can ask the user if they wish to
# download and install the packages matching these failed dependencies.

