summaryrefslogtreecommitdiff
path: root/guix/upstream.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2023-05-17 16:58:59 +0200
committerLudovic Courtès <ludo@gnu.org>2023-05-31 23:25:25 +0200
commitcd262c403ff2bbd282cf4734a0819d10ad40845e (patch)
treea79b2bf566f7349e735a63b9d39b5c6a27181488 /guix/upstream.scm
parentec0a2fc87bd651ebc8f253f6369ba4485912d9b2 (diff)
upstream: Remove <upstream-input-change> and related code.
* guix/upstream.scm (<upstream-input-change>): Remove. (changed-inputs): Remove. * tests/upstream.scm (test-package, test-new-package) ("changed-inputs returns no changes") ("changed-inputs returns changes to plain input list") ("changed-inputs returns changes to all plain input lists"): Remove.
Diffstat (limited to 'guix/upstream.scm')
-rw-r--r--guix/upstream.scm64
1 files changed, 0 insertions, 64 deletions
diff --git a/guix/upstream.scm b/guix/upstream.scm
index 7d9ae70eda..53e473715c 100644
--- a/guix/upstream.scm
+++ b/guix/upstream.scm
@@ -82,12 +82,6 @@
upstream-updater-predicate
upstream-updater-import
- upstream-input-change?
- upstream-input-change-name
- upstream-input-change-type
- upstream-input-change-action
- changed-inputs
-
%updaters
lookup-updater
@@ -151,64 +145,6 @@ its inputs that have the given TYPE (a symbol such as 'native)."
(define upstream-source-native-inputs (input-type-filter 'native))
(define upstream-source-propagated-inputs (input-type-filter 'propagated))
-;; Representation of an upstream input change.
-(define-record-type* <upstream-input-change>
- upstream-input-change make-upstream-input-change
- upstream-input-change?
- (name upstream-input-change-name) ;string
- (type upstream-input-change-type) ;symbol: regular | native | propagated
- (action upstream-input-change-action)) ;symbol: add | remove
-
-(define (changed-inputs package source)
- "Return a list of input changes for PACKAGE compared to the 'inputs' field
-of SOURCE, an <upstream-source> record."
- (define input->name
- (match-lambda
- ((label (? package? pkg) . out) (package-name pkg))
- (_ #f)))
-
- (if (upstream-source-inputs source)
- (let* ((new-regular (map upstream-input-downstream-name
- (upstream-source-regular-inputs source)))
- (new-native (map upstream-input-downstream-name
- (upstream-source-native-inputs source)))
- (new-propagated (map upstream-input-downstream-name
- (upstream-source-propagated-inputs source)))
- (current-regular
- (filter-map input->name (package-inputs package)))
- (current-native
- (filter-map input->name (package-native-inputs package)))
- (current-propagated
- (filter-map input->name (package-propagated-inputs package))))
- (append-map
- (match-lambda
- ((action type names)
- (map (lambda (name)
- (upstream-input-change
- (name name)
- (type type)
- (action action)))
- names)))
- `((add regular
- ,(lset-difference equal?
- new-regular current-regular))
- (remove regular
- ,(lset-difference equal?
- current-regular new-regular))
- (add native
- ,(lset-difference equal?
- new-native current-native))
- (remove native
- ,(lset-difference equal?
- current-native new-native))
- (add propagated
- ,(lset-difference equal?
- new-propagated current-propagated))
- (remove propagated
- ,(lset-difference equal?
- current-propagated new-propagated)))))
- '()))
-
(define* (url-predicate matching-url?)
"Return a predicate that returns true when passed a package whose source is
an <origin> with the URL-FETCH method, and one of its URLs passes