Skip to content

Commit 0bace84

Browse files
committed
Rename -C --upgrade to --sysupgrade and -Lu to -Ly
1 parent 19fd836 commit 0bace84

8 files changed

Lines changed: 20 additions & 12 deletions

File tree

‎completions/bash‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ _paru() {
8181

8282
show=('news stats' 'w s')
8383
getpkgbuild=('print comments' 'p c')
84-
chrootctl=('upgrade install' 'u i')
85-
repoctl=('quiet list delete' 'q l d')
84+
chrootctl=('sysupgrade install' 'u i')
85+
repoctl=('quiet list delete refresh' 'q l d y')
8686

8787
for o in 'D database' 'F files' 'Q query' 'R remove' 'S sync' 'U upgrade' 'P show' 'G getpkgbuild' 'C chrootctl' 'L repoctl'; do
8888
_arch_incomp "$o" && break

‎completions/fish‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,11 @@ complete -c $progname -n "$getpkgbuild" -xa "$listall"
178178
complete -c $progname -n "$repoctl" -s l -l list -d 'List packages in local repos' -f
179179
complete -c $progname -n "$repoctl" -s d -l delete -d 'Remove a package from the local repo' -f
180180
complete -c $progname -n "$repoctl" -s q -l quiet -d 'Show less information' -f
181+
complete -c $progname -n "$repoctl" -s y -l refresh -d 'Refresh local repos' -f
181182

182183
# Chrootctl options
183184
complete -c $progname -n "$chrootctl" -s l -l install -d 'Install a package into the chroot' -f
184-
complete -c $progname -n "$chrootctl" -s u -l upgrade -d 'Upgrade the chroot' -f
185+
complete -c $progname -n "$chrootctl" -s u -l sysupgrade -d 'Upgrade the chroot' -f
185186

186187
# New options
187188
complete -c $progname -n "not $noopt" -l repo -d 'Assume targets are from the repositories' -f

‎completions/zsh‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,13 @@ _pacman_opts_repoctl_modifiers=(
167167
{-l,--list}'[List packages in local repos]'
168168
{-d,--delete}"[Remove a package from the local repo]"
169169
{-q,--quiet}'[Show less information]'
170+
{-y,--refresh}'[Refresh local repos]'
170171
)
171172

172173
# -L
173174
_pacman_opts_chrootctl_modifiers=(
174175
{-i,--install}'[Install a package into the chroot]'
175-
{-u,--upgrade}'[Upgrade the chroot]'
176+
{-u,--sysupgrade}'[Upgrade the chroot]'
176177
)
177178

178179
# -P

‎man/paru.8‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,10 @@ List packages in local repos
205205
Remove a package from the local repo.
206206
Pass this twice to also uninstall the package.
207207

208+
.TP
209+
.B \-y, \-\-refresh
210+
Refresh local repos.
211+
208212
.TP
209213
.B \-q, \-\-quiet
210214
Show less information.
@@ -215,7 +219,7 @@ Show less information.
215219
Install a package into the chroot.
216220

217221
.TP
218-
.B \-u, \-\-upgrade
222+
.B \-u, \-\-sysupgrade
219223
Upgrade the chroot.
220224

221225
.SH UPGRADE OPTIONS (APPLY TO \-U AND \-\-UPGRADE)

‎src/command_line.rs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,8 @@ impl Config {
260260
self.comments = true;
261261
}
262262
Arg::Long("install") | Arg::Short('i') => self.install = true,
263-
Arg::Long("update") | Arg::Short('u') => self.update = true,
263+
Arg::Long("sysupgrade") | Arg::Short('u') => self.sysupgrade = true,
264+
Arg::Long("refresh") | Arg::Short('y') => self.refresh = true,
264265
Arg::Long("quiet") | Arg::Short('q') => self.quiet = true,
265266
Arg::Long("list") | Arg::Short('l') => self.list = true,
266267
Arg::Long("delete") | Arg::Short('d') => self.delete += 1,

‎src/config.rs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,8 @@ pub struct Config {
438438
pub chroot: bool,
439439
pub install: bool,
440440
pub uninstall: bool,
441-
pub update: bool,
441+
pub sysupgrade: bool,
442+
pub refresh: bool,
442443
pub quiet: bool,
443444
pub list: bool,
444445
pub delete: u32,

‎src/lib.rs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ fn handle_repo(config: &mut Config) -> Result {
290290
.filter(|r| config.delete >= 1 || config.targets.is_empty() || config.targets.contains(r))
291291
.collect::<Vec<_>>();
292292

293-
if config.update {
293+
if config.refresh {
294294
repo::refresh(config, &repos)?;
295295
}
296296

@@ -380,7 +380,7 @@ fn handle_repo(config: &mut Config) -> Result {
380380
return Ok(0);
381381
}
382382

383-
if config.update {
383+
if config.refresh {
384384
return Ok(0);
385385
}
386386

@@ -455,15 +455,15 @@ fn handle_chroot(config: &Config) -> Result {
455455
chroot.create(config, &["base-devel"])?;
456456
}
457457

458-
if config.update {
458+
if config.sysupgrade {
459459
chroot.update()?;
460460
}
461461

462462
if config.install {
463463
let mut args = vec!["pacman", "-S"];
464464
args.extend(config.targets.iter().map(|s| s.as_str()));
465465
chroot.run(&args)?;
466-
} else if !config.update || !config.targets.is_empty() {
466+
} else if !config.sysupgrade || !config.targets.is_empty() {
467467
chroot.run(&config.targets)?;
468468
}
469469
Ok(0)

‎src/repo.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ pub fn refresh>(config: &mut Config, repos: &[S]) -> Result
172172

173173
cmd.arg("--dbpath")
174174
.arg(config.alpm.dbpath())
175-
.arg("-Lu")
175+
.arg("-Ly")
176176
.args(repos);
177177

178178
let status = cmd.spawn()?.wait()?;

0 commit comments

Comments
 (0)