summaryrefslogtreecommitdiff
path: root/gnu/packages.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-12-20 19:54:35 +0100
committerLudovic Courtès <ludo@gnu.org>2015-12-20 22:34:22 +0100
commit724a7d9c7416b53da5ab3d522bf6d7d3ffa3cc5e (patch)
tree641956f43ddf58c0f0e793b42f778c0f57721543 /gnu/packages.scm
parentccda8f7d7f95a9db0e1163857faf74800f368ac1 (diff)
downloadpatches-724a7d9c7416b53da5ab3d522bf6d7d3ffa3cc5e.tar
patches-724a7d9c7416b53da5ab3d522bf6d7d3ffa3cc5e.tar.gz
packages: Remove now redundant graph procedures.
These procedures are now redundant with those in (guix graph) and are no longer used since commit a51cbecb. * gnu/packages.scm (vhash-refq, package-dependencies) (package-direct-dependents, package-transitive-dependents) (package-covering-dependents): Remove.
Diffstat (limited to 'gnu/packages.scm')
-rw-r--r--gnu/packages.scm61
1 files changed, 0 insertions, 61 deletions
diff --git a/gnu/packages.scm b/gnu/packages.scm
index fb277389c7..b309a7806d 100644
--- a/gnu/packages.scm
+++ b/gnu/packages.scm
@@ -46,10 +46,6 @@
find-best-packages-by-name
find-newest-available-packages
- package-direct-dependents
- package-transitive-dependents
- package-covering-dependents
-
check-package-freshness
specification->package
@@ -263,63 +259,6 @@ VERSION."
(#f '()))))
-(define* (vhash-refq vhash key #:optional (dflt #f))
- "Look up KEY in the vhash VHASH, and return the value (if any) associated
-with it. If KEY is not found, return DFLT (or `#f' if no DFLT argument is
-supplied). Uses `eq?' for equality testing."
- (or (and=> (vhash-assq key vhash) cdr)
- dflt))
-
-(define package-dependencies
- (memoize
- (lambda ()
- "Return a vhash keyed by package, and with associated values that are a
-list of packages that depend on that package."
- (fold-packages
- (lambda (package dag)
- (fold
- (lambda (in d)
- ;; Insert a graph edge from each of package's inputs to package.
- (vhash-consq in
- (cons package (vhash-refq d in '()))
- (vhash-delq in d)))
- dag
- (match (package-direct-inputs package)
- (((labels packages . _) ...)
- packages) )))
- vlist-null))))
-
-(define (package-direct-dependents packages)
- "Return a list of packages from the distribution that directly depend on the
-packages in PACKAGES."
- (delete-duplicates
- (concatenate
- (map (lambda (p)
- (vhash-refq (package-dependencies) p '()))
- packages))))
-
-(define (package-transitive-dependents packages)
- "Return the transitive dependent packages of the distribution packages in
-PACKAGES---i.e. the dependents of those packages, plus their dependents,
-recursively."
- (let ((dependency-dag (package-dependencies)))
- (fold-tree
- cons '()
- (lambda (node) (vhash-refq dependency-dag node))
- ;; Start with the dependents to avoid including PACKAGES in the result.
- (package-direct-dependents packages))))
-
-(define (package-covering-dependents packages)
- "Return a minimal list of packages from the distribution whose dependencies
-include all of PACKAGES and all packages that depend on PACKAGES."
- (let ((dependency-dag (package-dependencies)))
- (fold-tree-leaves
- cons '()
- (lambda (node) (vhash-refq dependency-dag node))
- ;; Start with the dependents to avoid including PACKAGES in the result.
- (package-direct-dependents packages))))
-
-
(define %sigint-prompt
;; The prompt to jump to upon SIGINT.
(make-prompt-tag "interruptible"))