Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
clpm
clpm
Commits
06d1a4d8
Commit
06d1a4d8
authored
Feb 13, 2020
by
Eric Timmons
Browse files
Only sync a source once per run of CLPM
parent
af4881fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/clpm/sources/defs.lisp
View file @
06d1a4d8
...
...
@@ -114,7 +114,9 @@
;; * Sources
(
defclass
clpm-source
()
()
((
synced-p
:initform
nil
:accessor
source-synced-p
))
(
:documentation
"Base class for any CLPM source. A source contains projects
and systems."
))
...
...
@@ -165,6 +167,9 @@ source implementation should provide a ~sync-and-retry~ restart.")
(
when
project
(
project-release
project
version-string
error
)))))
(
defgeneric
source-synced-p
(
source
)
(
:documentation
"Return T iff the source has been synced already."
))
(
defgeneric
source-system
(
source
system-name
&optional
error
)
(
:documentation
"Return an instance of CLPM-SYSTEM. If the system is not
located in the source and ERROR is T (default), signals an error of type
...
...
@@ -184,8 +189,10 @@ initargs and a :type as a keyword."))
(
defgeneric
sync-source
(
source
)
(
:documentation
"Synchronize the local source metadata with the upstream
metadata. Returns T if the local data has changed, NIL otherwise."
))
metadata. Returns T if the local data has changed, NIL otherwise."
)
(
:method
:around
(
source
)
(
multiple-value-prog1
(
unless
(
source-synced-p
source
)
(
call-next-method
))
(
setf
(
source-synced-p
source
)
t
))))
;; * Systems
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment