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
ef599e69
Commit
ef599e69
authored
May 02, 2020
by
Eric Timmons
Browse files
Loading anonymous contexts now syncs sources if needed
parent
1a5027d6
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/clpm/bundle.lisp
View file @
ef599e69
...
...
@@ -36,14 +36,8 @@
(
when
override
(
merge-pathnames
override
clpmfile-directory
))))))
(
defun
load-lockfile
(
pathname
&key
localp
)
(
handler-bind
((
source-no-such-object
(
lambda
(
c
)
(
when
(
and
(
find-restart
'sync-and-retry
)
(
not
localp
))
(
log:info
"Syncing source and retrying"
)
(
invoke-restart
'sync-and-retry
c
)))))
(
load-anonymous-context-from-pathname
pathname
)))
(
defun
load-lockfile
(
pathname
)
(
load-anonymous-context-from-pathname
pathname
))
(
defun
bundle-install
(
clpmfile-designator
&key
(
validate
(
constantly
t
)))
"Given a clpmfile instance, install all releases from its lock file, creating
...
...
@@ -59,7 +53,7 @@ the lock file if necessary."
(
unless
(
source-can-lazy-sync-p
s
)
(
sync-source
s
))))
(
if
(
probe-file
lockfile-pathname
)
(
setf
lockfile
(
load-lockfile
lockfile-pathname
:localp
(
config-value
:local
)
))
(
setf
lockfile
(
load-lockfile
lockfile-pathname
))
(
setf
lockfile
(
create-empty-lockfile
clpmfile
)))
;; Nuke the lockfile's requirements so that we pick up deletions from the
;; clpmfile.
...
...
@@ -85,7 +79,7 @@ the lock file if necessary."
lockfile
)
(
unless
(
probe-file
lockfile-pathname
)
(
error
"Lockfile ~A does not exist"
lockfile-pathname
))
(
setf
lockfile
(
load-lockfile
lockfile-pathname
:localp
t
))
(
setf
lockfile
(
load-lockfile
lockfile-pathname
))
(
unless
ignore-missing-releases
(
let*
((
releases
(
context-releases
lockfile
))
(
missing-releases
(
remove-if
#'
release-installed-p
releases
)))
...
...
@@ -111,7 +105,7 @@ the lock file if necessary."
(
return-from
bundle-update
(
bundle-install
clpmfile
:validate
validate
)))
;; Load the existing lockfile
(
setf
lockfile
(
load-lockfile
lockfile-pathname
:localp
(
config-value
:local
)
))
(
setf
lockfile
(
load-lockfile
lockfile-pathname
))
(
unless
(
config-value
:local
)
(
dolist
(
s
(
clpmfile-sources
clpmfile
))
(
unless
(
source-can-lazy-sync-p
s
)
...
...
src/clpm/context.lisp
View file @
ef599e69
...
...
@@ -428,6 +428,8 @@ in place with the same name. Return the new requirement if it was modified."
(
when
(
typep
source
'fs-source
)
(
push
(
project-release
(
source-project
source
:all
)
:newest
)
(
context-releases
context
)))
(
unless
(
or
(
source-can-lazy-sync-p
source
)
(
config-value
:local
))
(
sync-source
source
))
(
setf
(
context-sources
context
)
(
append
(
context-sources
context
)
(
list
source
)))))
(
defun
load-context-from-stream
(
stream
&key
pathname
(
sources
nil
sources-provided-p
))
...
...
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