Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Guix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ogs
inf
Guix
Commits
38d27786
Commit
38d27786
authored
May 19, 2015
by
Ludovic Courtès
Browse files
Options
Downloads
Patches
Plain Diff
guix gc: Add '--optimize'.
* guix/scripts/gc.scm (show-help, %options): Add --optimize. (guix-gc): Handle it.
parent
e3fd0ce6
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/guix.texi
+11
-0
11 additions, 0 deletions
doc/guix.texi
guix/scripts/gc.scm
+9
-1
9 additions, 1 deletion
guix/scripts/gc.scm
with
20 additions
and
1 deletion
doc/guix.texi
+
11
−
0
View file @
38d27786
...
...
@@ -1472,6 +1472,17 @@ Attempt to delete all the store files and directories specified as
arguments. This fails if some of the files are not in the store, or if
they are still live.
@item --optimize
@cindex deduplication
Optimize the store by hard-linking identical files---this is
@dfn
{
deduplication
}
.
The daemon performs deduplication after each successful build or archive
import, unless it was started with @code
{
--disable-deduplication
}
(@pxref
{
Invoking guix-daemon, @code
{
--disable-deduplication
}}
). Thus,
this option is primarily useful when the daemon was running with
@code
{
--disable-deduplication
}
.
@item --list-dead
Show the list of dead files and directories still present in the
store---i.e., files and directories no longer reachable from any root.
...
...
This diff is collapsed.
Click to expand it.
guix/scripts/gc.scm
+
9
−
1
View file @
38d27786
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2012, 2013
, 2015
Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
...
...
@@ -43,6 +43,8 @@ (define (show-help)
collect at least MIN bytes of garbage"
))
(
display
(
_
"
-d, --delete attempt to delete PATHS"
))
(
display
(
_
"
--optimize optimize the store by deduplicating identical files"
))
(
display
(
_
"
--list-dead list dead paths"
))
(
display
(
_
"
...
...
@@ -88,6 +90,10 @@ (define %options
(
lambda
(
opt
name
arg
result
)
(
alist-cons
'action
'delete
(
alist-delete
'action
result
))))
(
option
'
(
"optimize"
)
#f
#f
(
lambda
(
opt
name
arg
result
)
(
alist-cons
'action
'optimize
(
alist-delete
'action
result
))))
(
option
'
(
"list-dead"
)
#f
#f
(
lambda
(
opt
name
arg
result
)
(
alist-cons
'action
'list-dead
...
...
@@ -169,6 +175,8 @@ (define (list-relatives relatives)
(
list-relatives
requisites
))
((
list-referrers
)
(
list-relatives
referrers
))
((
optimize
)
(
optimize-store
store
))
((
list-dead
)
(
for-each
(
cut
simple-format
#t
"~a~%"
<>
)
(
dead-paths
store
)))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment