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
0020d1ac
Commit
0020d1ac
authored
Oct 26, 2018
by
Eric Timmons
Browse files
Remove osicat
parent
4b99399b
Changes
7
Hide whitespace changes
Inline
Side-by-side
clpm-licenses.asd
View file @
0020d1ac
...
...
@@ -28,7 +28,6 @@
(
:static-file
"log4cl"
)
(
:static-file
"log4cl.NOTICE"
)
(
:static-file
"named-readtables"
)
(
:static-file
"osicat"
)
(
:static-file
"puri"
)
(
:static-file
"sbcl"
)
(
:static-file
"split-sequence"
)
...
...
osicat
@
9cc248c0
Compare
9cc248c0
...
9cc248c0
Subproject commit 9cc248c09325c55ae05b3933b9292e8a14e69718
licenses/osicat
deleted
120000 → 0
View file @
4b99399b
../ext/osicat/LICENSE
\ No newline at end of file
src/clpm/cli/bundle/common.lisp
View file @
0020d1ac
...
...
@@ -11,8 +11,6 @@
#:getopt
#:remainder
#:help
)
(
:import-from
#:osicat
#:environment
)
(
:export
#:*bundle-arguments*
#:define-bundle-entry
))
...
...
@@ -72,7 +70,13 @@
(
register-command
"bundle"
'cli-bundle
)
(
defun
merge-git-auth-config
()
(
let*
((
env
(
environment
))
(
let*
((
env
(
mapcar
(
lambda
(
x
)
(
let*
((
split
(
uiop:split-string
(
reverse
x
)
:max
2
:separator
'
(
#\=
)))
(
name
(
reverse
(
second
split
)))
(
value
(
reverse
(
first
split
))))
(
cons
name
value
)))
(
sb-ext:posix-environ
)))
(
git-auth-vars
(
remove-if-not
(
curry
#'
starts-with-subseq
"CLPM_BUNDLE_GIT_AUTH_"
)
env
:key
#'
car
))
(
ht
(
make-hash-table
:test
'equal
...
...
src/clpm/execvpe.lisp
View file @
0020d1ac
...
...
@@ -2,8 +2,6 @@
(
:use
#:cl
#:alexandria
#:cffi
)
(
:import-from
#:osicat
#:environment
)
(
:export
#:execvpe
))
(
in-package
#:clpm/execvpe
)
...
...
@@ -14,9 +12,12 @@
(
envp
:pointer
))
(
defun
execvpe
(
file
args
env
&optional
augment-env-p
)
(
let
((
env
(
append
env
(
when
augment-env-p
(
environment
)))))
(
let*
((
env
(
mapcar
(
lambda
(
c
)
(
concatenate
'string
(
car
c
)
"="
(
cdr
c
)))
env
))
(
new-env
(
append
env
(
when
augment-env-p
(
sb-ext:posix-environ
)))))
(
with-foreign-objects
((
foreign-args
:pointer
(
+
2
(
length
args
)))
(
foreign-env
:pointer
(
+
1
(
length
env
))))
(
foreign-env
:pointer
(
+
1
(
length
new-
env
))))
;; pack the args into foreign memory
(
setf
(
mem-aref
foreign-args
:pointer
0
)
(
foreign-string-alloc
file
))
...
...
@@ -32,10 +33,10 @@
;; pack the environment variables into foreign memory
(
loop
:for
i
:upfrom
0
:for
(
var-name
.
var-value
)
:in
env
:for
assignment
:in
new-
env
:do
(
setf
(
mem-aref
foreign-env
:pointer
i
)
(
foreign-string-alloc
(
concatenate
'string
var-name
"="
var-value
)
)))
(
setf
(
mem-aref
foreign-env
:pointer
(
length
env
))
(
foreign-string-alloc
assignment
)))
(
setf
(
mem-aref
foreign-env
:pointer
(
length
new-
env
))
(
null-pointer
))
(
%execvpe
file
foreign-args
foreign-env
))))
src/clpm/fetch.lisp
View file @
0020d1ac
...
...
@@ -8,9 +8,6 @@
(
:import-from
#:uiop
#:read-file-form
#:with-safe-io-syntax
)
#-
os-windows
(
:import-from
#:osicat
#:file-permissions
)
(
:export
#:ensure-file-fetched
#:fetch-url
))
...
...
@@ -23,8 +20,11 @@
#-
os-windows
(
defun
pathname-executable-p
(
pathname
)
(
intersection
'
(
:user-exec
:group-exec
:other-exec
)
(
file-permissions
pathname
)))
(
let*
((
stat
(
sb-posix:stat
pathname
))
(
mode
(
sb-posix:stat-mode
stat
)))
(
or
(
not
(
zerop
(
boole
boole-and
mode
sb-posix:s-ixoth
)))
(
not
(
zerop
(
boole
boole-and
mode
sb-posix:s-ixgrp
)))
(
not
(
zerop
(
boole
boole-and
mode
sb-posix:s-ixusr
))))))
#+
os-windows
(
defun
pathname-executable-p
(
pathname
)
...
...
src/clpm/utils.lisp
View file @
0020d1ac
(
uiop:define-package
#:clpm/utils
(
:use
#:cl
)
(
:import-from
#:osicat
)
(
:export
#:run-program-augment-env-args
))
(
in-package
#:clpm/utils
)
...
...
@@ -9,9 +8,9 @@
"Given an alist of environment variables, return a list of arguments suitable
for uiop:{launch/run}-program to set the augmented environment for the child
process."
(
let
((
env
(
append
new-env-alist
(
osicat:environment
))))
(
let
((
env
(
append
(
mapcar
(
lambda
(
c
)
(
concatenate
'string
(
car
c
)
"="
(
cdr
c
)))
new-env-alist
)
(
sb-ext:posix-environ
))))
#-
sbcl
(
error
"not implemented"
)
(
list
:environment
(
mapcar
(
lambda
(
cons
)
(
concatenate
'string
(
car
cons
)
"="
(
cdr
cons
)))
env
))))
(
list
:environment
env
)))
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