cpack_repository/commit
FIXED: Only analyze once and create file-references for files in other packages.
author | Jan Wielemaker |
---|---|
Tue Nov 23 15:04:23 2010 +0100 | |
committer | Jan Wielemaker |
Tue Nov 23 15:04:23 2010 +0100 | |
commit | 5efed56e27b5601911a5747b35501d91193ae601 |
tree | 1024d537770454c27c66d53f6f9dcf5cb62cc3b1 |
parent | 78f9e6e0ca40c9582c484e336f2d0a2c13403e79 |
Diff style: patch stat
diff --git a/lib/cpack/repository.pl b/lib/cpack/repository.pl index 066b57d..c56eef7 100644 --- a/lib/cpack/repository.pl +++ b/lib/cpack/repository.pl @@ -86,9 +86,10 @@ cpack_add_repository(User, URL, Options) :- ( exists_directory(BareGitPath) -> cpack_update_repository(User, URL, Options) ; git([clone, '--mirror', URL, BareGitPath], []), - rdf_assert(User, cpack:submitted, Graph, User) - ), - update_metadata(BareGitPath, Graph, [user(User),cloned(URL)|Options]). + rdf_assert(User, cpack:submitted, Graph, User), + update_metadata(BareGitPath, Graph, + [user(User),cloned(URL)|Options]) + ). %% cpack_update_package(+User, +Package) is det. % @@ -127,7 +128,8 @@ cpack_update_repository(User, URL, Options) :- ( ( Hash1 \== Hash0 ; option(update_metadata(always), Options, always) ) - -> update_metadata(BareGitPath, Graph, [user(User),cloned(URL)|Options]) + -> update_metadata(BareGitPath, Graph, + [user(User),cloned(URL)|Options]) ; true ). diff --git a/lib/cpack/xref.pl b/lib/cpack/xref.pl index 3c2193d..6f0e327 100644 --- a/lib/cpack/xref.pl +++ b/lib/cpack/xref.pl @@ -121,9 +121,11 @@ file_property(File, cpack:publicPredicate, literal(Pred)) :- xref_defined(File, Callable, public(_Line)), head_atom(Callable, Pred). file_property(File, UsesFile, Uses) :- + rdf_has(File, cpack:inPack, Pack), xref_uses_file(File, Spec, Path), ( rdf_is_resource(Path), - rdfs_individual_of(Path, cpack:'File') + rdfs_individual_of(Path, cpack:'File'), + rdf_has(Path, cpack:inPack, Pack) -> rdf_equal(UsesFile, cpack:usesPackageFile), Uses = Path ; file_ref(Spec, Uses),