Compare commits

..

5 Commits
main ... v4.0.1

Author SHA1 Message Date
Fries 4f63f62a29 amethyst: bump to version v4.0.1 2 years ago
Fries 0a30bb99ae operations/clean: remove unused import 2 years ago
Fries 41b150227c amethyst: add my name to the authors 2 years ago
Fries bf2b9fb39a operations/clean: make sure paccache keeps 3 pkgs
looks like .pacnew files don't generate properly unless theres like 3
packages in the pacman cache. why is pacman so confusing i swear nobody
knows how it works. well anyways this commit also removes the config
keys `paccache_keep` and `paccache_keep_ins_pkgs` as they shouldnt be
able to be changed.
2 years ago
mrshmllow c65331d527 Update docs url 2 years ago

@ -0,0 +1,34 @@
name: Lint Code
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
AMETHYST_CODENAME: "Clippedy Clip"
jobs:
formatting:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt
- name: Format
uses: actions-rust-lang/rustfmt@v1.0.0
clippy:
name: cargo clippy
runs-on: ubuntu-latest
container: ghcr.io/crystal-linux/crystal:latest
steps:
- uses: actions/checkout@v1
- run: |
sudo pacman -Syu --needed --noconfirm
sudo pacman -S --noconfirm rust
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

@ -1,19 +0,0 @@
image: "archlinux:latest"
cargo:version:
before_script:
- pacman -Sy rust base-devel openssl-1.1 --noconfirm
script:
- rustc --version && cargo --version
cargo:clippy:
before_script:
- pacman -Sy rust base-devel openssl-1.1 --noconfirm
script:
- cargo clippy --no-deps -- -D clippy::all
cargo:fmt:
before_script:
- pacman -Sy rust base-devel openssl-1.1 --noconfirm
script:
- cargo fmt --check

@ -1,4 +0,0 @@
{
"editor.tabCompletion": "on",
"diffEditor.codeLens": true
}

1077
Cargo.lock generated

File diff suppressed because it is too large Load Diff

@ -1,6 +1,6 @@
[package]
name = "Amethyst"
version = "4.1.0"
version = "4.0.1"
authors = ["Michal S. <michal@tar.black>", "axtlos <axtlos@tar.black>", "trivernis <trivernis@protonmail.com>", "Fries <fries@tar.black>"]
description = "A fast and efficient AUR helper"
repository = "https://github.com/crystal-linux/amethyst"
@ -10,9 +10,6 @@ categories = ["command-line-utilities"]
default-run = "ame"
edition = "2021"
[package.metadata]
codename = "Disco Duck"
[[bin]]
name = "ame"
path = "src/main.rs"
@ -20,7 +17,7 @@ path = "src/main.rs"
[profile.release]
incremental = true
debug = false
lto = "thin"
lto = "fat"
codegen-units = 1
[profile.dev]
@ -33,35 +30,32 @@ alpm-utils = "2.0.0"
pacmanconf = "2.0.0"
chrono = { version = "0.4.22", default-features = false, features = [ "clock", "std", "wasmbind" ] }
trigram = "0.4.4"
clap = { version = "4.0.19", features = [ "derive", "wrap_help" ] }
regex = { version = "1.7.0", default-features = false, features = [ "std", "unicode-perl" ] }
clap = { version = "3.2.17", features = [ "derive", "wrap_help" ] }
regex = { version = "1.6.0", default-features = false, features = [ "std", "unicode-perl" ] }
colored = "2.0.0"
serde = { version = "1.0.147", default-features = false, features = [ "derive", "serde_derive" ] }
serde = { version = "1.0.144", default-features = false, features = [ "derive", "serde_derive" ] }
native-tls = { version = "0.2.10", default-features = false }
libc = { version = "0.2.137", default-features = false }
aur-rpc = { version = "0.2.2", default-features = false, features = ["rustls-tls"] }
futures = "0.3.25"
tracing = "0.1.37"
tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }
textwrap = "0.16.0"
libc = { version = "0.2.132", default-features = false }
async-recursion = "1.0.0"
aur-rpc = "0.2.0"
futures = "0.3.23"
tracing = "0.1.36"
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
textwrap = "0.15.0"
crossterm = "0.25.0"
toml = "0.5.9"
clap_complete = "4.0.3"
clap_complete_fig = "4.0.1"
clap_complete = "3.2.4"
clap_complete_fig = "3.2.4"
color-eyre = { version = "0.6.2", features = ["issue-url", "url"] }
indicatif = { version = "0.17.1", features = ["tokio"] }
indicatif = { version = "0.17.0", features = ["tokio"] }
lazy_static = "1.4.0"
parking_lot = { version = "0.12.1", features = ["deadlock_detection"] }
dialoguer = { version = "0.10.2", features = ["fuzzy-select"] }
lazy-regex = "2.3.1"
lazy-regex = "2.3.0"
directories = "4.0.1"
console = "0.15.2"
console = "0.15.1"
tracing-error = "0.2.0"
fuzzy-matcher = "0.3.7"
i18n-embed = { version = "0.13.4", features = ["fluent-system", "desktop-requester"] }
i18n-embed-fl = "0.6.4"
thiserror = "1.0.37"
rust-embed = "6.4.2"
[dependencies.config]
version = "0.13.2"
@ -69,8 +63,4 @@ features = ["toml"]
[dependencies.tokio]
version = "1.21.0"
features = ["process", "macros", "rt-multi-thread", "tracing"]
[build-dependencies]
cargo_toml = "0.13.0"
serde = { version = "1.0.147", features = ["derive"] }
features = ["rt", "rt-multi-thread", "io-std", "io-util", "process", "time", "macros", "tracing", "fs"]

@ -1,90 +1,73 @@
# Amethyst
Amethyst is a fast, efficient and lightweight AUR helper and Pacman wrapper.
<p align="center">
<a href="https://github.com/crystal-linux/amethyst/">
<img src="./logo.svg" alt="Logo" width="150" height="150">
</a>
</p>
<h2 align="center">Amethyst</h2>
<p align="center">
<a href="https://github.com/crystal-linux/amethyst"><img src="https://github.com/crystal-linux/amethyst/actions/workflows/test.yml/badge.svg"></a><br>
<a href="https://github.com/crystal-linux/.github/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-GPL--3.0-blue.svg" alt="License"></a>
<a href="https://github.com/crystal-linux/amethyst/issues"><img alt="GitHub issues" src="https://img.shields.io/github/issues-raw/crystal-linux/amethyst"></a>
<a href="https://github.com/crystal-linux/amethyst/pulls"><img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr-raw/crystal-linux/amethyst"></a><br>
<a href="https://discord.gg/hYJgu8K5aA"><img alt="Discord" src="https://img.shields.io/discord/825473796227858482?color=blue&label=Discord&logo=Discord&logoColor=white"> </a>
<a href="https://github.com/not-my-segfault"><img src="https://img.shields.io/badge/Maintainer-@not%2D-my%2D-segfault-brightgreen" alt="The maintainer of this repository" href="https://github.com/not-my-segfault"></a><br>
<a href="https://fosstodon.org/@crystal_linux"><img alt="Mastodon Follow" src="https://img.shields.io/mastodon/follow/108618426259408142?domain=https%3A%2F%2Ffosstodon.org"></a>
<a href="https://twitter.com/crystal_linux"><img alt="Twitter Follow" src="https://img.shields.io/twitter/follow/crystal_linux"></a>
</p>
<p align="center">
Amethyst is a fast, efficient and lightweight AUR helper and Pacman wrapper.<br>
Made for Crystal, compatible with any Arch-based Linux distribution.
</p>
## 💡 Features
- Fast and efficient!
- Asynchronous!
- Customizable!
- Parallel package building
- Install and search packages from the AUR and any added repositories
## 📚 Documentation
Documentation for this project is available [here](https://getcryst.al/site/docs/amethyst/getting-started)!
## 💾 Installation
> On Crystal Linux, Amethyst comes pre-installed.
### 💽 From Binary
**Install amethyst using `cargo`**
```bash
$ cargo install --path .
$ ame help
```
### 🏗 From Source
**Install amethyst from source using `cargo`**
Debug/development builds
```bash
$ git clone https://git.getcryst.al/crystal/software/amethyst.git && cd amethyst
$ cargo build
$ cargo run
```
Optimised/release builds
```bash
$ git clone https://git.getcryst.al/crystal/software/amethyst.git && cd amethyst
$ cargo install --path .
```
Install on non-Crystal distros
```bash
sudo pacman -S --needed base-devel pacman-contrib cargo
git clone https://git.getcryst.al/crystal/pkgbuilds/ame
cd ame && makepkg -si
```
Amethyst is also available as an [AUR package](https://aur.archlinux.org/packages/ame)!
## 📸 Screenshots
![App Screenshot](/screenshot.png)
## 🙌 Contributing
### Basic usage
If you'd like to contribute to **amethyst**, please follow the [Crystal Linux contributing guidelines](https://git.getcryst.al/crystal/info/-/blob/main/CONTRIBUTING.md)!
| Action | FreeBSD pkg-style alias | Pacman-style flags |
|------------------------|-------------------------|--------------------|
| Install a package | ame ins/install | ame -S |
| Remove a package | ame rm/remove | ame -R/-Rs |
| Upgrade a package | ame upg/upgrade | ame -Syu |
| Search for a package | ame sea/search | ame -Ss |
| Query the package list | ame qu/query | ame -Q |
| Show a package's info | ame inf/info | ame -Qi |
| Clean the pacman cache | ame cl/clean | ame -Sc |
| Check for .pacnew | ame di/diff | ame -D |
This project uses `rustup`, to set up `rust` for **amethyst** development, please follow the guidelines below:
### Exit codes overview
```bash
$ curl https://sh.rustup.rs -sSf | sh
$ rustup default stable
```
| Exit Code (i32) | Reason |
|-----------------|----------------------------------------------------------|
| 1 | Running ame as UID 0 / root |
| 2 | Failed creating paths |
| 3 | Could not find one or more required package dependencies |
| 4 | User cancelled package installation |
| 5 | Pacman error when installing package |
| 6 | Git error |
| 7 | Makepkg error |
| 8 | Failed to parse config file |
| 63 | Any other misc error |
(Via [rustup.rs](https://rustup.rs/))
### Install on non-Crystal distros
- `sudo pacman -S --needed base-devel pacman-contrib cargo`
- `git clone https://github.com/crystal-linux/pkgbuild.amethyst`
- `cd pkgbuild.amethyst && makepkg -si`
We are also constantly looking for translators for our i18n-enabled projects! If you speak more than one language, consider helping out on our [Weblate](https://i18n.getcryst.al)!
<br>
![https://i18n.getcryst.al/engage/crystal-linux/](https://i18n.getcryst.al/widgets/crystal-linux/-/287x66-black.png)
#### Debug/development builds
- `cargo build`
## 📜 License
#### Optimised/release builds
[GPLv3-only](https://choosealicense.com/licenses/gpl-3.0/)
- `cargo build --release`
![](https://git.getcryst.al/crystal/misc/branding/-/raw/main/banners/README-banner.png)
### TODO:
#### v3.6.0
- ~~Allow editing of PKGBUILDs before install~~
<!--

@ -1,20 +0,0 @@
use serde::Deserialize;
use std::path::PathBuf;
use cargo_toml::Manifest;
#[derive(Clone, Debug, Deserialize)]
struct Metadata {
codename: String,
}
fn main() {
let manifest = Manifest::<Metadata>::from_path_with_metadata(PathBuf::from("Cargo.toml"))
.expect("Failed to read manifest (Cargo.toml)");
if let Some(package) = manifest.package {
if let Some(metadata) = package.metadata {
println!("cargo:rustc-env=AMETHYST_CODENAME={}", metadata.codename);
}
}
}

@ -0,0 +1,17 @@
# Config Keys
## [base]
| Key | Description | Default |
| --- | --- | --- |
| `pacdiff_warn` | Whether to warn the user about `vimdiff` for `pacdiff` | `true` |
## [extra]
| Key | Description | Default |
| --- | --- | --- |
| `uwu` | Makes Amethyst's output... "cuter" | `false` |
| `uwu_debug` | Makes debug and traces `uwu`ed. Please never send us debug logs with this enabled. | `false` |
## [bin]
| Key | Description | Default |
| --- | --- | --- |
| `sudo` | The path to use for `sudo` (or any `sudo`-likes) | `'sudo'` |

@ -49,9 +49,6 @@
];
# For rust-analyzer
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
# Amethyst codename
AMETHYST_CODENAME = "Nixilicious";
};
formatter = pkgs.alejandra;

@ -1,4 +0,0 @@
fallback_language = "en"
[fluent]
assets_dir = "i18n"

@ -1,9 +0,0 @@
# used across files
exiting = الخروج
continue = إكمال؟
system-upgrade = نقوم بترقية النظام
missing-deps = التبعيات مفقودة
are-you-sure = هل أنت متأكد أنك تريد الإكمال؟
no-results = لم يتم العثور علي نتائج
results = النتائج:
installed-packages = الحزم المثبتة:

@ -1,169 +0,0 @@
# used across files
exiting = Schließt...
packages =
{ $pkgNum ->
[one] Paket
*[other] Pakete
}
missing-deps = Fehlende Paketabhängigkeiten
continue = Wollen Sie fortfahren?
# main
run-as-root = Amethyst mit root Berechtigungen auszuführen ist nicht erlaubt und kann zu korrupten Systemen führen. Amethyst wird nach root Berechtigungen fragen, wenn diese nötig sein sollten.
following-packages = Folgende Pakete wurden in dem AUR gefunden:
aur-warning =
Die AUR ist eine Plattform, welche von der Community verwaltete Pakete zur Verfügung stellt und die Sicherheit eines Paketes nicht gewährleisten kann.
Es wird empfohlen, die PKGBUILD-Dateien der Pakete zu überprüfen, bevor Sie diese Pakete installieren, da manche PKGBUILD-Dateien gefährlich sein könnten.
Diese Warnung kann in der Konfigurationsdatei dekativiert werden.
are-you-sure = Sie sich sicher, dass Sie fortfahren möchten?
uninstalling-packages = Folgende Pakete werden deinstalliert: { $packages }
system-upgrade = Führe Systemaktualisierung durch
removing-orphans = Deinstalliere nicht benötigte Pakete
couldnt-find-packages = Folgende Pakete wurden nicht in den Pacman-Paketquellen oder der AUR gefunden: { $packages }
searching-repos = Durchsuche Paketquellen nach { $query }
searching-aur = Durchsuche AUR nach { $query }
no-results = Keine Ergebnisse gefunden
results = Ergebnisse:
installed-repo-packages = Aus den Pacman-Paketquellen installierte Pakete:
installed-aur-packages = Aus der AUR installierte Pakete:
installed-packages = Installierte Pakete:
invalid-shell = Nicht unterstützte Shell: { $shell }
zsh-error = ZSH shell Vervollständigung werden zurzeit nicht vom clap_completion crate unterstützt
# operations::clean
no-orphans = Keine nicht benötigten Pakete gefunden
removing-orphans-would =
Das entfernen von nicht benötigten Paketen wird folgende Pakete entfernen:
{ $packages }
failed-remove-orphans = Nicht benötigte Pakete konnten nicht entfernt werden
success-remove-orphans = Nicht benötigte Pakete wurden erfolgreich entfernt
clear-pkgbuild-cache = Amethysts internen Paketcache leeren?
clear-pacman-cache = Pacmans Paketcache leeren?
failed-clear-cache = Paketcache konnte nicht geleert werden, { $error }
success-clear-cache = Paketcache wurde erfolgreich geleert
# operations::install
installing-packages-from-repos = Die Pakete { $packages } werden von den Paketquellen installiert
error-install = Während der Paketinstallation ist ein Fehler aufgetreten: { $error }. Die Installation wird abgebrochen
# operations::search
out-of-date = veraltet: since
installed = installiert
# operations::uninstall
failed-remove-pkgs = Pakete konnten nicht deinstalliert werden
# operations::upgrade
failed-upgrade-repo-pkgs = Pakete aus Pacman-Paketquellen konnten nicht aktualisiert werden
success-upgrade-repo-pkgs = Pakete aus Pacman-Paketquellen wurden erfolgreich aktualisiert
couldnt-find-remote-pkg = Remotepaket für { $pkg } konnte nicht gefunden werden
no-upgrades-aur-package = Keine Aktualisierungen für AUR Pakete gefunden
scanning-for-pacnew = Scanne für .pacnew Dateien nach Aktualisierung
# logging::output
repo-dependencies = Paketabhängigkeiten aus den Pacman-Paketquellen
aur-dependencies = Paketabhängigkeiten aus der AUR
repo-make-dependencies = Paketabhängigkeiten zum Bauen der Pakete aus den Pacman-Paketquellen
aur-make-dependencies = Paketabhängigkeiten zum Bauen der Pakete aus der AUR
version = Version
votes = Votes
capital-installed = Installiert
# operations::aur_install::aur_fetch
fetching-pkg-info = Rufe Paketinformationen ab
couldnt-find-all-pkgs = Konnte nicht alle Pakete finden
all-pkgs-found = Alle Pakete wurden gefunden
some-pkgs-already-installed = Einige Pakete sind bereits installiert. Trotzdem fortfahren?
do-you-want-to-install = Möchten Sie diese Pakete inklusive deren Abhängigkeiten installieren?
# operations::aur_install::common
downloading-sources = Lädt Quelldateien herunter
pulling-latest-changes = Lädt letzte Änderungen herunter
cloning-aur-repo = Lädt AUR-Repository herunter
down-and-ext-files = Lädt Dateien herunter und extrahiert diese
downloaded = Heruntergeladen!
dependency-cycle = Abhängigkeitskreis erkannt! Die Installation wird abgebrochen.
building-packages = Baue Pakete
built = Gebaut
installing-packages = Installiere Pakete
building-package = Baue Paket
build-failed = Erstellen des Pakets fehlgeschlagen!
couldnt-find-pkg-produced = Konnte das Paket { $pkg } nicht in den erstellten Paketen finden
review-build-log = Möchten Sie sich die Logdatei über die Paketerstellung anschauen?
# operations::aur_install::aur_review
select-pkgs-review = Wählen Sie die Pakete aus, die Sie überprüfen möchten
do-you-still-want-to-install = Möchten Sie die Pakete weiterhin installieren?
reviewing = Überprüfen
select-file-review = Wählen Sie eine Datei zum Überprüfen aus
done-reviewing-pkg = Überprüfung von { $pkg } abgeschlossen
# operations::aur_install::aur_download
all-sources-ready = Alle Quellen sind bereit.
# interact::theme
no-selections = Keine Auswahl
# operations::aur_install::repo_dependency_installation
installing-repo-deps = Installiere Pacman-Abhängigkeiten
# operations::aur_install::aur_dependency_installation
installing-from-aur = Installiere { $amountOfPkgs } aus der AUR
# operations::aur_install::make_dependency_removal
remove-installed-make-deps = Möchten Sie die ausschließlich zum Bauen verwendeten Abhängigkeiten entfernen?
done = Fertig!
# operations::aur_install
aur-rpc-crash = AUR RPC Aufruf ist fehlgeschlagen: { $error }
failed-to-build = Konnte nicht gebaut werden
makepkg-failed = makepkg ist fehlgeschlagen
unknown-error = Unbekannter Fehler
# internal::error
non-zero-exit = Ist mit einem Fehlercode beendet worden
build-step-violation = AUR build violated build steps
build-error = Paket konnte nicht gebaut werden
user-cancel = Abbruch durch den Benutzer
makepkg-err = makepkg konnte nicht ausgeführt werden
error-occurred = Ein Fehler ist aufgetreten
# internal::detect
sudo-prompt-failed = Sudo Abfrage ist fehlgeschlagen
scanning-pacnew-files = Suche nach .pacnew Dateien
no-pacnew-found = Keine .pacnew Dateien gefunden
pacnew-found = .pacnew Dateien gefunden
pacnew-warning =
Einige von dir installierten oder aktualisierten Pakete haben eine .pacnew Datei hinterlassen.
Diese Dateien werden erstellt, wenn sich die Konfiguration eines Programmes geändert hat und nicht automatisch
mit der vorhandenden Konfiguration zusammengeführt werden konnte. Sie können diese Konflikte lösen,
indem Sie folgendes ausführen:
run-pacdiff-now = Möchten Sie pacdiff nun ausführen?
pacdiff-warning =
Pacdiff nutzt standardmäßig vimdiff um Dateien zusammenzuführen. Sie können Bereiche fokussieren, indem Sie die Maus
über diese bewegen und die linke Maustaste drücken.
Zum Beenden von vimdiff können Sie folgende Tastenkombination ausführen: ESC, :qa!, ENTER
Diese Warnung kann in der Konfigurationdatei ~/.config/ame/config.toml unter der Einstellung `pacdiff_warn` ausgeschaltet werden, indem diese auf false gesetzt wird.
# internal::config
config-docs = # See https://getcryst.al/docs/amethyst/config for more information on config keys
# internal::paging
quit = Beenden
search = Suche
next-result = Nächstes Ergebnis
previous-result = Vorheriges Ergebnis
# --help
verbose = Setzt das Ausgabelevel
no-confirm = Führt alle Vorgänge durch, ohne dass eine Benutzereingabe notwendig ist
quiet = Sorgt dafür, dass einige Befehle weniger in die Konsole schreiben (nur clean, upgrade und install werden unterstützt)
sudoloop = Lässt die Sudo-Abfrage im Hintergrund laufen, um weitere Eingaben zu vermeiden
cachedir = Setzt ein benutzerdefiniertes AUR clone und build Verzeichnis für den jeweiligen Vorgang
install = Installiert oder sucht nach Paketen die entweder aus der AUR oder Pacman-Paketquellen stammen
remove = Entfernt ein installiertes Paket
search = Sucht nach einem Paket, welches einem bestimmten Muster entspricht (in der AUR und Pacman-Repos) [aliases: -Ss]
query = Durchsucht installierte Pakete
upgrade = Aktualisiert lokale Pakete auf deren neuste Version (Standardwert)
gencomp = Generiert Shell-Vervollständigungen für unterstützte Shells (bash, fish, elvish, pwsh)
clean = Entfernt nicht verwendete Pakete
diff = Führt pacdiff aus
install-packages = Namen der Pakete die installiert oder gesucht werden sollen
install-aur = Betrachtet nur Paekte aus der AUR
install-repo = Betrachtet nur Pakete aus den Pacman-Paketquellen
install-search = Sucht nach Paketen die einem bestimmten Muster entsprechen, anstatt zu installieren
install-by = Sucht nach dem Wert eines bestimmten Feldes
remove-packages = Die Namen der Pakete, die entfernt werden sollen
query-aur = Listet AUR und Pacman-fremde Pakete auf [-Qa, -Qm]
query-repo = Listet Pakete aus den Pacman-Paketquellen auf [-Qr, -Qn]
query-explicit = Listet Pakete auf, die explizit installiert wurden [-Qe]
query-info = Gibt Informationen über ein bestimmtes Paket aus
upgrade-repo = Aktualisiert nur Pakete aus Pacman-Paketquellen
upgrade-aur = Aktualisiert nur AUR-Pakete
gencomp-shell = Die Shell für die Auto-Vervollständigungen generiert werden soll (bash, fish, elvish, pwsh, fig)
review = { $pkg } überprüfen?
description = Ein schneller und effizienter AUR-Helfer
checkupdates = Fragt nach verfügbaren Paketaktualisierungen und gibt sie aus
repo-check-dependencies = Repo-Abhängigkeiten prüfen
search-paging = Suche
aur-check-dependencies = AUR-Abhängigkeiten prüfen
query-owns = Informationen darüber erhalten, welches Paket eine Datei besitzt

@ -1,185 +0,0 @@
# used across files
exiting = Exiting
packages = { $pkgNum ->
[one] package
*[other] packages
}
missing-deps = Missing dependencies
continue = Continue?
# main
run-as-root = Running Amethyst as root is disallowed as it can lead to system breakage. Instead, Amethyst will prompt you when it needs superuser permissions.
following-packages = The following packages were found in the AUR:
aur-warning =
The AUR is a source of user-submitted packages/scripts and isn't always safe to use.
Please make sure to review the PKGBUILD of anything you download from the AUR before installing it, as some PKGBUILDs may potentially be malicious.
This warning can be toggled in the configuration file.
are-you-sure = Are you sure that you want to continue?
uninstalling-packages = Uninstalling packages: {$packages}
system-upgrade = Performing system upgrade
removing-orphans = Removing orphaned packages
couldnt-find-packages = Couldn't find packages: {$packages} in repos or the AUR
searching-repos = Searching repos for {$query}
searching-aur = Searching AUR for {$query}
no-results = No results found
results = Results:
installed-repo-packages = Installed Repo Packages:
installed-aur-packages = Installed AUR Packages:
installed-packages = Installed Packages:
invalid-shell = Invalid shell, {$shell}
zsh-error = Zsh shell completions are currently unsupported due to a bug in the clap_completion crate
# operations::clean
no-orphans = No orphaned packages found
removing-orphans-would =
Removing orphans would uninstall the following packages:
{$packages}
failed-remove-orphans = Failed to remove orphans
success-remove-orphans = Successfully removed orphans
clear-pkgbuild-cache = Clear Amethyst's internal PKGBUILD cache?
clear-pacman-cache = Also clear Pacman's package cache?
failed-clear-cache = Failed to clear package cache, {$error}
success-clear-cache = Successfully cleared package cache
# operations::install
installing-packages-from-repos = Installing packages {$packages} from repos
error-install = An error occured while installing packages: {$error}, aborting
# operations::search
out-of-date = out of date: since
installed = installed
# operations::uninstall
failed-remove-pkgs = Failed to remove packages
# operations::upgrade
failed-upgrade-repo-pkgs = Failed to upgrade repo packages
success-upgrade-repo-pkgs = Successfully upgraded repo packages
couldnt-find-remote-pkg = Could not find the remote package for {$pkg}
no-upgrades-aur-package = No upgrades available for installed AUR packages
scanning-for-pacnew = Scanning for .pacnew files post-upgrade
# logging::output
repo-dependencies = Repo dependencies
aur-dependencies = AUR dependencies
repo-make-dependencies = Repo make dependencies
aur-make-dependencies = AUR make dependencies
repo-check-dependencies = Repo check dependencies
aur-check-dependencies = AUR check dependencies
version = version
votes = votes
capital-installed = Installed
# operations::aur_install::aur_fetch
fetching-pkg-info = Fetching package information
couldnt-find-all-pkgs = Couldn't find all packages
all-pkgs-found = All packages found
some-pkgs-already-installed = Some packages are already installed. Continue anyway?
do-you-want-to-install = Do you want to install these packages and package dependencies?
# operations::aur_install::common
downloading-sources = Downloading sources
pulling-latest-changes = Pulling latest changes
cloning-aur-repo = Cloning aur repository
down-and-ext-files = Downloading and extracting files
downloaded = Downloaded!
dependency-cycle = Dependency cycle detected. Aborting installation.
building-packages = Building packages
built = Built
installing-packages = Installing packages
building-package = Building Package
build-failed = Build failed!
couldnt-find-pkg-produced = Could not find package {$pkg} in produced packages
review-build-log = Do you want to review the build log?
# operations::aur_install::aur_review
select-pkgs-review = Select packages to review
do-you-still-want-to-install = Do you still want to install those packages?
reviewing = Reviewing
select-file-review = Select a file to review
done-reviewing-pkg = Done reviewing {$pkg}
review = Review {$pkg}?
# operations::aur_install::aur_download
all-sources-ready = All sources are ready.
# interact::theme
no-selections = No selections
# operations::aur_install::repo_dependency_installation
installing-repo-deps = Installing repo dependencies
# operations::aur_install::aur_dependency_installation
installing-from-aur = Installing {$amountOfPkgs} from the AUR
# operations::aur_install::make_dependency_removal
remove-installed-make-deps = Do you want to remove the installed make dependencies?
done = Done!
# operations::aur_install
aur-rpc-crash = AUR RPC Call failed with: {$error}
failed-to-build = Failed to build
makepkg-failed = makepkg failed
unknown-error = Unknown error
# internal::error
non-zero-exit = Exited with non zero code
build-step-violation = AUR build violated build steps
build-error = Failed to build package
user-cancel = Cancelled by user
makepkg-err = Failed to run makepkg
error-occurred = An error occurred
# internal::detect
sudo-prompt-failed = Sudo prompt failed
scanning-pacnew-files = Scanning for pacnew files
no-pacnew-found = No .pacnew files found
pacnew-found = pacnew files found
pacnew-warning =
It appears that at least one program you have installed / upgraded has installed a .pacnew config file.
These are created when you have modified a program's configuration, and a package upgrade could not automatically merge the new file.
You can deal with those files by running
run-pacdiff-now = Would you like to run pacdiff now?
pacdiff-warning =
Pacdiff uses vimdiff by default to edit files for merging. You can focus panes by mousing over them and pressing left click, and scroll up and down using your mouse's scroll wheel (or the arrow keys). To exit vimdiff, press the following key combination: ESC, :qa!, ENTER
You can suppress this warning in the future by setting `pacdiff_warn` to "false" in ~/.config/ame/config.toml
# internal::config
config-docs = # See https://getcryst.al/docs/amethyst/config for more information on config keys
# internal::paging
quit = quit
search-paging = search
next-result = next result
previous-result = previous result
# --help
verbose = Sets the level of verbosity
no-confirm = Complete operation without prompting user
quiet = Make some commands have less output (only clean, upgrade, and install are supported)
sudoloop = Loops sudo in the background to ensure it doesn't time out during long builds
cachedir = Sets a custom AUR clone and build directory for the specified operation
install = Installs or searches for a package in either the AUR or the Pacman-defined repositories
remove = Removes a previously installed package
search = Searches for packages matching a provided pattern in the AUR/repos [aliases: -Ss]
query = Queries installed packages
upgrade = Upgrades locally installed packages to their latest versions (Default)
gencomp = Generates shell completions for supported shells (bash, fish, elvish, pwsh)
clean = Removes all orphaned packages
checkupdates = Queries for and returns available package updates
diff = Runs pacdiff
install-packages = The name of the package(s) to install or search for
install-aur = Operate only on AUR packages
install-repo = Operate only on repo packages
install-search = Search packages for a given pattern instead of installing
install-by = Searches by a specific field
remove-packages = The name of the package(s) to remove
query-aur = Lists AUR/foreign packages [-Qa, -Qm]
query-repo = Lists repo/native packages [-Qr, -Qn]
query-explicit = Lists explicitly installed packages [-Qe]
query-info = Get information about a specific package
query-owns = Get information about which package owns a file
upgrade-repo = Upgrades only repo/native packages
upgrade-aur = Upgrades only from the AUR
gencomp-shell = The shell to generate completions for (bash, fish, elvish, pwsh, fig)
description = A fast and efficient AUR helper

@ -1,164 +0,0 @@
# used across files
exiting = Saliendo
packages =
{ $pkgNum ->
[one] paquete
*[other] paquetes
}
# main
run-as-root = Ejecutar Amethyst como root no está permitido ya que puede llevar a la ruptura del sistema. En su lugar, Amethyst le avisará cuando necesite permisos de superusuario.
aur-warning =
El AUR es una fuente de paquetes/scripts enviados por los usuarios y no siempre es segura.
Por favor, asegúrese de revisar el PKGBUILD de cualquier cosa que descargue del AUR antes de instalarlo, ya que algunos PKGBUILDs pueden ser potencialmente maliciosos.
Esta advertencia puede activarse en el archivo de configuración.
clear-pkgbuild-cache = ¿Limpiar la caché interna de PKGBUILD de Amethyst?
missing-deps = Dependencias que faltan
continue = ¿Continuar?
following-packages = Se han encontrado los siguientes paquetes en el AUR:
are-you-sure = ¿Está seguro de que quiere continuar?
uninstalling-packages = Desinstalando paquetes: { $packages }
system-upgrade = Realizando la actualización del sistema
removing-orphans = Eliminación de paquetes huérfanos
couldnt-find-packages = No se han podido encontrar los paquetes { $packages } en los repos o en el AUR
searching-repos = Buscando repos para { $query }
searching-aur = Búsqueda en AUR de { $query }
no-results = No se han encontrado resultados
results = Resultados:
installed-repo-packages = Paquetes del repositorio instalados:
installed-aur-packages = Paquetes AUR instalados:
installed-packages = Paquetes instalados:
invalid-shell = Shell no válido, { $shell }
zsh-error = Las terminaciones del shell de ZSH no se soportan actualmente debido a un error en la crate 'clap_completion'
# operations::clean
no-orphans = No se han encontrado paquetes huérfanos
removing-orphans-would =
La eliminación de los paquetes huérfanos desinstalaría los siguientes paquetes:
{ $packages }
failed-remove-orphans = No se han podido eliminar los paquetes huérfanos
success-remove-orphans = Paquetes huérfanos removidos con éxito
clear-pacman-cache = ¿Borrar también la caché de paquetes de Pacman?
failed-clear-cache = Fallo al borrar la caché del paquete, { $error }
aur-make-dependencies = Dependencias de compilación de AUR
aur-check-dependencies = Dependencias de verificación de AUR
some-pkgs-already-installed = Algunos paquetes ya han sido instalados. ¿Continuar igualmente?
dependency-cycle = Ciclo de dependencias detectado. Abortando instalación.
couldnt-find-pkg-produced = No se ha podido encontrar el paquete { $pkg } en los paquetes generados
# operations::aur_install::aur_download
all-sources-ready = Todas las fuentes están listas.
# operations::aur_install::make_dependency_removal
remove-installed-make-deps = ¿Quieres remover las dependencias de compilación instaladas?
makepkg-err = Error al iniciar makepkg
pacnew-warning =
Parece que al menos un programa que has instalado o actualizado ha creado un archivo .pacnew.
Esto pasa cuando has modificado la configuración de un paquete, y la actualización no ha podido actualizar la configuración automáticamente.
Puedes solucionar esto ejecutando
pacdiff-warning =
Pacdiff usa vimdiff por defecto para editar archivos cuando se fusionan. Puedes moverte por los paneles moviendo el ratón y pulsando botón derecho, y moverte arriba o abajo usando la rueda del ratón (o las flechas del teclado). Para salir de vimdiff, pulsa la siguiente configuración: ESC, :qa!, ENTER
Puedes esconder esta advertencia en el futuro cambiado la opción 'pacdiff_warn' a 'falso' en ~/.config/ame/config.toml
upgrade = Actualiza los paquetes instalados localmente a las últimas versiones (Por defecto)
install-packages = El nombre del/los paquete(s) que quieres instalar o buscar
query-repo = Lista paquetes nativos/del repositorio [-Qr, -Qn]
query-owns = Conseguir información sobre que paquete es propietario de un archivo
# operations::aur_install::common
downloading-sources = Descargando fuentes
query-aur = Lista paquetes del AUR o fuera de repositorio [-Qa, -Qm]
aur-dependencies = Dependencias de AUR
repo-make-dependencies = Dependencias de compilación de repositorio
success-clear-cache = Caché de paquetes limpiada con éxito
error-install = Un error ha ocurrido mientras se instalaban los paquetes: { $error }, abortando
# operations::search
out-of-date = Desactualizado desde
installed = instalado
# operations::uninstall
failed-remove-pkgs = Error al remover los paquetes
# operations::upgrade
failed-upgrade-repo-pkgs = Error al actualizar los paquetes del repositorio
success-upgrade-repo-pkgs = Paquetes del repositorio actualizados con éxito
couldnt-find-remote-pkg = No se ha encontrado un paquete remoto para { $pkg }
no-upgrades-aur-package = No hay actualizaciones para los paquetes de AUR
scanning-for-pacnew = Buscando archivos .pacnew después de actualizar
# logging::output
repo-dependencies = Dependencias de repositorio
# operations::install
installing-packages-from-repos = Instalando { $packages } de los repositorios
repo-check-dependencies = Dependencias de verificación de repositorio
version = versión
votes = votos
capital-installed = Instalado
# operations::aur_install::aur_fetch
fetching-pkg-info = Obteniendo información del paquete
couldnt-find-all-pkgs = No se han encontrado todos los paquetes
all-pkgs-found = Todos los paquetes han sido encontrados
# internal::detect
sudo-prompt-failed = La petición de contraseña ha fallado
pulling-latest-changes = Descargando los últimos cambios
cloning-aur-repo = Clonando el repositorio AUR
down-and-ext-files = Descargando y extrayendo archivos
building-packages = Compilando paquetes
built = Compilado
installing-packages = Instalando paquetes
building-package = Compilando paquete
build-failed = Compilación fallida!
# operations::aur_install::aur_review
select-pkgs-review = Selecciona los paquetes que quieres revisar
do-you-still-want-to-install = ¿Aún quieres instalar estos paquetes?
review-build-log = ¿Quieres revisar el registro de compilación?
do-you-want-to-install = ¿Quieres instalar estos paquetes y sus dependencias?
downloaded = ¡Descargado!
reviewing = Revisando
select-file-review = Selecciona un fichero para revisarlo
done-reviewing-pkg = Revisión finalizada para { $pkg }
review = ¿Revisar { $pkg }?
# interact::theme
no-selections = Sin selecciones
# operations::aur_install::repo_dependency_installation
installing-repo-deps = Instalando las dependencias del repositorio
# operations::aur_install::aur_dependency_installation
installing-from-aur = Instalando { $amountOfPkgs } del AUR
done = ¡Completado!
# operations::aur_install
aur-rpc-crash = La llamada RPC al AUR ha fallado con el error: { $error }
failed-to-build = Error al compilar
makepkg-failed = makepkg ha fallado
unknown-error = Error desconocido
# internal::error
non-zero-exit = Finalizado con un código que no es 0
build-step-violation = La compilación del AUR ha violado los pasos de compilación
build-error = Error al compilar el paquete
user-cancel = Cancelado por el usuario
error-occurred = Un error ha ocurrido
scanning-pacnew-files = Buscando archivos pacnew
no-pacnew-found = No se han encontrado archivos .pacnew
pacnew-found = Se han encontrado archivos pacnew
run-pacdiff-now = ¿Quieres ejecutar pacdiff ahora?
# internal::config
config-docs = # Entra en https://getcryst.al/docs/amethyst/config para más información sobre las opciones
# internal::paging
quit = salir
search-paging = buscar
next-result = siguiente resultado
previous-result = anterior resultado
# --help
verbose = Elegir el nivel de verbosidad
no-confirm = Completar la operación sin preguntar al usuario
quiet = Hacer que algunos comandos tengan menos verbosidad (solo clean, upgrade y install están soportados)
sudoloop = Pone sudo en un bucle de fondo para asegurarse de que no se cierra por inactividad durante compilaciones largas
cachedir = Establece un directorio personalizado para la clonación y compilación de paquetes del AUR
install = Instala o busca los paquetes tanto en el AUR como en los repositorios de Pacman
remove = Desinstala un paquete previamente instalado
query = Busca todos los paquetes instalados
gencomp = Genera auto-completación para las shell soportadas (bash, fish, elvish, pwsh)
clean = Desinstala todos los paquetes huérfanos
checkupdates = Busca y muestra todos los paquetes que tienen actualizaciones
diff = Ejecuta pacdiff
install-aur = Operar solo con los paquetes del AUR
install-repo = Operar solo con los paquetes de repositorios
install-search = Buscar los paquetes con el patrón proporcionado en vez de instalar
install-by = Buscar por un campo específico
remove-packages = El nombre del/los paquete(s) a desinstalar
query-explicit = Lista paquetes instalados explícitamente [-Qe]
query-info = Conseguir información sobre un paquete especifico
upgrade-repo = Actualiza solo paquetes del nativos/de los repositorios
upgrade-aur = Actualiza solo paquetes del AUR
gencomp-shell = La shell para la que quieres generar la auto-completación (bash, fish, elvish, pwsh, fig)
description = Un ayudante de AUR rápido y eficiente

@ -1,6 +0,0 @@
missing-deps = Dépendances manquantes
continue = Continuer ?
# used across files
exiting = Quitter
# main
run-as-root = Exécuter Gradience en tant que super utilisateur est désactivé car cela peut créer des problèmes. A la place, Amethyst va vous demander quand il a besoin des permissions super utilisateur.

@ -1,179 +0,0 @@
# used across files
exiting = Esco
packages = { $pkgNum ->
[one] pacchetto
*[other] pacchetti
}
missing-deps = Dipendenze mancanti
continue = Continuare?
# main
run-as-root = Non è consentito usare Amethyst come super utente poiché potrebbe danneggiare il sistema. Amethyst chiederà l'autenticazione quando necessario.
following-packages = I seguenti pacchetti non sono stati trovati in AUR:
aur-warning =
L'AUR è una fonte di pacchetti creati da utenti e non sempre è sicura.
È consigliato esaminare il PKGBUILD di qualsiasi pacchetto AUR prima di installarlo poiché alcuni potrebbero essere dannosi.
Questo avviso può essere disattivato nel file di configurazione.
are-you-sure = Continuare?
uninstalling-packages = Disinstallazione dei pacchetti: {$packages}
system-upgrade = Aggiornamento del sistema
removing-orphans = Rimozione dei pacchetti orfani
couldnt-find-packages = Impossibile trovare i pacchetti: {$packages} nei repository o in AUR
searching-repos = Ricerca di {$query} nei repository
searching-aur = Ricerca di {$query} in AUR
no-results = Nessun risultato
results = Risultati:
installed-repo-packages = Pacchetti repository installati:
installed-aur-packages = Pacchetti AUR installati:
installed-packages = Pacchetti installati:
invalid-shell = La shell {$shell} non è supportata
zsh-error = L'autocompletamento Zsh non è supportato a causa di un bug nel crate clap_completion
# operations::clean
no-orphans = Nessun pacchetto orfano trovato
removing-orphans-would =
I seguenti pacchetti orfani saranno rimossi:
{$packages}
failed-remove-orphans = Impossibile rimuovere i pacchetti orfani
success-remove-orphans = I pacchetti orfani sono stati rimossi
clear-pkgbuild-cache = Pulire la cache interna dei PKGBUILD di Amethyst?
clear-pacman-cache = Pulire anche la cache dei pacchetti di Pacman?
failed-clear-cache = Impossibile pulire la cache dei pacchetti: {$error}
success-clear-cache = La cache dei pacchetti è stata pulita
# operations::install
installing-packages-from-repos = Installazione di {$packages} dai repository
error-install = Si è verificato un errore durante l'installazione: {$error}, interrompo
# operations::search
out-of-date = obsoleto: dal
installed = installato
# operations::uninstall
failed-remove-pkgs = Impossibile installare i pacchetti
# operations::upgrade
failed-upgrade-repo-pkgs = Impossibile aggiornare i pacchetti repository
success-upgrade-repo-pkgs = I pacchetti repository sono stati aggiornati
couldnt-find-remote-pkg = Impossibile trovare il pacchetto {$pkg}
no-upgrades-aur-package = Nessun aggiornamento disponibile per i pacchetti AUR
scanning-for-pacnew = Ricerca di file .pacnew post-aggiornamento
# logging::output
repo-dependencies = Dipendenze repository
aur-dependencies = Dipendenze AUR
repo-make-dependencies = Dipendenze repository per la compilazione
aur-make-dependencies = Dipendenze AUR per la compilazione
version = versione
votes = voti
capital-installed = Installato
# operations::aur_install::aur_fetch
fetching-pkg-info = Raccoglimento delle informazioni dei pacchetti
couldnt-find-all-pkgs = Alcuni pacchetti non sono stati trovati
all-pkgs-found = Tutti i pacchetti sono stati trovati
some-pkgs-already-installed = Alcuni pacchetti sono già installati. Continuare comunque?
do-you-want-to-install = Vuoi installare questi pacchetti e dipendenze?
# operations::aur_install::common
downloading-sources = Scaricamento delle sorgenti
pulling-latest-changes = Recupero dei cambiamenti più recenti
cloning-aur-repo = Clonazione del repository AUR
down-and-ext-files = Scaricamento e estrazione dei file
downloaded = Scaricato!
dependency-cycle = È stato rilevato un ciclo di dipendenze. L'installazione è stata interrotta.
building-packages = Compilazione dei pacchetti
built = Compilato
installing-packages = Installazione dei pacchetti
building-package = Compilazione del pacchetti
build-failed = La compilazione non è riuscita!
couldnt-find-pkg-produced = Impossibile trovare {$pkg} nei pacchetti compilati
review-build-log = Vuoi esaminare il registro di compilazione?
# operations::aur_install::aur_review
select-pkgs-review = Seleziona pacchetti da esaminare
do-you-still-want-to-install = Vuoi ancora installare i pacchetti?
reviewing = Esaminazione
select-file-review = Selezionare un file da esaminare
done-reviewing-pkg = Esaminazione di {$pkg} conclusa
review = Esaminare {$pkg}?
# operations::aur_install::aur_download
all-sources-ready = Le sorgenti sono pronte.
# interact::theme
no-selections = La selezione è vuota
# operations::aur_install::repo_dependency_installation
installing-repo-deps = Installazione delle dipendenze repository
# operations::aur_install::aur_dependency_installation
installing-from-aur = Installazione di {$amountOfPkgs} pacchetti AUR
# operations::aur_install::make_dependency_removal
remove-installed-make-deps = Rimuovere le dipendenze di compilazione?
done = Fatto!
# operations::aur_install
aur-rpc-crash = La chiamata RCP a AUR non è riuscita: {$error}
failed-to-build = Errore di compilazione
makepkg-failed = Errore di makepkg
unknown-error = Errore sconosciuto
# internal::error
non-zero-exit = Codice di uscita diverso da zero
build-step-violation = La compilazione AUR ha violato le fasi di compilazione
build-error = Errore nella compilazione del pacchetto
user-cancel = Annullato dall'utente
makepkg-err = Impossibile eseguire makepkg
error-occurred = Si è verificato un errore
# internal::detect
sudo-prompt-failed = Errore nella richiesta di sudo
scanning-pacnew-files = Ricerca di file pacnew
no-pacnew-found = Nessun file .pacnew trovato
pacnew-found = file pacnew trovati
pacnew-warning =
Uno o più programmi installati / aggiornati hanno installato un file di configurazione .pacnew.
I file .pacnew vengono creati quando la configurazione di un programma è stata modificata e non è possibile unire automaticamente il file di configurazione aggiornato.
Puoi gestire questi file con
run-pacdiff-now = Eseguire pacdiff adesso?
pacdiff-warning =
Pacdiff usa vimdiff di default per modificare e unire i file. Puoi focalizzare i pannelli puntandoli e con un click sinistro e scorrere con la rotella del mouse (o le frecce). Per uscire da vimdiff, usare la seguente combinazione di tasti: ESC, :qa!, INVIO
Puoi disattivare questo avviso impostando `pacdiff_warn` a "false" in ~/.config/ame/config.toml
# internal::config
config-docs = # Visitare https://getcryst.al/docs/amethyst/config Per ulteriori informazioni sulla configurazione di amethyst
# internal::paging
quit = esci
search = cerca
next-result = risultato successivo
previous-result = risultato precedente
# --help
verbose = Mostra più informazioni
no-confirm = Completa l'operazione senza chiedere conferme
quiet = Mostra meno informazioni (solo per clean, upgrade e install)
sudoloop = Mantiene sudo in esecuzione per evitare che scada durante lunghe compilazioni
cachedir = Imposta un percorso di clonazione e compilazione AUR alternativo per l'operazione specificata
install = Installa o cerca un pacchetto in AUR o nei repository di Pacman
remove = Rimuove un pacchetto installato
search = Cerca in AUR e nei repository pacchetti che corrispondono a un termine di ricerca [alias: -Ss]
query = Elenca i pacchetti installati
upgrade = Aggiorna i pacchetti installati alla versione più recente (predefinito)
gencomp = Genera completamenti per le shell supportate (bash, fish, elvish, pwsh)
clean = Rimuove tutti i pacchetti orfani
diff = Esegue pacdiff
install-packages = Il nome dei pacchetti da installare o cercare
install-aur = Opera solo sui pacchetti AUR
install-repo = Opera solo sui pacchetti repository
install-search = Cerca pacchetti che corrispondono a un termine di ricerca anziché installarli
install-by = Cerca in base a un campo specifico
remove-packages = Il nome dei pacchetti da rimuovere
query-aur = Elenca i pacchetti AUR [-Qa, -Qm]
query-repo = Elenca i pacchetti repository [-Qr, -Qn]
query-info = Ottieni informazioni su un pacchetto
upgrade-repo = Aggiorna solo i pacchetti repository
upgrade-aur = Aggiorna solo i pacchetti aur
gencomp-shell = La shell per cui generare i completamenti (bash, fish, elvish, pwsh, fig)

@ -1,135 +0,0 @@
installed = zainstalowano
# operations::uninstall
failed-remove-pkgs = Nie udało się usunąć pakietów
# operations::upgrade
failed-upgrade-repo-pkgs = Nie udało się zaktualizować pakietów z repozytoriów
success-upgrade-repo-pkgs = Pomyślnie zaktualizowano pakiety z repozytoriów
couldnt-find-remote-pkg = Nie można znaleźć pakietu zdalnego dla { $pkg }
no-upgrades-aur-package = Brak dostępnych aktualizacji dla zainstalowanych pakietów AUR
scanning-for-pacnew = Skanowanie w poszukiwaniu plików .pacnew po aktualizacji
# logging::output
repo-dependencies = Zależności repozytorium
aur-dependencies = Zależności AUR
repo-make-dependencies = Zależności do kompilowania pakietów z repozytoriów
missing-deps = Brakujące zależności
continue = Kontynuować?
# main
run-as-root = Uruchamianie Amethyst jako root jest niedozwolone, ponieważ może prowadzić do awarii systemu. Zamiast tego Amethyst wyświetli komunikat, gdy będzie potrzebować uprawnień administratora.
following-packages = Następujące pakiety zostały znalezione w AUR:
are-you-sure = Jesteś pewien że chcesz kontynuować?
uninstalling-packages = Odinstalowywanie następujących pakietów: { $packages }
system-upgrade = Aktualizowanie wszystkich zainstalowanych pakietów
removing-orphans = Usuwanie niepotrzebnych pakietów
couldnt-find-packages = Nie odnaleziono : { $packages } w repozytoriach lub AUR
searching-repos = Szukanie { $query } w repozytoriach
searching-aur = Szukanie { $query } w AUR
results = Wyniki:
no-results = Niczego nie znaleziono
installed-aur-packages = Zainstalowane pakiety AUR:
installed-repo-packages = Zainstalowane pakiety z repozytoriów:
installed-packages = Zainstalowane pakiety:
# operations::clean
no-orphans = Nie znaleziono niepotrzebnych pakietów
failed-remove-orphans = Nie udało się usunąć niepotrzebnych pakietów
removing-orphans-would =
Usuwanie niepotrzebnych pakietów usunie:
{ $packages }
clear-pacman-cache = Wyczyścić także pamięć podręczną pakietów Pacmana?
success-clear-cache = Pomyślnie wyczyszczono pamięć podręczną pakietów
success-remove-orphans = Pomyślnie usunięto niepotrzebne pakiety
error-install = Wystąpił błąd podczas instalacji pakietów: { $error }, przerywanie
failed-clear-cache = Nie udało się wyczyścić pamięci podręcznej pakietów, { $error }
version = wersja
votes = głosy
capital-installed = Zainstalowane
aur-make-dependencies = Zależności do kompilowania pakietów AUR
aur-warning = AUR jest źródłem pakietów/skryptów przesłanych przez użytkowników i nie zawsze jest bezpieczny w użyciu.
clear-pkgbuild-cache = Wyczyścić wewnętrzną pamięć podręczną PKGBUILD?
# operations::install
installing-packages-from-repos = Instalowanie { $packages } z repozytoriów
zsh-error = Uzupełnienia powłoki Zsh są obecnie nieobsługiwane z powodu błędu w clap_completion
build-failed = Błąd podczas kompilacji!
do-you-still-want-to-install = Na pewno chcesz zainstalować te pakiety?
# operations::aur_install::make_dependency_removal
remove-installed-make-deps = Chcesz odinstalować zależności potrzebne do kompilacji?
invalid-shell = Nieprawidłowa powłoka, { $shell }
# operations::aur_install::aur_fetch
fetching-pkg-info = Pobieranie informacji o pakiecie
couldnt-find-all-pkgs = Nie odnaleziono wszystkich pakietów
all-pkgs-found = Odnaleziono wszystkie pakiety
some-pkgs-already-installed = Niektóre pakiety są już zainstalowane, kontynuować?
do-you-want-to-install = Chcesz zainstalować te pakiety i ich zależności?
# operations::aur_install::common
downloading-sources = Pobieranie źródeł
pulling-latest-changes = Pobieranie najnowszych zmian
cloning-aur-repo = Pobieranie pakiety z AUR
down-and-ext-files = Pobieranie i rozpakowywanie plików
downloaded = Pobrano!
dependency-cycle = Wykryto problem z zależnościami. Przerywanie instalacji.
building-packages = Kompilowanie pakietów
built = Skompilowano
installing-packages = Instalowanie pakietów
building-package = Kompilowanie pakietów
couldnt-find-pkg-produced = Nie odnaleziono pakietu { $pkg } w zbudowanych pakietach
review-build-log = Czy chcesz zobaczyć wynik kompilacji?
# operations::aur_install::aur_download
all-sources-ready = Wszystkie źródła są gotowe.
# interact::theme
no-selections = Nic nie zaznaczono
# operations::aur_install::repo_dependency_installation
installing-repo-deps = Instalowanie zależności repozytorium
# operations::aur_install::aur_dependency_installation
installing-from-aur = Instalowanie { $amountOfPkgs } z AUR
done = Gotowe!
failed-to-build = Kompilacja się nie powiodła
unknown-error = Nieznany błąd
# internal::error
non-zero-exit = Przerwano z kodem innym niż 0
build-error = Kompilacja paczki nie powiodła się
user-cancel = Przerwano przez użytkownika
error-occurred = Wystąpił problem
no-pacnew-found = Nie odnaleziono plików .pacnew
pacnew-found = Odnaleziono pliki .pacnew
pacnew-warning =
Wygląda na to, że co najmniej jeden zainstalowany/zaktualizowany program zainstalował plik konfiguracyjny .pacnew.
Są one tworzone, gdy zmodyfikowałeś konfigurację programu, a aktualizacja pakietu nie mogła automatycznie scalić nowego pliku.
Możesz poradzić sobie z tymi plikami, uruchamiając
# internal::config
config-docs = # Po więcej informacji na temat konfiguracji Amethystu zobacz https://getcryst.al/docs/amethyst/config
# internal::paging
quit = wyjdź
search = wyszukaj
next-result = następny wynik
previous-result = poprzedni wynik
# --help
verbose = Ustawia poziom czegośtam
no-confirm = coś bez aktywności użytkownika
quiet = Spraw, aby niektóre polecenia miały mniejszą wydajność (tylko clean, upgrade i install są obsługiwane)
install = Instaluje lub wyszukuje pakiet w AUR lub repozytoriach zdefiniowanych przez Pacmana
remove = Usuwa zainstalowany pakiet
query = Wyszukuje wśród zainstalowanych pakietów
scanning-pacnew-files = Wyszukiwanie plików .pacnew
upgrade = Uaktualnia lokalnie zainstalowane pakiety do ich najnowszych wersji (domyślnie)
gencomp = Generuje uzupełnienia powłoki dla obsługiwanych powłok (bash, fish, elvish, pwsh)
clean = Usuwa wszystkie niepotrzebne pakiety
install-packages = Nazwa pakietu(ów) do zainstalowania lub wyszukania
install-aur = Działaj tylko na pakietach AUR
install-repo = Działaj tylko na pakietach z repozytoriów
remove-packages = Nazwy pakietu(ów) do usunięcia
query-aur = Wyświetla listę pakietów z AUR lub nieznanych źródeł [-Qa, -Qm]
query-repo = Wyświetla listę pakietów z repozytoriów [-Qa, -Qm]
query-info = Wyświetl informacje na temat danej paczki
upgrade-repo = Aktualizuje tylko natywne/pakiety z repozytoriów
query-owns = Uzyskaj informacje o tym, który pakiet posiada plik
description = Szybki i wydajny pomocnik AUR
# operations::search
out-of-date = nieaktualny: od
# used across files
exiting = Opuszczanie
packages =
{ $pkgNum ->
[one] pakiet
*[other] pakietów
}
upgrade-aur = Aktualizuje pakiety tylko z AUR
gencomp-shell = Powłoka do wygenerowania uzupełnień (bash, fish, elvish, pwsh, fig)

@ -1,164 +0,0 @@
continue = Continuar?
following-packages = Os seguintes pacotes foram encontrados no AUR:
removing-orphans = Removendo pacotes órfãos
success-remove-orphans = Pacotes órfãos removidos com sucesso
clear-pacman-cache = Também gostaria de limpar o cache de pacotes do Pacman?
are-you-sure = Tem certeza que deseja continuar?
no-results = Sem resultados encontrados
results = Resultados:
searching-aur = Buscando { $query } no AUR
searching-repos = Buscando { $query } nos repositórios
installed-packages = Pacotes Instalados:
system-upgrade = Executando atualização do sistema
couldnt-find-packages = Não foi possível encontrar os pacotes: { $packages } nos repositórios ou no AUR
invalid-shell = Shell inválido, { $shell }
# operations::clean
no-orphans = Nenhum pacote orfão encontrado
failed-remove-orphans = Falha ao remover pacotes órfãos
clear-pkgbuild-cache = Limpar o cache interno PKGBUILD do Amethyst?
failed-clear-cache = Falha ao limpar o cache de pacote, { $error }
installed = instalado
# operations::uninstall
failed-remove-pkgs = Falha ao remover pacotes
# operations::upgrade
failed-upgrade-repo-pkgs = Falha ao atualizar os repositórios
# main
run-as-root = Executar Amethyst como root não é permitido pois pode acarretar em falhas no sistema. Ao invés disso, Amethyst irá pedir quando necessitar de permissões de superusuário.
# used across files
exiting = Saindo
missing-deps = Dependências faltando
uninstalling-packages = Desinstalando pacotes: { $packages }
installed-repo-packages = Pacotes Repo instalados:
installed-aur-packages = Pacotes instalados do AUR:
zsh-error = Completações do shell Zsh não é suportada atualmente devido a um bug no clap_completion
removing-orphans-would =
Remover pacotes órfãos removerá os seguintes pacotes:
{ $packages }
success-clear-cache = Cache de pacotes limpo com sucesso
# operations::install
installing-packages-from-repos = Instalado pacotes { $packages } dos repositórios
error-install = Um erro ocorreu ao instalador pacotes: { $error }, encerrando
# operations::search
out-of-date = desatualizado: desde
success-upgrade-repo-pkgs = Pacotes do repositório atualizados com sucesso
couldnt-find-remote-pkg = Não foi possível encontrar pacote remoto para { $pkg }
no-upgrades-aur-package = Não há atualizações para os pacotes do AUR instalados
packages =
{ $pkgNum ->
[one] pacote
*[other] pacotes
}
scanning-for-pacnew = Escaneando para novos arquivos .pacnew após atualização
# logging::output
repo-dependencies = Dependências de repositório
aur-dependencies = Dependências do AUR
repo-make-dependencies = Dependências make do repositório
aur-make-dependencies = Dependências make do AUR
repo-check-dependencies = Conferindo dependências dos repositórios
aur-check-dependencies = Conferindo dependências do AUR
version = versão
votes = votos
# operations::aur_install::aur_fetch
fetching-pkg-info = Obtendo informações do pacote
couldnt-find-all-pkgs = Não foi possível encontrar todos os pacotes
all-pkgs-found = Todos os pacotes encontrados
do-you-want-to-install = Você quer instalar estes pacotes e suas dependências?
# operations::aur_install::common
downloading-sources = Baixando fontes
pulling-latest-changes = Obtendo mudanças recentes
cloning-aur-repo = Clonando repositório aur
down-and-ext-files = Baixando e extraindo arquivos
downloaded = Baixou!
building-packages = Construindo pacotes
built = Construído
installing-packages = Instalando pacotes
building-package = Construindo Pacote
build-failed = Construção falhou!
review-build-log = Deseja revisar o log de construção?
# operations::aur_install::aur_review
select-pkgs-review = Selecione os pacotes para revisar
do-you-still-want-to-install = Ainda deseja instalar estes pacotes?
reviewing = Revisando
select-file-review = Selecione um arquivo para revisar
done-reviewing-pkg = Terminou de revisar { $pkg }
review = Revisar { $pkg }?
# interact::theme
no-selections = Não há seleções
# operations::aur_install::repo_dependency_installation
installing-repo-deps = Instalando dependências do repositório
# operations::aur_install::aur_dependency_installation
installing-from-aur = Instalando { $amountOfPkgs } do AUR
done = Terminou!
# operations::aur_install
aur-rpc-crash = AUR RPC Call falhou: { $error }
failed-to-build = Falha ao construir
makepkg-failed = makepkg falhou
unknown-error = Erro desconhecido
# internal::error
non-zero-exit = Encerrado com código de erro non zero
build-step-violation = Construção AUR violou passos de construção
build-error = Falha ao construir pacote
user-cancel = Cancelado pelo usuário
makepkg-err = Falha ao executar makepkg
error-occurred = Um erro ocorreu
# internal::detect
sudo-prompt-failed = Pedido de sudo falhou
scanning-pacnew-files = Escaneando para pacotes pacnew
pacnew-found = Arquivos pacnew encontrados
run-pacdiff-now = Deseja executar pacdiff agora?
# internal::config
config-docs = # Veja https://getcryst.al/docs/amethyst/config para mais informações sobre teclas de configuração
# internal::paging
quit = sair
search-paging = buscar
next-result = próximo resultado
previous-result = resultado anterior
# --help
verbose = Define o nível de verbosidade
no-confirm = Completa operação sem perguntar ao usuário
quiet = Faz com que certos comandos tenham menos saída (somente clean, upgrade, e install são suportados)
sudoloop = Repete sudo no background para garantir que ele expire durante construções grandes
cachedir = Define um clone personalizado e diretório de construção para a operação especificada
install = Instala ou busca por um pacote tanto no AUR quanto nos repositórios definidos pelo Pacman
remove = Remove um pacote instalado anteriormente
query = Consulta pacotes instalados
upgrade = Atualiza pacotes instalados localmente para suas versões mais recentes (Padrão)
gencomp = Gera completações para shells suportadas (bash, fish, elvish, pwsh)
clean = Remove todos os pacotes órfãos
diff = Executa pacdiff
install-packages = O nome do(s) pacote(s) para instalar ou buscar
install-aur = Opera somente com pacotes AUR
install-repo = Opera somente com pacotes do repositório
install-search = Busca pacotes para padrão dado invés de instalar
install-by = Busca por um campo específico
query-aur = Lista pacotes AUR/exteros [-Qa, -Qm]
query-repo = Lista pacotes repo/nativos [-Qr, -Qn]
query-explicit = Lista pacotes instalados explicitamente [-Qe]
aur-warning =
O AUR é um fonte de pacotes enviadas por usuários e nem sempre é segura para o uso.
Por favor tenha certeza de revisar o PKGBUILD de tudo que baixar do AUR antes de instalar, pois alguns PKGBUILDs podem ser potencialmente maliciosos.
Este aviso pode ser alternado no arquivo de configuração.
query-info = Obtém informação de um pacote específico
query-owns = Obtém informação sobre qual pacote é dono de um arquivo
upgrade-repo = Atualiza somente pacotes repo/nativos
upgrade-aur = Atualiza somente pacotes AUR
description = Um helper AUR rápido e eficiente
capital-installed = Instalado
some-pkgs-already-installed = Alguns pacotes já estão instados. Continuar mesmo assim?
dependency-cycle = Ciclo de dependência detectado. Encerrando instalação.
couldnt-find-pkg-produced = Não foi possível encontrar o pacote { $pkg } nos pacotes produzidos
# operations::aur_install::aur_download
all-sources-ready = Todas as fontes estão prontas.
# operations::aur_install::make_dependency_removal
remove-installed-make-deps = Deseja remover as dependências make instaladas?
no-pacnew-found = Não foram encontrados arquivos .pacnew
pacnew-warning =
Parece que pelo menos um dos programas que você instalou / atualizou também instalou um arquivo de configuração .pacnew.
Esses são criados quando você modificou a configuração do programa e a atualização de pacote não consegue mesclar automaticamente o novo arquivo.
Você pode lidar com esses arquivos executando
pacdiff-warning =
Pacdiff utiliza vimdiff por padrão para editar arquivos para mesclar. Você pode focar os painéis ao passar o mouse sobre eles e pressionando o clique esquerdo, rolar o scroll para cima e para baixo (ou as teclas de seta). Para sair do vimdiff, pressione a combinação de teclas a seguir: ESC, :qa!, ENTER
Vocẽ pode suprimir este aviso no futuro mudando a configuração `pacdiff_warn` para "false" em ~/.config/ame/config.toml
checkupdates = Consulta por e retorna atualizações disponíveis de pacotes
remove-packages = O nome do(s) pacote(s) para remover
gencomp-shell = O shell para gerar completações (bash, fish, elvish, pwsh, fig)

@ -1,53 +0,0 @@
failed-clear-cache = Не удалось очистить кэш пакетов, { $error }
# operations::install
installing-packages-from-repos = Установка пакетов { $packages } из репозиториев
searching-repos = Поиск репозиториев для { $query }
searching-aur = Поиск AUR для { $query }
uninstalling-packages = Деинсталляция пакетов: { $packages }
clear-pkgbuild-cache = Очистить внутренний кэш Amethyst PKGBUILD?
# operations::upgrade
failed-upgrade-repo-pkgs = Не удалось обновить пакеты репо
scanning-for-pacnew = Сканирование на наличие файлов .pacnew после обновления
# operations::uninstall
failed-remove-pkgs = Не удалось удалить пакеты
success-upgrade-repo-pkgs = Успешно обновлены пакеты репо
review-build-log = Вы хотите просмотреть журнал сборки?
do-you-still-want-to-install = Вы все еще хотите установить эти пакеты?
# operations::aur_install::aur_dependency_installation
installing-from-aur = Установка { $amountOfPkgs } из AUR
run-pacdiff-now = Хотите ли Вы запустить pacdiff сейчас?
dependency-cycle = Обнаружен цикл зависимостей. Прерывание установки.
select-file-review = Выберите файл для просмотра
done-reviewing-pkg = Выполнен просмотр { $pkg }
build-step-violation = AUR сборка нарушила этапы сборки
couldnt-find-all-pkgs = Не удалось найти все пакеты
# internal::config
config-docs = # См. https://getcryst.al/docs/amethyst/config для получения дополнительной информации о ключах конфигурации
upgrade = Обновляет локально установленные пакеты до их последних версий (По умолчанию)
install-search = Поиск пакетов по заданному шаблону вместо установки
query-owns = Получение информации о том, какой пакет владеет файлом
checkupdates = Запрашивает и возвращает доступные обновления пакетов
remove-packages = Имя пакета(ов) для удаления
query-info = Получение информации о конкретном пакете
description = Быстрый и эффективный AUR-помощник
# --help
verbose = Устанавливает уровень многословности
no-confirm = Завершение работы без запроса пользователя
remove = Удаляет ранее установленный пакет
install-aur = Работать только с пакетами AUR
install-repo = Работать только с пакетами репо
install-by = Поиск по конкретному полю
query-aur = Списки AUR/внешних пакетов [-Qa, -Qm]
query-repo = Списки репо/родных пакетов [-Qr, -Qn]
query-explicit = Списки явно установленных пакетов [-Qe]
upgrade-aur = Обновления только из AUR
# operations::aur_install::make_dependency_removal
remove-installed-make-deps = Вы хотите удалить установленные зависимости make?
following-packages = В AUR были найдены следующие пакеты:
are-you-sure = Вы уверены, что хотите продолжить?
no-upgrades-aur-package = Нет доступных обновлений для установленных пакетов AUR
some-pkgs-already-installed = Некоторые пакеты уже установлены. Все равно продолжать?
clear-pacman-cache = Также очистить кэш пакетов Pacman?
# internal::error
non-zero-exit = Вышел с ненулевым кодом
success-clear-cache = Успешно очищен кэш пакетов

@ -1,166 +0,0 @@
# used across files
exiting = Avslutar
packages =
{ $pkgNum ->
[ett] paket
*[annat] paket
}
missing-deps = Saknade beroenden
continue = Fortsätt?
# main
run-as-root = Att köra Amethyst som root är inte tillåtet eftersom det kan leda till att systemet går sönder. Istället, så kommer Amethyst att fråga dig när det behöver superanvändarbehörigheter.
following-packages = Följande paket hittades i AUR:
aur-warning =
AUR är en källa för användaruppladdade paket/skript och är inte alltid säkert att använda.
Se till att granska PKGBUILDs för allt du laddar ner från AUR innan du installerar det, eftersom vissa PKGBUILDs kan vara skadliga.
Denna varning kan växlas till av/på i konfigurationsfilen.
are-you-sure = Är du säker att du vill fortsätta?
uninstalling-packages = Avinstallerar paket: { $packages }
system-upgrade = Utför systemuppgradering
removing-orphans = Ta bort föräldralösa paket
couldnt-find-packages = Kunde inte hitta paket: { $packages } i förråd eller på AUR
searching-repos = Söker förråd efter { $query }
searching-aur = Söker AUR efter { $query }
no-results = Inga resultat funna
results = Resultat:
installed-repo-packages = Installerade paket från förråd:
installed-aur-packages = Installerade AUR paket:
installed-packages = Installerade paket:
invalid-shell = Ogiltigt skal, { $shell }
zsh-error = Zsh-skalkompletteringar stöds för närvarande inte på grund av en bugg i clap_completion-lådan
# operations::clean
no-orphans = Inga föräldralösa paket hittades
removing-orphans-would =
Att ta bort föräldralösa paket skulle avinstallera följande paket:
{ $packages }
failed-remove-orphans = Det gick inte att ta bort föräldralösa paket
success-remove-orphans = Föräldralösa paket har tagits bort
clear-pkgbuild-cache = Rensa Amethysts interna PKGBUILD-cache?
clear-pacman-cache = Rensa också Pacmans paketcache?
failed-clear-cache = Misslyckades med att rensa paketcache, { $error }
success-clear-cache = Framgångsrikt rensade paketcache
# operations::install
installing-packages-from-repos = Installerar paket { $packages } från förråd
error-install = Ett fel inträffade när paket installerades: { $error }, avbryter
# operations::search
out-of-date = inaktuell: sedan
installed = installerades
# operations::uninstall
failed-remove-pkgs = Misslyckades att ta bort paket
# operations::upgrade
failed-upgrade-repo-pkgs = Misslyckades att uppdatera förråd paket
success-upgrade-repo-pkgs = Lyckades att uppgradera förråd paket
couldnt-find-remote-pkg = Kunde inte hitta fjärrpaket för { $pkg }
no-upgrades-aur-package = Inga uppgraderingar tillgängliga för installerade AUR-paket
scanning-for-pacnew = Söker efter .pacnew-filer efter uppgradering
# logging::output
repo-dependencies = Förråd beroenden
aur-dependencies = AUR beroenden
repo-make-dependencies = Förråd byggberoenden
aur-make-dependencies = AUR byggberoenden
version = version
votes = röster
capital-installed = Installerad
# operations::aur_install::aur_fetch
fetching-pkg-info = Hämtar paketinformation
couldnt-find-all-pkgs = Kunde inte hitta alla paket
all-pkgs-found = Alla paket hittades
some-pkgs-already-installed = Vissa paket är redan installerade. Fortsätt ändå?
do-you-want-to-install = Vill du installera dessa paket och paketberoenden?
# operations::aur_install::common
downloading-sources = Laddar ner källkod
pulling-latest-changes = Hämtar de senaste ändringarna
cloning-aur-repo = Klonar aur förråd
down-and-ext-files = Laddar ner och extraherar filer
downloaded = Nedladdat!
dependency-cycle = Beroendecykel upptäckt. Avbryter installationen.
building-packages = Bygger paket
built = Byggd
installing-packages = Installerar paket
building-package = Bygger paket
build-failed = Bygget misslyckades!
couldnt-find-pkg-produced = Det gick inte att hitta paketet { $pkg } i producerade paket
review-build-log = Vill du granska byggloggen?
# operations::aur_install::aur_review
select-pkgs-review = Valda paket att granska
do-you-still-want-to-install = Vill du fortfarande installera dessa paket?
reviewing = Granskar
select-file-review = Välj en fil att granska
done-reviewing-pkg = Klar med granskning { $pkg }
review = Granska { $pkg }?
# operations::aur_install::aur_download
all-sources-ready = Alla källor är redo.
# interact::theme
no-selections = Inga val
# operations::aur_install::repo_dependency_installation
installing-repo-deps = Installerar förråd beroenden
# operations::aur_install::aur_dependency_installation
installing-from-aur = Installerar { $amountOfPkgs } från AUR
# operations::aur_install::make_dependency_removal
remove-installed-make-deps = Vill du ta bort de installerade byggberoendena?
done = Klart!
# operations::aur_install
aur-rpc-crash = AUR RPC-anrop misslyckades med: { $error }
failed-to-build = Misslyckades att bygga
makepkg-failed = makepkg misslyckades
unknown-error = Okänt fel
# internal::error
non-zero-exit = Avslutade med annan kod än noll
build-step-violation = AUR-bygget bröt mot byggstegen
build-error = Misslyckades att bygga paket
user-cancel = Avbruten av användaren
makepkg-err = Misslyckades att köra makepkg
error-occurred = Ett fel inträffade
# internal::detect
sudo-prompt-failed = Sudo prompt misslyckades
scanning-pacnew-files = Letar efter nya pacnew filer
no-pacnew-found = Inga .pacnew filer hittades
pacnew-found = pacnew filer hittades
pacnew-warning =
Det verkar som om minst ett program du har installerat/uppgraderat har installerat en .pacnew-konfigurationsfil.
Dessa skapas när du har ändrat ett programs konfiguration, och en paketuppgradering kunde inte automatiskt slå samman den nya filen.
Du kan hantera dessa filer genom att köra
run-pacdiff-now = Vill du köra pacdiff nu?
pacdiff-warning =
Pacdiff använder vimdiff som standard för att redigera filer för sammanslagning. Du kan fokusera paneler genom att föra musen över dem och trycka på vänsterklick, och rulla upp och ner med musens rullningshjul (eller piltangenterna). För att avsluta vimdiff, tryck på följande tangentkombination: ESC, :qa!, ENTER
Du kan få tyst på denna varning i framtiden genom att ställa in `pacdiff_warn` till "false" i ~/.config/ame/config.toml
# internal::config
config-docs = # Se https://getcryst.al/docs/amethyst/config för mer information om konfigurationsnycklar
# internal::paging
quit = avsluta
search = sök
next-result = nästa resultat
previous-result = föregående resultat
# --help
verbose = Ställer in graden av detaljerad information
no-confirm = Slutför operationen utan att uppmana användaren
quiet = Gör att vissa kommandon får mindre utdata (endast rensa, uppgradera och installera stöds)
sudoloop = Slingar sudo i bakgrunden för att säkerställa att det inte tar timeout under långa byggen
cachedir = Ställer in en anpassad AUR-klon och byggkatalog för den angivna operationen
install = Installerar eller söker efter ett paket i antingen AUR eller Pacman-definierade förråd
remove = Tar bort ett tidigare installerat paket
search = Söker efter paket som matchar ett angett mönster i AUR/repos [alias: -Ss]
query = Söker efter installerade paket
upgrade = Uppgraderar lokalt installerade paket till deras senaste versioner (standard)
gencomp = Genererar skalkompletteringar för skal som stöds (bash, fish, elvish, pwsh)
clean = Tar bort alla föräldralösa paket
diff = Kör pacdiff
install-packages = Namnet på paketet/paketen som ska installeras eller sökas efter
install-aur = Operera endast på AUR-paket
install-repo = Operera endast på förrådpaket
install-search = Sök paket efter ett givet mönster istället för att installera
install-by = Söker efter ett specifikt fält
remove-packages = Namnet på paketet/paketen som ska tas bort
query-aur = Listar AUR/främmande paket [-Qa, -Qm]
query-repo = Listar förråd/infödda paket [-Qr, -Qn]
query-info = Få information om ett specifikt paket
upgrade-repo = Uppgraderar endast förråd/infödda-paket
upgrade-aur = Uppgraderar endast från AUR
gencomp-shell = Skal att generera kompletteringar för (bash, fish, elvish, pwsh, fig)
repo-check-dependencies = Repokontroll beroenden
aur-check-dependencies = AUR kontroll beroenden
query-owns = Få information om vilket paket som äger en fil
description = En snabb och effektiv AUR hjälpare
search-paging = sök
checkupdates = Söker efter och returnerar tillgängliga paketuppdateringar
query-explicit = Listar uttryckligen installerade paket [-Qe]

@ -1,164 +0,0 @@
# operations::aur_install::make_dependency_removal
remove-installed-make-deps = Видалити встановлені залежності make?
install = Встановити або шукати пакет у сховищах AUR або Pacman
upgrade = Оновлювати локально встановлені пакунки до останніх версій (за замовчуванням)
install-packages = Назва пакету(ів), який потрібно встановити або знайти
install-search = Пошук пакетів за заданим шаблоном замість встановлення
# operations::install
installing-packages-from-repos = Встановлення пакетів { $packages } зі сховищ
# used across files
exiting = Вихід
missing-deps = Відсутні залежності
continue = Продовжити?
following-packages = У AUR було знайдено такі пакунки:
are-you-sure = Продовжити?
uninstalling-packages = Видалення пакетів: { $packages }
couldnt-find-packages = Не вдалося знайти пакети: { $packages } у сховищах або AUR
searching-repos = Пошук сховищ для { $query }
installed-aur-packages = Встановлені пакети AUR:
installed-packages = Встановлені пакети:
results = Знайдено:
invalid-shell = Недійсна оболонка, { $shell }
# operations::clean
no-orphans = Загублених пакетів не знайдено
removing-orphans-would =
Видалення загублених пакетів призведе до видалення наступних пакетів:
{ $packages }
failed-remove-orphans = Не вдалося видалити загублені пакети
clear-pkgbuild-cache = Очистити внутрішній кеш PKGBUILD Amethyst?
clear-pacman-cache = Також очистити кеш пакетів Pacman?
success-clear-cache = Кеш пакетів успішно очищено
installed = встановлено
capital-installed = Встановлено
some-pkgs-already-installed = Деякі пакети вже встановлено. Усе одно продовжити?
installing-packages = Встановлення пакетів
do-you-still-want-to-install = Встановити ці пакети?
# operations::aur_install::repo_dependency_installation
installing-repo-deps = Встановлення залежностей сховища
# operations::aur_install::aur_review
select-pkgs-review = Виберіть пакети для перегляду
select-file-review = Виберіть файл для перегляду
# operations::search
out-of-date = застарілий: з
# operations::uninstall
failed-remove-pkgs = Не вдалося видалити пакети
success-upgrade-repo-pkgs = Успішно оновлено пакети сховища
couldnt-find-remote-pkg = Не вдалося знайти віддалений пакет для { $pkg }
scanning-for-pacnew = Сканування файлів .pacnew після оновлення
# logging::output
repo-dependencies = Залежності сховища
aur-dependencies = Залежності AUR
repo-check-dependencies = Перевірка залежностей сховища
repo-make-dependencies = Створення залежностей сховища
aur-check-dependencies = Первірка залежностей AUR
version = версія
# operations::aur_install::aur_fetch
fetching-pkg-info = Отримання інформації про пакет
all-pkgs-found = Усі пакунки було знайдено
# operations::aur_install::common
downloading-sources = Завантаження джерел
pulling-latest-changes = Отримання останніх змін
cloning-aur-repo = Клонування сховища aur
down-and-ext-files = Завантаження та розпакування файлів
downloaded = Завантажено!
building-packages = Збірка пакетів
built = Зібрано
building-package = Збирання пакету
build-failed = Збірка не вдалася!
review-build-log = Переглянути журнал збірки?
reviewing = Перегляд
done-reviewing-pkg = Перегляд завершено { $pkg }
review = Переглянути { $pkg }?
# interact::theme
no-selections = Нічого не обрано
votes = голоси(ів)
remove = Видалити раніше встановлений пакет
query = Запитувати встановлені пакети
done = Виконано!
# operations::aur_install
aur-rpc-crash = Помилка виклику AUR RPC з: { $error }
failed-to-build = Не вдалося виконати збірку
unknown-error = Невідома помилка
# internal::error
non-zero-exit = Завершено з ненульовим кодом
build-error = Не вдалося зібрати пакет
user-cancel = Скасовано користувачем
error-occurred = Сталась помилка
scanning-pacnew-files = Сканування файлів pacnew
no-pacnew-found = Файлів .pacnew не знайдено
run-pacdiff-now = Бажаєте запустити pacdiff зараз?
# internal::config
config-docs = # Перегляньте https://getcryst.al/docs/amethyst/config для отримання додаткової інформації про ключі конфігурації
# internal::paging
quit = вийти
search-paging = пошук
next-result = наступний результат
previous-result = попередній результат
quiet = Зменшити вивід деяких команд (підтримуються лише clean, upgrade та install)
install-aur = Працювати тільки з пакетами AUR
install-repo = Працювати лише з пакетами сховищ
remove-packages = Ім'я пакету(ів), які потрібно видалити
makepkg-err = Не вдалося виконати makepkg
# --help
verbose = Встановити рівень докладності
no-confirm = Завершити дію без запиту користувача
cachedir = Встановити спеціальний каталог для клонування AUR і збірки для вказаної дії
pacnew-found = файлів pacnew не знайдено
gencomp = Генерувати завершення командної оболонки для підтримуваних (bash, fish, elvish, pwsh)
clean = Видалити усі загублені пакети
checkupdates = Запитувати та повернути доступні оновлення пакетів
diff = Запустити pacdiff
install-by = Шукати за певним полем
sudoloop = Виконувати цикли sudo у фоновому режимі, щоб гарантувати, що час очікування не закінчиться під час тривалого збирання
query-info = Отримати інформацію про конкретний пакет
query-owns = Отримати інформацію про те, якому пакету належить файл
gencomp-shell = Командна оболонка для створення завершень (bash, fish, elvish, pwsh, fig)
description = Швидкий і ефективний помічник AUR
query-aur = Вивести список AUR/чужих пакетів [-Qa, -Qm]
query-repo = Вивести список пакетів сховищ/власні [-Qr, -Qn]
query-explicit = Вивести список явно встановлених пакунків [-Qe]
upgrade-repo = Оновити лише пакети сховищ/власні
upgrade-aur = Оновити тільки пакети з AUR
packages =
{ $pkgNum ->
[one] пакет
*[other] пакети(ів)
}
# main
run-as-root = Запуск Amethyst через root заборонено, оскільки це може призвести до поломки системи. Натомість Amethyst підказуватиме, коли йому потрібні дозволи суперкористувача.
aur-warning =
AUR є джерелом надісланих користувачами пакетів/сценаріїв і не завжди безпечний у використанні.
Обов’язково перевірте PKGBUILD усього, що ви завантажуєте з AUR, перш ніж встановлювати його, оскільки деякі PKGBUILD потенційно можуть бути шкідливими.
Це попередження можна вимкнути у файлі конфігурації.
system-upgrade = Оновлення системи
removing-orphans = Видалення загублених пакетів
searching-aur = Пошук AUR для { $query }
no-results = Нічого не знайдено
installed-repo-packages = Встановлені пакети сховища:
zsh-error = Командна оболонка Zsh наразі не підтримуються через помилку в контейнері clap_completion
success-remove-orphans = Успішно видалено загублені пакети
failed-clear-cache = Не вдалося очистити кеш пакетів, { $error }
error-install = Сталася помилка під час встановлення пакетів: { $error }, аварійне завершення
# operations::upgrade
failed-upgrade-repo-pkgs = Не вдалося оновити пакети сховища
no-upgrades-aur-package = Немає доступних оновлень для встановлених пакетів з AUR
aur-make-dependencies = Створення залежностей AUR
couldnt-find-all-pkgs = Не вдалося знайти усі пакети
do-you-want-to-install = Встановити ці пакети та їх залежності?
dependency-cycle = Виявлено цикл залежностей. Аварійне завершення.
couldnt-find-pkg-produced = Не вдалося знайти пакет { $pkg } у створених пакетах
# operations::aur_install::aur_download
all-sources-ready = Усі джерела готові.
# operations::aur_install::aur_dependency_installation
installing-from-aur = Встановлення { $amountOfPkgs } з AUR
makepkg-failed = помилка при виконанні makepkg
build-step-violation = Порушення етапів збірки при збірці AUR
# internal::detect
sudo-prompt-failed = Помилка sudo
pacnew-warning =
Схоже, що принаймні одна програма, яку ви встановили/оновили, створила файл конфігурації .pacnew.
Вони створюються, коли ви змінюєте конфігурацію програми, а оновлення пакета не може автоматично об’єднати новий файл.
Ви можете працювати з цими файлами, запустивши
pacdiff-warning =
Pacdiff використовує vimdiff за замовчуванням для редагування файлів для об’єднання. Ви можете сфокусувати панелі, навівши на них курсор і натиснувши ліву кнопку миші, а також прокручуючи вгору та вниз за допомогою коліщатка миші (або клавіш зі стрілками). Щоб вийти з vimdiff, натисніть таку комбінацію клавіш: ESC, :qa!, ENTER
Ви можете припинити це попередження у майбутньому, встановивши для `pacdiff_warn` значення "false" у ~/.config/ame/config.toml

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

@ -1,7 +1,7 @@
#![allow(clippy::module_name_repetitions)]
use crate::{fl, operations::SearchBy};
use clap::{ArgAction, Parser, Subcommand, ValueHint};
use crate::operations::SearchBy;
use clap::{Parser, Subcommand, ValueHint};
static VERSION: &str = concat!(
env!("CARGO_PKG_VERSION"),
@ -11,59 +11,64 @@ static VERSION: &str = concat!(
);
#[derive(Debug, Clone, Parser)]
#[command(bin_name = "ame", name = "Amethyst", version = VERSION, about = fl!("description"), infer_subcommands = true)]
#[clap(bin_name = "ame", name = "Amethyst", version = VERSION, about = env ! ("CARGO_PKG_DESCRIPTION"), infer_subcommands = true)]
pub struct Args {
#[command(subcommand)]
#[clap(subcommand)]
pub subcommand: Option<Operation>,
#[arg(long, short, action = ArgAction::Count, global = true, help = fl!("verbose"))]
pub verbose: u8,
/// Sets the level of verbosity
#[clap(long, short, parse(from_occurrences), global = true)]
pub verbose: usize,
#[arg(long = "noconfirm", global = true, help = fl!("no-confirm"))]
/// Complete operation without prompting user
#[clap(long = "noconfirm", global = true)]
pub no_confirm: bool,
// Not gonna lie the only reason this option is here is because
// I was trying to figure out if paccache had a --noconfirm option.
// So basically, it doesn't, but hey, we might as well have it here
// anyways as some pacman commands can have a --quiet flag passed
// to them.
#[arg(long, short, global = true, help = fl!("quiet"))]
/// Make some commands have less output
#[clap(long, short, global = true)]
pub quiet: bool,
#[arg(long = "sudoloop", global = true, help = fl!("sudoloop"))]
/// Loops sudo in the background to ensure it doesn't time out during long builds
#[clap(long = "sudoloop", global = true)]
pub sudoloop: bool,
#[arg(long, short, global = true, value_hint = ValueHint::DirPath, help = fl!("cachedir"))]
/// Sets a custom AUR clone and build directory for the specified operation
#[clap(long, short, global = true, value_hint = ValueHint::DirPath)]
pub cachedir: Option<String>,
}
#[derive(Debug, Clone, Subcommand)]
pub enum Operation {
#[command(bin_name = "ame", name = "sync", aliases = & [ "-S" ], visible_aliases = & ["install", "i"], short_flag = 'S', about = fl!("install"))]
/// Installs or searches for a package in either the AUR or the Pacman-defined repositories
#[clap(bin_name = "ame", name = "sync", aliases = & [ "-S" ], visible_aliases = & ["install", "i"], short_flag = 'S')]
Install(InstallArgs),
#[command(bin_name = "ame", name = "remove", visible_aliases = & ["rm"], short_flag = 'R', about = fl!("remove"))]
/// Removes a previously installed package
#[clap(bin_name = "ame", name = "remove", visible_aliases = & ["rm"], short_flag = 'R')]
Remove(RemoveArgs),
#[command(bin_name = "ame", name = "search", about = fl!("search"))]
/// Searches for packages matching a provided pattern in the AUR/repos [aliases: -Ss]
#[clap(bin_name = "ame", name = "search")]
Search(InstallArgs),
#[command(bin_name = "ame", name = "query", short_flag = 'Q', about = fl!("query"))]
/// Queries installed packages
#[clap(bin_name = "ame", name = "query", short_flag = 'Q')]
Query(QueryArgs),
#[command(bin_name = "ame", name = "upgrade", visible_aliases = & ["-Syu"], about = fl!("upgrade"))]
/// Upgrades locally installed packages to their latest versions (Default)
#[clap(bin_name = "ame", name = "upgrade", visible_aliases = & ["-Syu"])]
Upgrade(UpgradeArgs),
#[command(bin_name = "ame", name = "gencomp", short_flag = 'G', about = fl!("gencomp"))]
/// Generates shell completions for supported shells (bash, fish, elvish, pwsh)
#[clap(bin_name = "ame", name = "gencomp", short_flag = 'G')]
GenComp(GenCompArgs),
#[command(bin_name = "ame", name = "clean", short_flag = 'C', about = fl!("clean"))]
/// Removes all orphaned packages
#[clap(bin_name = "ame", name = "clean", short_flag = 'C')]
Clean,
#[command(bin_name = "ame", name = "checkupdates", about = fl!("checkupdates"))]
CheckUpdates,
#[command(bin_name = "ame", name = "diff", short_flag = 'd', about = fl!("diff"))]
/// Runs pacdiff
#[clap(bin_name = "ame", name = "diff", short_flag = 'd')]
Diff,
}
@ -75,57 +80,63 @@ impl Default for Operation {
#[derive(Default, Debug, Clone, Parser)]
pub struct InstallArgs {
#[arg(required = true, help = fl!("install-packages"))]
/// The name of the package(s) to install or search for
#[clap(required = true)]
pub packages: Vec<String>,
#[arg(long, short, help = fl!("install-aur"))]
/// Operate only on AUR packages
#[clap(long, short)]
pub aur: bool,
#[arg(long, short, help = fl!("install-repo"))]
/// Operate only on repo packages
#[clap(long, short)]
pub repo: bool,
#[arg(hide = true, short = 's', help = fl!("install-search"))]
/// Search packages for a given pattern instead of installing
#[clap(hidden = true, short = 's')]
pub search: bool,
#[arg(long, short, help = fl!("install-by"))]
/// Searches by a specific field
#[clap(long, short)]
pub by: Option<SearchBy>,
}
#[derive(Default, Debug, Clone, Parser)]
pub struct RemoveArgs {
#[arg(required = true, help = fl!("remove-packages"))]
/// The name of the package(s) to remove
#[clap(required = true)]
pub packages: Vec<String>,
}
#[derive(Default, Debug, Clone, Parser)]
pub struct QueryArgs {
#[arg(long, short, help = fl!("query-aur"))]
/// Lists AUR/foreign packages [-Qa, -Qm]
#[clap(long, short)]
pub aur: bool,
#[arg(long, short, help = fl!("query-repo"))]
/// Lists repo/native packages [-Qr, -Qn]
#[clap(long, short)]
pub repo: bool,
#[arg(long, short, help = fl!("query-explicit"))]
pub explicit: bool,
#[arg(long, short, help = fl!("query-info"))]
/// Get information about a specific package
#[clap(long, short)]
pub info: Option<String>,
#[arg(long, short, help = fl!("query-owns"))]
pub owns: Option<String>,
}
#[derive(Default, Debug, Clone, Parser)]
pub struct UpgradeArgs {
#[arg(long, short, help = fl!("upgrade-repo"))]
/// Upgrades only repo/native packages
#[clap(long, short)]
pub repo: bool,
#[arg(long, short, help = fl!("upgrade-aur"))]
/// Upgrades only from the AUR
#[clap(long, short)]
pub aur: bool,
}
#[derive(Default, Debug, Clone, Parser)]
pub struct GenCompArgs {
#[arg(required = true, help = fl!("gencomp-shell"))]
/// The shell to generate completions for (bash, fish, elvish, pwsh, fig)
#[clap(required = true)]
pub shell: String,
}

@ -1,8 +1,8 @@
use std::path::{Path, PathBuf};
use crate::{
use crate::internal::{
commands::ShellCommand,
error::{AppError, AppResult},
internal::commands::ShellCommand,
};
#[derive(Debug, Default)]
@ -67,33 +67,3 @@ impl GitPullBuilder {
}
}
}
#[derive(Debug, Default)]
pub struct GitResetBuilder {
directory: PathBuf,
}
impl GitResetBuilder {
pub fn directory<P: AsRef<Path>>(mut self, path: P) -> Self {
self.directory = path.as_ref().into();
self
}
pub async fn reset(self) -> AppResult<()> {
let result = ShellCommand::git()
.arg("-C")
.arg(self.directory)
.arg("reset")
.arg("HEAD")
.arg("--hard")
.wait_with_output()
.await?;
if result.status.success() {
Ok(())
} else {
Err(AppError::Other(result.stderr))
}
}
}

@ -3,8 +3,10 @@ use std::path::{Path, PathBuf};
use tokio::process::Child;
use crate::error::{AppError, AppResult};
use crate::internal::commands::ShellCommand;
use crate::internal::{
commands::ShellCommand,
error::{AppError, AppResult},
};
#[derive(Default, Debug, Clone)]
pub struct MakePkgBuilder {

@ -1,5 +1,4 @@
use crate::error::AppResult;
use crate::internal::commands::ShellCommand;
use crate::internal::{commands::ShellCommand, error::AppResult};
#[derive(Debug, Default)]
pub struct PaccacheBuilder {
@ -40,7 +39,7 @@ impl PaccacheBuilder {
}
command
.args(["-r", &format!("-k{}", self.keep)])
.args(&["-r", &format!("-k{}", self.keep)])
.wait_success()
.await
}

@ -1,5 +1,7 @@
use crate::error::{AppError, AppResult};
use crate::internal::commands::{ShellCommand, StringOutput};
use crate::internal::{
commands::{ShellCommand, StringOutput},
error::{AppError, AppResult},
};
#[derive(Debug, Default)]
pub struct PacdiffBuilder {}
@ -8,7 +10,7 @@ impl PacdiffBuilder {
#[tracing::instrument(level = "trace")]
pub async fn list() -> AppResult<StringOutput> {
let result = ShellCommand::pacdiff()
.args(["-o", "-f"])
.args(&["-o", "-f"])
.elevated()
.wait_with_output()
.await?;

@ -1,8 +1,8 @@
use std::path::{Path, PathBuf};
use crate::error::AppResult;
use crate::internal::{
commands::{ShellCommand, StringOutput},
error::AppResult,
is_tty,
structs::Options,
};
@ -13,7 +13,6 @@ pub struct PacmanInstallBuilder {
files: Vec<PathBuf>,
as_deps: bool,
no_confirm: bool,
quiet: bool,
needed: bool,
}
@ -22,7 +21,6 @@ impl PacmanInstallBuilder {
Self::default()
.as_deps(options.asdeps)
.no_confirm(options.noconfirm)
.quiet(options.quiet)
}
pub fn packages<I: IntoIterator<Item = S>, S: ToString>(mut self, packages: I) -> Self {
@ -45,12 +43,6 @@ impl PacmanInstallBuilder {
self
}
pub fn quiet(mut self, quiet: bool) -> Self {
self.quiet = quiet;
self
}
#[allow(clippy::wrong_self_convention)]
pub fn as_deps(mut self, as_deps: bool) -> Self {
self.as_deps = as_deps;
@ -78,10 +70,6 @@ impl PacmanInstallBuilder {
command = command.arg("--noconfirm")
}
if self.quiet {
command = command.arg("--quiet")
}
if self.as_deps {
command = command.arg("--asdeps")
}
@ -101,7 +89,6 @@ impl PacmanInstallBuilder {
pub struct PacmanQueryBuilder {
query_type: PacmanQueryType,
color: PacmanColor,
explicit: bool,
packages: Vec<String>,
}
@ -112,7 +99,6 @@ enum PacmanQueryType {
Info,
Native,
Orphaned,
Owns,
}
#[derive(Clone, Copy, Debug)]
@ -134,7 +120,6 @@ impl PacmanQueryBuilder {
Self {
query_type,
color: PacmanColor::default(),
explicit: false,
packages: Vec::new(),
}
}
@ -159,10 +144,6 @@ impl PacmanQueryBuilder {
Self::new(PacmanQueryType::Orphaned)
}
pub fn owns() -> Self {
Self::new(PacmanQueryType::Owns)
}
pub fn package(mut self, package: String) -> Self {
self.packages.push(package);
@ -183,12 +164,6 @@ impl PacmanQueryBuilder {
self
}
pub fn explicit(mut self, explicit: bool) -> Self {
self.explicit = explicit;
self
}
#[tracing::instrument(level = "trace")]
pub async fn query(self) -> AppResult<()> {
self.build_command().wait_success().await
@ -225,7 +200,6 @@ impl PacmanQueryBuilder {
PacmanQueryType::Info => command.arg("-i"),
PacmanQueryType::Native => command.arg("-n"),
PacmanQueryType::Orphaned => command.arg("-dtq"),
PacmanQueryType::Owns => command.arg("-o"),
PacmanQueryType::All => command,
};
@ -242,10 +216,6 @@ impl PacmanQueryBuilder {
PacmanColor::Never => command.arg("never"),
};
if self.explicit {
command = command.arg("--explicit")
}
command.args(self.packages)
}
}
@ -286,7 +256,6 @@ impl PacmanSearchBuilder {
#[derive(Default, Debug, Clone)]
pub struct PacmanUpgradeBuilder {
no_confirm: bool,
quiet: bool,
}
impl PacmanUpgradeBuilder {
@ -296,12 +265,6 @@ impl PacmanUpgradeBuilder {
self
}
pub fn quiet(mut self, quiet: bool) -> Self {
self.quiet = quiet;
self
}
#[tracing::instrument(level = "trace")]
pub async fn upgrade(self) -> AppResult<()> {
let mut command = ShellCommand::pacman().elevated().arg("-Syu");
@ -310,10 +273,6 @@ impl PacmanUpgradeBuilder {
command = command.arg("--noconfirm")
}
if self.quiet {
command = command.arg("--quiet")
}
command.wait_success().await
}
}

@ -1,7 +1,9 @@
use std::path::{Path, PathBuf};
use crate::error::AppResult;
use crate::{internal::commands::ShellCommand, with_suspended_output};
use crate::{
internal::{commands::ShellCommand, error::AppResult},
with_suspended_output,
};
#[derive(Default)]
pub struct PagerBuilder {

@ -1,7 +1,6 @@
use std::path::{Path, PathBuf};
use crate::error::AppResult;
use crate::internal::commands::ShellCommand;
use crate::internal::{commands::ShellCommand, error::AppResult};
#[derive(Debug, Default)]
pub struct RmBuilder {

@ -1,75 +0,0 @@
use std::fmt::Debug;
use crate::internal::exit_code::AppExitCode;
use crate::{fl, fl_crash};
use thiserror::Error;
pub type AppResult<T> = Result<T, AppError>;
#[derive(Debug, Error)]
#[allow(clippy::module_name_repetitions)]
pub enum AppError {
#[error("IoError: {0}")]
Io(#[from] std::io::Error),
#[error("AUR RPC call failed {0}")]
Rpc(#[from] aur_rpc::error::RPCError),
#[error("{}", fl!("build-step-violation"))]
BuildStepViolation,
#[error("{} {pkg_name}", fl!("build-error"))]
BuildError { pkg_name: String },
#[error("{}", fl!("user-cancel"))]
UserCancellation,
#[error("{} {}",fl!("missing-deps"), _0.join(", ") )]
MissingDependencies(Vec<String>),
#[error("{} {0}", fl!("makepkg-err"))]
MakePkg(String),
#[error(transparent)]
MinusError(#[from] minus::MinusError),
#[error(transparent)]
FmtError(#[from] std::fmt::Error),
#[error(transparent)]
AlpmError(#[from] crate::internal::alpm::Error),
#[error("{}", fl!("non-zero-exit"))]
NonZeroExit,
#[error("{0}")]
Other(String),
}
impl From<String> for AppError {
fn from(string: String) -> Self {
Self::Other(string)
}
}
impl From<&str> for AppError {
fn from(string: &str) -> Self {
Self::from(string.to_string())
}
}
pub trait SilentUnwrap<T> {
fn silent_unwrap(self, error_code: AppExitCode) -> T;
}
impl<T> SilentUnwrap<T> for AppResult<T> {
fn silent_unwrap(self, exit_code: AppExitCode) -> T {
match self {
Ok(val) => val,
Err(e) => {
tracing::debug!("{e}");
fl_crash!(exit_code, "error-occurred")
}
}
}
}

@ -12,16 +12,6 @@ macro_rules! prompt {
}
}
#[macro_export]
macro_rules! fl_prompt {
(default $def:tt, $message_id:literal) => {
prompt!(default $def, "{}", fl!($message_id))
};
(default $def:tt, $message_id:literal, $($arg:tt)*) => {
prompt!(default $def, "{}", fl!($message_id, $($arg)*))
};
}
#[macro_export]
/// Macro for prompting the user with a multi select
macro_rules! multi_select {

@ -1,9 +1,8 @@
use std::env;
use std::fmt::Write;
use crate::error::AppError;
use crate::error::AppResult;
use crate::fl;
use crate::internal::error::AppError;
use crate::internal::error::AppResult;
use crate::with_suspended_output;
use minus::Pager;
@ -12,13 +11,7 @@ pub fn page_string<S: ToString>(content: S) -> AppResult<()> {
let mut pager = Pager::new();
pager.set_prompt(
env::args().collect::<Vec<String>>().join(" ")
+ &format!(
" | Q: {} | /: {} | n: {} | p: {}",
fl!("quit"),
fl!("search-paging"),
fl!("next-result"),
fl!("previous-result")
),
+ " | Q: quit | /: Search | n: next result | p: previous result",
)?;
writeln!(pager, "{}", content.to_string())?;
with_suspended_output!({ minus::page_all(pager).map_err(AppError::from) })

@ -2,7 +2,7 @@ use crossterm::style::Stylize;
use dialoguer::theme::Theme;
use fuzzy_matcher::{skim::SkimMatcherV2, FuzzyMatcher};
use crate::{fl, internal::utils::wrap_text};
use crate::internal::utils::wrap_text;
const ERR_SYMBOL: &str = "X";
const PROMPT_SYMBOL: &str = "?";
@ -151,7 +151,7 @@ impl Theme for AmeTheme {
) -> std::fmt::Result {
write!(f, " {}: ", prompt.bold())?;
if selections.is_empty() {
write!(f, "{}", fl!("no-selections").italic())?;
write!(f, "{}", "No selections".italic())?;
} else {
for (idx, sel) in selections.iter().enumerate() {
write!(f, "{}{}", if idx == 0 { "" } else { ", " }, sel)?;

@ -23,8 +23,6 @@ impl Display for Error {
}
}
impl std::error::Error for Error {}
impl From<alpm::Error> for Error {
fn from(err: alpm::Error) -> Self {
Error::Alpm(err)
@ -99,19 +97,4 @@ impl Alpm {
pub fn handler(&self) -> &alpm::Alpm {
&self.0
}
pub fn group_packages(&self, group_name: String) -> Result<Vec<AlpmPackage>, Error> {
let mut packages = Vec::new();
for db in &self.0.syncdbs() {
if let Ok(group) = db.group(group_name.clone()) {
for package in group.packages() {
packages.push(AlpmPackage::Found(package));
}
}
}
if packages.is_empty() {
return Err(Error::Alpm(alpm::Error::PkgNotFound));
}
Ok(packages)
}
}

@ -4,8 +4,8 @@ use std::path::{Path, PathBuf};
use std::process::{ExitStatus, Stdio};
use tokio::process::{Child, Command};
use crate::error::{AppError, AppResult};
use crate::internal::config::Config;
use crate::internal::error::{AppError, AppResult};
use crate::internal::is_tty;
pub struct StringOutput {
@ -69,10 +69,6 @@ impl ShellCommand {
Self::new(pager)
}
pub fn checkupdates() -> Self {
Self::new("checkupdates")
}
fn new<S: ToString>(command: S) -> Self {
Self {
command: command.to_string(),

@ -5,8 +5,6 @@ use lazy_static::lazy_static;
use serde::{Deserialize, Serialize};
use std::fs;
use crate::fl;
use super::utils::get_config_dir;
#[derive(Default, Debug, Deserialize, Serialize)]
@ -19,7 +17,6 @@ pub struct Config {
#[derive(Debug, Deserialize, Serialize)]
pub struct ConfigBase {
pub pacdiff_warn: bool,
pub aur_verification_prompt: bool,
}
#[derive(Debug, Deserialize, Serialize, Default)]
@ -35,10 +32,7 @@ pub struct ConfigBin {
impl Default for ConfigBase {
fn default() -> Self {
Self {
pacdiff_warn: true,
aur_verification_prompt: true,
}
Self { pacdiff_warn: true }
}
}
@ -65,11 +59,7 @@ impl Config {
} else {
let default_conf = Config::default();
let toml_string = toml::ser::to_string_pretty(&default_conf).unwrap();
fs::write(
config_path,
format!("{}\n\n{}", fl!("config-docs"), toml_string),
)
.unwrap();
fs::write(config_path, format!("{}\n\n{}", "# See https://getcryst.al/docs/amethyst/config for more information on config keys", toml_string)).unwrap();
default_conf
}
}
@ -77,6 +67,6 @@ impl Config {
lazy_static! {
static ref CONFIG: Config = Config::read();
}
&CONFIG
&*CONFIG
}
}

@ -5,14 +5,13 @@ use futures::future;
use crate::builder::pacman::{PacmanQueryBuilder, PacmanSearchBuilder};
use crate::error::{AppError, AppResult};
use super::error::{AppError, AppResult};
use lazy_regex::regex;
#[derive(Clone, Debug)]
pub struct DependencyInformation {
pub depends: DependencyCollection,
pub make_depends: DependencyCollection,
pub check_depends: DependencyCollection,
}
#[derive(Clone, Debug, Default)]
@ -57,54 +56,15 @@ impl DependencyInformation {
/// Resolves all dependency information for a given package
#[tracing::instrument(level = "trace")]
pub async fn for_package(package: &PackageInfo) -> AppResult<Self> {
let check_depends = Self::resolve_check_depends(package).await?;
let make_depends = Self::resolve_make_depends(package).await?;
let depends = Self::resolve_depends(package).await?;
Ok(Self {
depends,
make_depends,
check_depends,
})
}
/// Resolves all check dependencies for a package
#[tracing::instrument(level = "trace")]
async fn resolve_check_depends(package: &PackageInfo) -> AppResult<DependencyCollection> {
let mut pkgs_to_resolve: HashSet<String> = package
.check_depends
.iter()
.filter_map(|d| Self::map_dep_to_name(d))
.collect();
Self::filter_fulfilled_dependencies(&mut pkgs_to_resolve).await?;
let mut already_searched = HashSet::new();
already_searched.insert(package.metadata.name.to_owned());
let mut dependencies = DependencyCollection::default();
while !pkgs_to_resolve.is_empty() {
already_searched.extend(pkgs_to_resolve.iter().cloned());
Self::extend_by_repo_packages(&mut pkgs_to_resolve, &mut dependencies).await?;
let mut aur_packages = aur_rpc::info(&pkgs_to_resolve).await.map_err(|_| {
AppError::MissingDependencies(pkgs_to_resolve.iter().cloned().collect())
})?;
aur_packages.iter().for_each(|p| {
pkgs_to_resolve.remove(&p.metadata.name);
});
let not_found = std::mem::take(&mut pkgs_to_resolve);
dependencies
.not_found
.append(&mut not_found.into_iter().collect());
pkgs_to_resolve = Self::get_filtered_check_depends(&aur_packages, &already_searched);
Self::filter_fulfilled_dependencies(&mut pkgs_to_resolve).await?;
dependencies.aur.append(&mut aur_packages);
}
Ok(dependencies)
}
/// Resolves all make dependencies for a package
#[tracing::instrument(level = "trace")]
async fn resolve_make_depends(package: &PackageInfo) -> AppResult<DependencyCollection> {
@ -192,21 +152,6 @@ impl DependencyInformation {
Ok(())
}
fn get_filtered_check_depends(
aur_packages: &[PackageInfo],
searched: &HashSet<String>,
) -> HashSet<String> {
aur_packages
.iter()
.flat_map(|p| {
p.check_depends
.iter()
.filter_map(|d| Self::map_dep_to_name(d))
})
.filter(|d| !searched.contains(d))
.collect()
}
fn get_filtered_make_depends(
aur_packages: &[PackageInfo],
searched: &HashSet<String>,
@ -287,43 +232,20 @@ impl DependencyInformation {
}
pub fn all_aur_depends(&self) -> Vec<&PackageInfo> {
let make_deps: Vec<&PackageInfo> = self
.make_depends
.aur
.iter()
.chain(self.depends.aur.iter())
.collect();
let check_deps: Vec<&PackageInfo> = self
.check_depends
self.make_depends
.aur
.iter()
.chain(self.depends.aur.iter())
.collect();
let mut combined_vec: Vec<&PackageInfo> = Vec::new();
combined_vec.extend(&make_deps);
combined_vec.extend(&check_deps);
combined_vec
.collect()
}
pub fn all_repo_depends(&self) -> Vec<&str> {
let make_deps: Vec<&str> = self
.make_depends
.repo
.iter()
.chain(self.depends.repo.iter())
.map(String::as_str)
.collect();
let check_deps: Vec<&str> = self
.check_depends
self.make_depends
.repo
.iter()
.chain(self.depends.repo.iter())
.map(String::as_str)
.collect();
let mut combined_vec: Vec<&str> = Vec::new();
combined_vec.extend(&make_deps);
combined_vec.extend(&check_deps);
combined_vec
.collect()
}
}

@ -3,18 +3,16 @@ use crossterm::style::Stylize;
use crate::builder::pacdiff::PacdiffBuilder;
use crate::internal::config::Config;
use crate::logging::get_logger;
use crate::{fl, fl_prompt, fl_warn, prompt};
use crate::prompt;
use super::prompt_sudo_single;
/// Searches the filesystem for .pacnew files and helps the user deal with them.
#[tracing::instrument(level = "trace")]
pub async fn detect() {
prompt_sudo_single()
.await
.expect(&fl!("sudo-prompt-failed"));
prompt_sudo_single().await.expect("Sudo prompt failed");
let pb = get_logger().new_progress_spinner();
pb.set_message(fl!("scanning-pacnew-files"));
pb.set_message("Scanning for pacnew files");
let mut pacnew = vec![];
@ -29,24 +27,26 @@ pub async fn detect() {
// If pacnew files are found, warn the user and prompt to pacdiff
if pacnew.is_empty() {
pb.finish_with_message(fl!("no-pacnew-found").bold().to_string());
pb.finish_with_message("No .pacnew files found".bold().to_string());
get_logger().reset_output_type();
} else {
pb.finish_with_message(fl!("pacnew-found").bold().to_string());
pb.finish_with_message("pacnew files found".bold().to_string());
get_logger().reset_output_type();
tracing::info!(
"{} {}.",
fl!("pacnew-warning"),
"It appears that at least one program you have installed / upgraded has installed a .pacnew config file. \
These are created when you have modified a program's configuration, and a package upgrade could not automatically merge the new file. \
You can deal with those files by running {}.",
"sudo pacdiff".reset().magenta()
);
let choice = fl_prompt!(default no, "run-pacdiff-now");
let choice = prompt!(default no, "Would you like to run pacdiff now?");
if choice {
let config = Config::get();
if config.base.pacdiff_warn {
fl_warn!("pacdiff-warning");
tracing::warn!("Pacdiff uses vimdiff by default to edit files for merging. You can focus panes by mousing over them and pressing left click, and scroll up and down using your mouse's scroll wheel (or the arrow keys). To exit vimdiff, press the following key combination: ESC, :qa!, ENTER");
tracing::warn!("You can surpress this warning in the future by setting `pacdiff_warn` to \"false\" in ~/.config/ame/config.toml");
if fl_prompt!(default no, "continue") {
if prompt!(default no, "Continue?") {
PacdiffBuilder::pacdiff().await.unwrap();
}
} else {

@ -0,0 +1,106 @@
use std::error::Error;
use std::fmt::{Debug, Display, Formatter};
use std::io;
use crate::crash;
use crate::internal::exit_code::AppExitCode;
pub type AppResult<T> = Result<T, AppError>;
#[derive(Debug)]
#[allow(clippy::module_name_repetitions)]
pub enum AppError {
Io(std::io::Error),
Other(String),
Rpc(aur_rpc::error::RPCError),
NonZeroExit,
BuildStepViolation,
BuildError { pkg_name: String },
UserCancellation,
MissingDependencies(Vec<String>),
MakePkg(String),
MinusError(minus::MinusError),
FmtError(std::fmt::Error),
AlpmError(crate::internal::alpm::Error),
}
impl Display for AppError {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
match self {
AppError::Io(io) => Display::fmt(io, f),
AppError::Rpc(e) => Display::fmt(e, f),
AppError::Other(s) => Display::fmt(s, f),
AppError::NonZeroExit => Display::fmt("exited with non zero code", f),
AppError::BuildStepViolation => Display::fmt("AUR build violated build steps", f),
AppError::BuildError { pkg_name } => write!(f, "Failed to build package {pkg_name}"),
AppError::UserCancellation => write!(f, "Cancelled by user"),
AppError::MissingDependencies(deps) => {
write!(f, "Missing dependencies {}", deps.join(", "))
}
AppError::MakePkg(msg) => write!(f, "Failed to run makepkg {msg}"),
AppError::MinusError(e) => Display::fmt(e, f),
AppError::FmtError(e) => Display::fmt(e, f),
AppError::AlpmError(e) => Display::fmt(e, f),
}
}
}
impl Error for AppError {}
impl From<io::Error> for AppError {
fn from(e: io::Error) -> Self {
Self::Io(e)
}
}
impl From<aur_rpc::error::RPCError> for AppError {
fn from(e: aur_rpc::error::RPCError) -> Self {
Self::Rpc(e)
}
}
impl From<String> for AppError {
fn from(string: String) -> Self {
Self::Other(string)
}
}
impl From<&str> for AppError {
fn from(string: &str) -> Self {
Self::from(string.to_string())
}
}
impl From<minus::MinusError> for AppError {
fn from(e: minus::MinusError) -> Self {
Self::MinusError(e)
}
}
impl From<std::fmt::Error> for AppError {
fn from(e: std::fmt::Error) -> Self {
Self::FmtError(e)
}
}
impl From<crate::internal::alpm::Error> for AppError {
fn from(e: crate::internal::alpm::Error) -> Self {
Self::AlpmError(e)
}
}
pub trait SilentUnwrap<T> {
fn silent_unwrap(self, error_code: AppExitCode) -> T;
}
impl<T> SilentUnwrap<T> for AppResult<T> {
fn silent_unwrap(self, exit_code: AppExitCode) -> T {
match self {
Ok(val) => val,
Err(e) => {
tracing::debug!("{e}");
crash!(exit_code, "An error occurred")
}
}
}
}

@ -0,0 +1,49 @@
use std::{
collections::VecDeque,
path::{Path, PathBuf},
};
use futures::future;
use tokio::fs;
#[tracing::instrument(level = "trace")]
pub async fn rmdir_recursive(path: &Path) -> std::io::Result<()> {
let mut files: Vec<PathBuf> = Vec::new();
let mut folders: Vec<PathBuf> = Vec::new();
if path.is_dir() {
folders.push(path.into());
} else {
files.push(path.into());
}
let mut folders_to_scan: VecDeque<_> = folders.clone().into();
while let Some(path) = folders_to_scan.pop_front() {
let mut dir_content = fs::read_dir(&path).await?;
while let Some(entry) = dir_content.next_entry().await? {
let entry = entry.path();
if entry.is_dir() {
folders_to_scan.push_back(entry.clone());
folders.push(entry);
} else {
files.push(entry);
}
}
}
tracing::debug!("Deleting {} files", files.len());
future::try_join_all(files.into_iter().map(fs::remove_file)).await?;
tracing::debug!("Deleting {} folders", folders.len());
folders.reverse();
for folder in folders {
tracing::trace!("Deleting {folder:?}");
fs::remove_dir(folder).await?;
}
Ok(())
}

@ -1,87 +0,0 @@
use i18n_embed::{
fluent::{fluent_language_loader, FluentLanguageLoader},
DesktopLanguageRequester,
};
use lazy_static::lazy_static;
use rust_embed::RustEmbed;
#[derive(RustEmbed)]
#[folder = "i18n"]
struct Localizations;
fn read() -> FluentLanguageLoader {
let loader: FluentLanguageLoader = fluent_language_loader!();
let req_langs = DesktopLanguageRequester::requested_languages();
i18n_embed::select(&loader, &Localizations, &req_langs).unwrap();
loader
}
lazy_static! {
pub static ref LANG_LOADER: FluentLanguageLoader = read();
}
#[macro_export]
macro_rules! fl {
($message_id:literal) => {{
i18n_embed_fl::fl!($crate::internal::i18n::LANG_LOADER, $message_id)
}};
($message_id:literal, $($args:expr),*) => {{
i18n_embed_fl::fl!($crate::internal::i18n::LANG_LOADER, $message_id, $($args), *)
}};
}
#[macro_export]
macro_rules! fl_debug {
($message_id:literal) => {
tracing::debug!("{}", $crate::fl!($message_id))
};
($message_id:literal, $($arg:tt)*) => {
tracing::debug!("{}", $crate::fl!($message_id, $($args)*))
};
}
#[macro_export]
macro_rules! fl_trace {
($message_id:literal) => {
tracing::trace!("{}", $crate::fl!($message_id))
};
($message_id:literal, $($arg:tt)*) => {
tracing::trace!("{}", $crate::fl!($message_id, $($args)*))
};
}
#[macro_export]
macro_rules! fl_info {
($message_id:literal) => {
tracing::info!("{}", $crate::fl!($message_id))
};
($message_id:literal, $($arg:tt)*) => {
tracing::info!("{}", $crate::fl!($message_id, $($arg)*))
};
}
#[macro_export]
macro_rules! fl_warn {
($message_id:literal) => {
tracing::warn!("{}", $crate::fl!($message_id))
};
($message_id:literal, $($arg:tt)*) => {
tracing::warn!("{}", $crate::fl!($message_id, $($arg)*))
};
}
#[macro_export]
macro_rules! fl_error {
($message_id:literal) => {
tracing::error!("{}", $crate::fl!($message_id))
};
($message_id:literal, $($arg:tt)*) => {
tracing::error!("{}", $crate::fl!($message_id, $($args)*))
};
}

@ -9,27 +9,31 @@ pub mod commands;
pub mod config;
pub mod dependencies;
mod detect;
pub mod error;
pub mod exit_code;
pub mod fs_utils;
pub mod rpc;
mod sort;
pub mod structs;
#[macro_use]
pub mod utils;
pub mod alpm;
pub mod i18n;
mod sudoloop;
#[macro_export]
macro_rules! uwu {
($x:expr) => {{
String::from($x)
.replace("l", "w")
.replace("L", "W")
.replace("r", "w")
.replace("R", "W")
.replace("na", "nya")
.replace("Na", "Nya")
.replace("NA", "NYA")
let uwu: String = String::from($x);
let uwu = uwu.replace("l", "w");
let uwu = uwu.replace("L", "W");
let uwu = uwu.replace("r", "w");
let uwu = uwu.replace("R", "W");
let uwu = uwu.replace("na", "nya");
let uwu = uwu.replace("Na", "Nya");
let uwu = uwu.replace("NA", "NYA");
uwu
}};
}
@ -49,5 +53,5 @@ pub fn uwu_enabled() -> bool {
/// Checks if we're running in a tty. If we do we can assume that
/// the output can safely be colorized.
pub fn is_tty() -> bool {
(unsafe { libc::isatty(libc::STDIN_FILENO) } != 0)
(unsafe { libc::isatty(libc::STDIN_FILENO as i32) } != 0)
}

@ -1,6 +1,6 @@
use aur_rpc::{PackageInfo, PackageMetadata, SearchField};
use crate::error::AppResult;
use super::error::AppResult;
pub const URL: &str = "https://aur.archlinux.org/";
pub async fn rpcinfo(pkg: &str) -> AppResult<Option<PackageInfo>> {

@ -21,10 +21,6 @@ pub async fn sort(input: &[String], options: Options) -> Sorted {
if package_result.is_ok() {
tracing::debug!("{} found in repos", package);
repo_packages.push(package);
} else if let Ok(pkgs) = alpm.group_packages(package.clone()) {
tracing::debug!("{} group found in repos", package);
pkgs.iter()
.for_each(|pkg| repo_packages.push(pkg.name().to_string()));
} else if aur_query.iter().any(|p| p.metadata.name == package) {
tracing::debug!("{} found in AUR", package);
aur_packages.push(package.to_string());

@ -2,7 +2,7 @@ use std::time::Duration;
use crate::ShellCommand;
use crate::error::AppResult;
use super::error::AppResult;
/// Loop sudo so it doesn't time out
#[tracing::instrument(level = "trace")]

@ -8,7 +8,7 @@ use textwrap::wrap;
use crate::{internal::exit_code::AppExitCode, logging::get_logger};
use lazy_static::lazy_static;
use crate::error::{AppError, SilentUnwrap};
use super::error::{AppError, SilentUnwrap};
#[macro_export]
/// Macro for printing a message and destructively exiting
@ -18,18 +18,6 @@ macro_rules! crash {
}
}
#[macro_export]
/// Macro for printing a message and destructively exiting
macro_rules! fl_crash {
($exit_code:expr, $message_id:literal) => {
$crate::internal::utils::log_and_crash($crate::fl!($message_id), $exit_code)
};
($exit_code:expr, $message_id:literal, $($arg:tt)*) => {
$crate::internal::utils::log_and_crash($crate::fl!($message_id, $($arg)*), $exit_code)
};
}
#[macro_export]
/// Cancelles the process
macro_rules! cancelled {
@ -54,7 +42,7 @@ pub fn get_config_dir() -> &'static Path {
static ref CONFIG_DIR: &'static Path = create_if_not_exist(get_directories().config_dir());
}
&CONFIG_DIR
*CONFIG_DIR
}
pub fn get_cache_dir() -> &'static Path {
@ -62,7 +50,7 @@ pub fn get_cache_dir() -> &'static Path {
static ref CACHE_DIR: &'static Path = create_if_not_exist(get_directories().cache_dir());
}
&CACHE_DIR
*CACHE_DIR
}
fn get_directories() -> &'static ProjectDirs {
@ -70,7 +58,7 @@ fn get_directories() -> &'static ProjectDirs {
static ref DIRECTORIES: ProjectDirs = ProjectDirs::from("com", "crystal", "ame").unwrap();
}
&DIRECTORIES
&*DIRECTORIES
}
fn create_if_not_exist(dir: &Path) -> &Path {
@ -93,8 +81,3 @@ pub fn wrap_text<S: AsRef<str>>(s: S, padding: usize) -> Vec<String> {
.map(String::from)
.collect()
}
pub fn is_run_with_root() -> bool {
let uid = unsafe { libc::geteuid() };
uid == 0
}

@ -1,124 +0,0 @@
use std::{borrow::Cow, fmt::Display};
use colored::{ColoredString, Colorize};
pub struct FmtBuilder<'a> {
options: FmtOptions,
parts: Vec<Part<'a>>,
}
pub enum Part<'a> {
Borrowed(&'a str),
Owned(String),
Colored(ColoredString),
Empty,
}
#[derive(Default)]
pub struct FmtOptions {
pub colored: bool,
}
impl<'a> FmtBuilder<'a> {
/// Creates a new builder
pub fn new() -> Self {
Self {
options: FmtOptions::default(),
parts: Vec::new(),
}
}
pub fn options(&mut self, options: FmtOptions) -> &mut Self {
self.options = options;
self
}
pub fn append<S: Into<Part<'a>>>(&mut self, part: S) -> &mut Self {
self.parts.push(part.into());
self
}
pub fn append_if<F, S>(&mut self, condition: bool, string_fn: F) -> &mut Self
where
F: Fn() -> S,
S: Into<Part<'a>>,
{
if condition {
self.append(string_fn());
}
self
}
/// Builds a string representation.
pub fn build(&self) -> String {
let string_parts = self
.parts
.iter()
.filter_map(|c| c.fmt_string(&self.options))
.collect::<Vec<_>>();
let cap = string_parts.iter().map(|c| c.len()).sum();
string_parts
.into_iter()
.fold(String::with_capacity(cap), |mut acc, e| {
acc.push_str(e.as_ref());
acc
})
}
}
impl<'a> Display for FmtBuilder<'a> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
self.build().fmt(f)
}
}
impl<'a> Part<'a> {
fn fmt_string(&self, opts: &FmtOptions) -> Option<Cow<'_, str>> {
match &self {
Part::Borrowed(b) => Some(Cow::Borrowed(b)),
Part::Owned(o) => Some(Cow::Borrowed(o)),
Part::Colored(c) => Some(Cow::Owned(Self::fmt_colored(c, opts))),
Part::Empty => None,
}
}
fn fmt_colored(c: &ColoredString, opts: &FmtOptions) -> String {
if opts.colored {
c.to_string()
} else {
c.clone().clear().to_string()
}
}
}
impl<'a> From<String> for Part<'a> {
fn from(val: String) -> Self {
Part::Owned(val)
}
}
impl<'a> From<&'a str> for Part<'a> {
fn from(val: &'a str) -> Self {
Part::Borrowed(val)
}
}
impl<'a> From<&'a String> for Part<'a> {
fn from(val: &'a String) -> Self {
Part::Borrowed(val)
}
}
impl<'a> From<ColoredString> for Part<'a> {
fn from(val: ColoredString) -> Self {
Part::Colored(val)
}
}
impl<'a, P: Into<Part<'a>>> From<Option<P>> for Part<'a> {
fn from(val: Option<P>) -> Self {
val.map(P::into).unwrap_or(Part::Empty)
}
}

@ -15,7 +15,6 @@ use fmt_layer::AmeFormatLayer;
use crate::internal::uwu_enabled;
use self::handler::LogHandler;
pub mod fmt_builder;
pub mod handler;
pub mod output;
pub mod piped_stdio;

@ -4,98 +4,63 @@ use aur_rpc::PackageInfo;
use console::Alignment;
use crossterm::style::Stylize;
use crate::{
builder::pacman::PacmanQueryBuilder, fl, internal::dependencies::DependencyInformation,
};
use crate::{builder::pacman::PacmanQueryBuilder, internal::dependencies::DependencyInformation};
use super::get_logger;
pub async fn print_dependency_list(dependencies: &[DependencyInformation]) -> bool {
let (
mut deps_repo,
mut makedeps_repo,
mut checkdeps_repo,
deps_aur,
makedeps_aur,
checkdeps_aur,
) = dependencies
let (mut deps_repo, mut makedeps_repo, deps_aur, makedeps_aur) = dependencies
.iter()
.map(|d| {
(
d.depends.repo.iter().collect(),
d.make_depends.repo.iter().collect(),
d.check_depends.repo.iter().collect(),
d.depends.aur.iter().collect(),
d.make_depends.aur.iter().collect(),
d.check_depends.aur.iter().collect(),
)
})
.fold(
(
Vec::new(),
Vec::new(),
Vec::new(),
Vec::new(),
Vec::new(),
Vec::new(),
),
(Vec::new(), Vec::new(), Vec::new(), Vec::new()),
|mut acc, mut deps| {
acc.0.append(&mut deps.0);
acc.1.append(&mut deps.1);
acc.2.append(&mut deps.2);
acc.3.append(&mut deps.3);
acc.4.append(&mut deps.4);
acc.5.append(&mut deps.5);
acc
},
);
deps_repo.dedup();
makedeps_repo.dedup();
checkdeps_repo.dedup();
let mut empty = true;
if !deps_repo.is_empty() {
tracing::info!("{}", fl!("repo-dependencies"));
tracing::info!("Repo dependencies");
get_logger().print_list(&deps_repo, " ", 2);
empty = false;
get_logger().print_newline();
}
if !deps_aur.is_empty() {
tracing::info!("{}", fl!("aur-dependencies"));
tracing::info!("AUR dependencies");
print_aur_package_list(&deps_aur).await;
empty = false;
get_logger().print_newline();
}
if !makedeps_repo.is_empty() {
tracing::info!("{}", fl!("repo-make-dependencies"));
tracing::info!("Repo make dependencies");
get_logger().print_list(&makedeps_repo, " ", 2);
empty = false;
get_logger().print_newline();
}
if !makedeps_aur.is_empty() {
tracing::info!("{}", fl!("aur-make-dependencies"));
tracing::info!("AUR make dependencies");
print_aur_package_list(&makedeps_aur).await;
empty = false;
get_logger().print_newline();
}
if !checkdeps_repo.is_empty() {
tracing::info!("{}", fl!("repo-check-dependencies"));
get_logger().print_list(&checkdeps_repo, " ", 2);
empty = false;
get_logger().print_newline();
}
if !checkdeps_aur.is_empty() {
tracing::info!("{}", fl!("aur-check-dependencies"));
print_aur_package_list(&checkdeps_aur).await;
empty = false;
get_logger().print_newline();
}
empty
}
@ -116,16 +81,14 @@ pub async fn print_aur_package_list(packages: &[&PackageInfo]) -> bool {
get_logger().print_list(
packages.iter().map(|pkg| {
format!(
"{} {} {} ({} {}) {}",
"{} version {} ({} votes) {}",
console::pad_str(&pkg.metadata.name, 30, Alignment::Left, Some("...")).bold(),
fl!("version"),
pkg.metadata.version.clone().dim(),
pkg.metadata.num_votes,
fl!("votes"),
if installed.contains_key(&pkg.metadata.name) {
format!("({})", fl!("capital-installed"))
"(Installed)"
} else {
"".to_string()
""
}
.bold()
.magenta()

@ -5,7 +5,7 @@ use tokio::{
process::{ChildStderr, ChildStdout},
};
use crate::error::{AppError, AppResult};
use crate::internal::error::{AppError, AppResult};
pub struct StdioReader {
stdout: ChildStdout,

@ -3,42 +3,38 @@ use builder::pacman::{PacmanColor, PacmanQueryBuilder};
use clap::Parser;
use internal::commands::ShellCommand;
use internal::{detect, utils};
use internal::detect;
use internal::error::SilentUnwrap;
use crate::args::{InstallArgs, Operation, QueryArgs, RemoveArgs};
use crate::error::SilentUnwrap;
use crate::interact::page_string;
use crate::internal::config::Config;
use crate::internal::exit_code::AppExitCode;
use crate::internal::{sort, start_sudoloop, structs::Options};
use crate::logging::get_logger;
use crate::logging::Printable;
use clap_complete::Shell;
use clap_complete::{Generator, Shell};
use clap_complete_fig::Fig;
use alpm::vercmp;
use std::str::FromStr;
mod args;
mod builder;
mod error;
mod interact;
mod internal;
mod logging;
mod operations;
use crate::internal::rpc::rpcinfo;
use logging::init_logger;
#[tokio::main]
async fn main() {
color_eyre::install().unwrap();
if utils::is_run_with_root() {
fl_crash!(AppExitCode::RunAsRoot, "run-as-root");
if unsafe { libc::geteuid() } == 0 {
crash!( AppExitCode::RunAsRoot, "Running amethyst as root is disallowed as it can lead to system breakage. Instead, amethyst will prompt you when it needs superuser permissions");
}
let args: Args = Args::parse();
init_logger(usize::from(args.verbose).into());
init_logger(args.verbose.into());
let noconfirm = args.no_confirm;
let quiet = args.quiet;
@ -67,14 +63,13 @@ async fn main() {
}
Operation::Query(query_args) => cmd_query(query_args).await,
Operation::Upgrade(upgrade_args) => {
fl_info!("system-upgrade");
tracing::info!("Performing system upgrade");
operations::upgrade(upgrade_args, options).await;
}
Operation::Clean => {
fl_info!("removing-orphans");
tracing::info!("Removing orphaned packages");
operations::clean(options).await;
}
Operation::CheckUpdates => cmd_checkupdates().await,
Operation::GenComp(gen_args) => cmd_gencomp(&gen_args),
Operation::Diff => detect().await,
}
@ -84,7 +79,6 @@ async fn main() {
async fn cmd_install(args: InstallArgs, options: Options) {
let packages = &args.packages;
let both = !args.aur && !args.repo;
let noconfirm = options.noconfirm;
match args.search {
true => {
@ -104,28 +98,16 @@ async fn cmd_install(args: InstallArgs, options: Options) {
if both {
let sorted = sort(packages, options).await;
if !sorted.nf.is_empty() {
fl_crash!(
crash!(
AppExitCode::PacmanError,
"couldnt-find-packages",
packages = sorted.nf.join(", ")
"Couldn't find packages: {} in repos or the AUR",
sorted.nf.join(", ")
);
}
if !sorted.repo.is_empty() {
operations::install(sorted.repo, options).await;
}
if !sorted.aur.is_empty() {
if Config::read().base.aur_verification_prompt {
fl_info!("following-packages");
get_logger().print_list(&sorted.aur, " ", 2);
newline!();
fl_warn!("aur-warning");
let cont = noconfirm || fl_prompt!(default no, "are-you-sure");
if !cont {
fl_info!("exiting");
std::process::exit(AppExitCode::PacmanError as i32);
}
}
operations::aur_install(sorted.aur, options).await;
}
}
@ -136,7 +118,7 @@ async fn cmd_install(args: InstallArgs, options: Options) {
#[tracing::instrument(level = "trace")]
async fn cmd_remove(args: RemoveArgs, options: Options) {
let packages = args.packages;
fl_info!("uninstalling-packages", packages = packages.join(", "));
tracing::info!("Uninstalling packages: {}", &packages.join(", "));
operations::uninstall(packages, options).await;
}
@ -148,20 +130,20 @@ async fn cmd_search(args: InstallArgs, options: Options) {
let mut results = Vec::new();
if args.repo || both {
fl_info!("searching-repos", query = query_string.clone());
tracing::info!("Searching repos for {}", &query_string);
let res = operations::search(&query_string, options).await;
results.extend(res);
}
if args.aur || both {
fl_info!("searching-aur", query = query_string.clone());
tracing::info!("Searching AUR for {}", &query_string);
let res = operations::aur_search(&query_string, args.by, options).await;
results.extend(res);
}
if results.is_empty() {
fl_info!("no-results");
tracing::info!("No results found");
} else {
fl_info!("results");
tracing::info!("Results:");
results.sort_by(|a, b| {
let a_score = a.score(&query_string);
@ -176,40 +158,37 @@ async fn cmd_search(args: InstallArgs, options: Options) {
get_logger().print_list(&list, "\n", 0);
if list.join("\n").lines().count() > crossterm::terminal::size().unwrap().1 as usize {
page_string(list.join("\n")).silent_unwrap(AppExitCode::Other);
page_string(&list.join("\n")).silent_unwrap(AppExitCode::Other);
}
}
}
#[tracing::instrument(level = "trace")]
async fn cmd_query(args: QueryArgs) {
let both = !args.aur && !args.repo && args.info.is_none() && args.owns.is_none();
let both = !args.aur && !args.repo && args.info.is_none();
if args.repo {
fl_info!("installed-repo-packages");
tracing::info!("Installed Repo Packages: ");
PacmanQueryBuilder::native()
.color(PacmanColor::Always)
.explicit(args.explicit)
.query()
.await
.silent_unwrap(AppExitCode::PacmanError);
}
if args.aur {
fl_info!("installed-aur-packages");
tracing::info!("Installed AUR Packages: ");
PacmanQueryBuilder::foreign()
.color(PacmanColor::Always)
.explicit(args.explicit)
.query()
.await
.silent_unwrap(AppExitCode::PacmanError);
}
if both {
fl_info!("installed-packages");
tracing::info!("Installed Packages: ");
PacmanQueryBuilder::all()
.color(PacmanColor::Always)
.explicit(args.explicit)
.query()
.await
.silent_unwrap(AppExitCode::PacmanError);
@ -218,56 +197,10 @@ async fn cmd_query(args: QueryArgs) {
if let Some(info) = args.info {
PacmanQueryBuilder::info()
.package(info)
.explicit(args.explicit)
.query()
.await
.silent_unwrap(AppExitCode::PacmanError);
}
if let Some(owns) = args.owns {
let result = PacmanQueryBuilder::owns()
.package(owns.clone())
.query()
.await;
if result.is_err() {
fl_crash!(AppExitCode::PacmanError, "error-occurred");
}
}
}
#[tracing::instrument(level = "trace")]
async fn cmd_checkupdates() {
// TODO: Implement AUR update checking, which would then respectively display in crystal-update
print!(
"{}",
ShellCommand::checkupdates()
.wait_with_output()
.await
.silent_unwrap(AppExitCode::Other)
.stdout
);
let non_native_pkgs = PacmanQueryBuilder::foreign()
.color(PacmanColor::Never)
.query_with_output()
.await
.silent_unwrap(AppExitCode::PacmanError);
tracing::debug!("aur packages: {non_native_pkgs:?}");
for pkg in non_native_pkgs {
let remote_package = rpcinfo(&pkg.name)
.await
.silent_unwrap(AppExitCode::RpcError);
if let Some(remote_package) = remote_package {
if vercmp(remote_package.metadata.version.clone(), pkg.version.clone()).is_gt() {
println!(
"{} {} -> {}",
pkg.name, pkg.version, remote_package.metadata.version
)
}
}
}
}
#[tracing::instrument(level = "trace")]
@ -281,17 +214,18 @@ fn cmd_gencomp(args: &GenCompArgs) {
);
} else {
let shell: Shell = Shell::from_str(&args.shell).unwrap_or_else(|e| {
fl_crash!(AppExitCode::Other, "invalid-shell", shell = e);
crash!(AppExitCode::Other, "Invalid shell, {}", e);
});
if shell == Shell::Zsh {
fl_crash!(AppExitCode::Other, "zsh-error");
crash!(
AppExitCode::Other,
"Zsh shell completions are currently unsupported due to a bug in the clap_completion crate"
);
};
clap_complete::generate(
shell,
&mut <args::Args as clap::CommandFactory>::command(),
"ame",
shell.generate(
&<args::Args as clap::CommandFactory>::command(),
&mut std::io::stderr(),
);
}

@ -3,10 +3,8 @@ use futures::future;
use crate::{
builder::{makepkg::MakePkgBuilder, pacman::PacmanInstallBuilder},
error::AppResult,
fl, fl_info,
internal::dependencies::DependencyInformation,
multi_progress, normal_output,
internal::{dependencies::DependencyInformation, error::AppResult},
multi_progress, normal_output, numeric,
operations::{
aur_install::common::{build_and_install, create_dependency_batches, download_aur_source},
BuildContext,
@ -31,13 +29,9 @@ impl AurDependencyInstallation {
.collect();
if !aur_dependencies.is_empty() {
fl_info!(
"installing-from-aur",
amountOfPkgs = format!(
"{} {}",
aur_dependencies.len(),
fl!("packages", pkgNum = aur_dependencies.len())
)
tracing::info!(
"Installing {} from the aur",
numeric!(aur_dependencies.len(), "package"["s"])
);
let batches = create_dependency_batches(aur_dependencies);
tracing::debug!("aur install batches: {batches:?}");

@ -3,8 +3,9 @@ use aur_rpc::PackageInfo;
use futures::future;
use crate::{
error::AppResult, fl_info, internal::dependencies::DependencyInformation,
internal::structs::Options, multi_progress, normal_output, operations::BuildContext,
internal::{dependencies::DependencyInformation, error::AppResult, structs::Options},
multi_progress, normal_output,
operations::BuildContext,
};
use super::aur_review::AurReview;
@ -31,7 +32,7 @@ impl AurDownload {
.await?;
normal_output!();
fl_info!("all-sources-ready");
tracing::info!("All sources are ready.");
Ok(AurReview {
options: self.options,

@ -1,10 +1,12 @@
use crossterm::style::Stylize;
use futures::future;
use crate::error::{AppError, AppResult};
use crate::{
fl, fl_prompt,
internal::{dependencies::DependencyInformation, structs::Options},
internal::{
dependencies::DependencyInformation,
error::{AppError, AppResult},
structs::Options,
},
logging::output::{print_aur_package_list, print_dependency_list},
normal_output, prompt, spinner,
};
@ -19,14 +21,14 @@ pub struct AurFetch {
impl AurFetch {
#[tracing::instrument(level = "trace", skip_all)]
pub async fn fetch_package_info(self) -> AppResult<AurDownload> {
let pb = spinner!("{}", fl!("fetching-pkg-info"));
let pb = spinner!("Fetching package information");
let package_infos = aur_rpc::info(&self.packages).await?;
tracing::debug!("package info = {package_infos:?}");
if package_infos.len() != self.packages.len() {
pb.finish_with_message(fl!("couldnt-find-all-pkgs").red().to_string());
pb.finish_with_message("Couldn't find all packages".red().to_string());
let mut not_found = self.packages.clone();
package_infos
.iter()
@ -34,18 +36,18 @@ impl AurFetch {
return Err(AppError::MissingDependencies(not_found));
}
pb.finish_with_message(fl!("all-pkgs-found").green().to_string());
pb.finish_with_message("All packages found".green().to_string());
normal_output!();
if print_aur_package_list(&package_infos.iter().collect::<Vec<_>>()).await
&& !self.options.noconfirm
&& !self.options.upgrade
&& !fl_prompt!(default yes, "some-pkgs-already-installed")
&& !prompt!(default yes, "Some packages are already installed. Continue anyway?")
{
return Err(AppError::UserCancellation);
}
let pb = spinner!("{}", fl!("fetching-pkg-info"));
let pb = spinner!("Fetching package information");
let dependencies = future::try_join_all(
package_infos
@ -59,7 +61,9 @@ impl AurFetch {
print_dependency_list(&dependencies).await;
if !self.options.noconfirm && !fl_prompt!(default yes, "do-you-want-to-install") {
if !self.options.noconfirm
&& !prompt!(default yes, "Do you want to install these packages and package dependencies?")
{
Err(AppError::UserCancellation)
} else {
Ok(AurDownload {

@ -1,8 +1,7 @@
use crate::error::AppResult;
use crate::{
builder::{makepkg::MakePkgBuilder, pacman::PacmanInstallBuilder},
fl,
internal::{dependencies::DependencyInformation, structs::Options},
internal::{dependencies::DependencyInformation, error::AppResult, structs::Options},
numeric,
operations::aur_install::{
common::build_and_install, make_dependency_removal::MakeDependencyRemoval,
},
@ -20,9 +19,8 @@ impl AurPackageInstall {
#[tracing::instrument(level = "trace", skip_all)]
pub async fn install_packages(self) -> AppResult<MakeDependencyRemoval> {
tracing::info!(
"Installing {} {}",
self.contexts.len(),
fl!("packages", pkgNum = self.contexts.len())
"Installing {}",
numeric!(self.contexts.len(), "package"["s"])
);
build_and_install(
self.contexts,

@ -1,10 +1,13 @@
use tokio::fs;
use crate::error::{AppError, AppResult};
use crate::{
builder::pager::PagerBuilder,
fl, fl_info, fl_prompt,
internal::{dependencies::DependencyInformation, structs::Options, utils::get_cache_dir},
internal::{
dependencies::DependencyInformation,
error::{AppError, AppResult},
structs::Options,
utils::get_cache_dir,
},
multi_select, prompt, select_opt,
};
@ -21,18 +24,12 @@ impl AurReview {
#[tracing::instrument(level = "trace", skip_all)]
pub async fn review_pkgbuild(self) -> AppResult<RepoDependencyInstallation> {
if !self.options.noconfirm {
if self.packages.len() == 1 {
if fl_prompt!(default yes, "review", pkg = self.packages[0].clone()) {
self.review_single_package(&self.packages[0]).await?;
}
} else {
let to_review = multi_select!(&self.packages, "{}", fl!("select-pkgs-review"));
let to_review = multi_select!(&self.packages, "Select packages to review");
for pkg in to_review.into_iter().filter_map(|i| self.packages.get(i)) {
self.review_single_package(pkg).await?;
}
for pkg in to_review.into_iter().filter_map(|i| self.packages.get(i)) {
self.review_single_package(pkg).await?;
}
if !fl_prompt!(default yes, "do-you-still-want-to-install") {
if !prompt!(default yes, "Do you still want to install those packages?") {
return Err(AppError::UserCancellation);
}
}
@ -44,7 +41,7 @@ impl AurReview {
}
async fn review_single_package(&self, pkg: &str) -> AppResult<()> {
tracing::info!("{} {pkg}", fl!("reviewing"));
tracing::info!("Reviewing {pkg}");
let mut files_iter = fs::read_dir(get_cache_dir().join(pkg)).await?;
let mut files = Vec::new();
@ -62,7 +59,7 @@ impl AurReview {
.map(|f| f.to_string_lossy())
.collect::<Vec<_>>();
while let Some(selection) = select_opt!(&file_names, "{}", fl!("select-file-review")) {
while let Some(selection) = select_opt!(&file_names, "Select a file to review") {
if let Some(path) = files.get(selection) {
if let Err(e) = PagerBuilder::default().path(path).open().await {
tracing::debug!("Pager error {e}");
@ -72,7 +69,7 @@ impl AurReview {
}
}
fl_info!("done-reviewing-pkg", pkg = pkg);
tracing::info!("Done reviewing {pkg}");
Ok(())
}

@ -15,10 +15,6 @@ use tokio::{
task,
};
use crate::{
builder::git::GitResetBuilder,
error::{AppError, AppResult},
};
use crate::{
builder::{
git::{GitCloneBuilder, GitPullBuilder},
@ -26,14 +22,15 @@ use crate::{
pacman::PacmanInstallBuilder,
pager::PagerBuilder,
},
crash, fl, fl_info,
crash,
internal::{
alpm::{Alpm, PackageFrom},
error::{AppError, AppResult},
exit_code::AppExitCode,
utils::{get_cache_dir, wrap_text},
},
logging::piped_stdio::StdioReader,
multi_progress, normal_output,
multi_progress, normal_output, numeric,
operations::PackageArchives,
prompt, spinner,
};
@ -44,33 +41,23 @@ use super::{BuildContext, BuildPath, BuildStep};
pub async fn download_aur_source(mut ctx: BuildContext) -> AppResult<BuildContext> {
let pkg_name = &ctx.package.metadata.name;
let base_pkg = &ctx.package.metadata.package_base;
let pb = spinner!(
"{}: {}",
pkg_name.clone().bold(),
fl!("downloading-sources")
);
let pb = spinner!("{}: Downloading sources", pkg_name.clone().bold());
let cache_dir = get_cache_dir();
let pkg_dir = cache_dir.join(pkg_name);
let pkg_dir = cache_dir.join(&pkg_name);
if pkg_dir.exists() {
pb.set_message(format!(
"{}: {}",
pkg_name.clone().bold(),
fl!("pulling-latest-changes")
"{}: Pulling latest changes",
pkg_name.clone().bold()
));
GitResetBuilder::default()
.directory(&pkg_dir)
.reset()
.await?;
GitPullBuilder::default().directory(&pkg_dir).pull().await?;
} else {
let aur_url = crate::internal::rpc::URL;
let repository_url = format!("{aur_url}/{base_pkg}");
pb.set_message(format!(
"{}: {}",
pkg_name.clone().bold(),
fl!("cloning-aur-repo")
"{}: Cloning aur repository",
pkg_name.clone().bold()
));
GitCloneBuilder::default()
@ -80,9 +67,8 @@ pub async fn download_aur_source(mut ctx: BuildContext) -> AppResult<BuildContex
.await?;
pb.set_message(format!(
"{}: {}",
pkg_name.clone().bold(),
fl!("down-and-ext-files")
"{}: Downloading and extracting files",
pkg_name.clone().bold()
));
MakePkgBuilder::default()
@ -97,7 +83,7 @@ pub async fn download_aur_source(mut ctx: BuildContext) -> AppResult<BuildContex
pb.finish_with_message(format!(
"{}: {}",
pkg_name.clone().bold(),
fl!("downloaded").green()
"Downloaded!".green()
));
ctx.step = BuildStep::Build(BuildPath(pkg_dir));
@ -147,13 +133,16 @@ pub fn create_dependency_batches(deps: Vec<&PackageInfo>) -> Vec<Vec<&PackageInf
if current_batch.is_empty() {
if relaxed {
crash!(AppExitCode::Other, "{}", fl!("dependency-cycle"));
crash!(
AppExitCode::Other,
"Dependency cycle detected. Aborting installation."
);
}
relaxed = true;
} else {
tracing::debug!("Created batch {current_batch:?}");
batches.push(current_batch.into_values().collect());
batches.push(current_batch.into_iter().map(|(_, v)| v).collect());
relaxed = false;
}
}
@ -168,9 +157,8 @@ pub async fn build_and_install(
make_opts: MakePkgBuilder,
install_opts: PacmanInstallBuilder,
) -> AppResult<()> {
fl_info!("building-packages");
tracing::info!("Building packages");
multi_progress!();
let results = future::join_all(
ctxs.into_iter()
.map(|ctx| build_package(ctx, make_opts.clone())),
@ -185,13 +173,8 @@ pub async fn build_and_install(
}
}
tracing::info!(
"{} {} {}",
fl!("built"),
ctxs.len(),
fl!("packages", pkgNum = ctxs.len())
);
fl_info!("installing-packages");
tracing::info!("Built {}", numeric!(ctxs.len(), "package"["s"]));
tracing::info!("Installing packages");
install_packages(ctxs, install_opts).await?;
@ -205,7 +188,7 @@ async fn build_package(
) -> AppResult<BuildContext> {
let pkg_name = &ctx.package.metadata.name;
let build_path = ctx.build_path()?;
let pb = spinner!("{}: {}", pkg_name.as_str().bold(), fl!("building-package"));
let pb = spinner!("{}: Building Package", pkg_name.as_str().bold());
let mut child = make_opts
.directory(build_path)
@ -231,7 +214,7 @@ async fn build_package(
pb.finish_with_message(format!(
"{}: {}",
pkg_name.as_str().bold(),
fl!("build-failed").red(),
"Build failed!".red(),
));
return Err(AppError::BuildError {
pkg_name: pkg_name.to_owned(),
@ -251,15 +234,14 @@ async fn build_package(
}
tracing::debug!("Produced packages: {pkgs_produced:#?}");
let pkg_to_install = pkgs_produced
.get(pkg_name)
.ok_or_else(|| AppError::Other(fl!("couldnt-find-pkg-produced", pkg = pkg_name.clone())))?;
let pkg_to_install = pkgs_produced.get(pkg_name).ok_or_else(|| {
AppError::Other(format!(
"Could not find package {} in produced packages",
pkg_name.clone()
))
})?;
pb.finish_with_message(format!(
"{}: {}!",
pkg_name.clone().bold(),
fl!("built").green()
));
pb.finish_with_message(format!("{}: {}", pkg_name.clone().bold(), "Built!".green()));
ctx.step = BuildStep::Install(PackageArchives(vec![pkg_to_install.to_path_buf()]));
Ok(ctx)
@ -332,7 +314,7 @@ async fn handle_build_error<E: Into<AppError>>(err: E) -> AppResult<()> {
#[tracing::instrument(level = "trace")]
async fn review_build_log(log_file: &Path) -> AppResult<()> {
if prompt!(default yes, "{}", fl!("review-build-log")) {
if prompt!(default yes, "Do you want to review the build log?") {
PagerBuilder::default().path(log_file).open().await?;
}

@ -1,8 +1,6 @@
use crate::error::AppResult;
use crate::{
builder::pacman::PacmanUninstallBuilder,
fl, fl_info, fl_prompt,
internal::{dependencies::DependencyInformation, structs::Options},
internal::{dependencies::DependencyInformation, error::AppResult, structs::Options},
prompt,
};
@ -21,7 +19,7 @@ impl MakeDependencyRemoval {
.collect::<Vec<_>>();
if !make_depends.is_empty()
&& !self.options.noconfirm
&& fl_prompt!(default yes, "remove-installed-make-deps")
&& prompt!(default yes, "Do you want to remove the installed make dependencies?")
{
PacmanUninstallBuilder::default()
.packages(make_depends)
@ -30,7 +28,7 @@ impl MakeDependencyRemoval {
.await?;
}
fl_info!("done");
tracing::info!("Done!");
Ok(())
}

@ -2,10 +2,10 @@ use aur_rpc::PackageInfo;
use std::path::{Path, PathBuf};
use crate::error::{AppError, AppResult};
use crate::internal::error::{AppError, AppResult};
use crate::internal::exit_code::AppExitCode;
use crate::{cancelled, crash, fl, fl_crash, Options};
use crate::{cancelled, crash, Options};
use self::aur_fetch::AurFetch;
@ -96,21 +96,13 @@ pub async fn aur_install(packages: Vec<String>, options: Options) {
if let Err(e) = aur_install_internal(AurInstall::new(options, packages)).await {
match e {
AppError::Rpc(e) => {
fl_crash!(
AppExitCode::RpcError,
"aur-rpc-crash",
error = e.to_string()
)
crash!(AppExitCode::RpcError, "AUR RPC Call failed with {e}")
}
AppError::BuildStepViolation => {
fl_crash!(AppExitCode::MakePkgError, "failed-to-build")
crash!(AppExitCode::MakePkgError, "Failed to build")
}
AppError::BuildError { pkg_name } => {
crash!(
AppExitCode::MakePkgError,
"{} {pkg_name}",
fl!("failed-to-build")
)
crash!(AppExitCode::MakePkgError, "Failed to build {pkg_name}")
}
AppError::UserCancellation => {
cancelled!();
@ -118,15 +110,14 @@ pub async fn aur_install(packages: Vec<String>, options: Options) {
AppError::MissingDependencies(deps) => {
crash!(
AppExitCode::MissingDeps,
"{} {}",
fl!("missing-deps"),
"Missing dependencies {}",
deps.join(", ")
)
}
AppError::MakePkg(msg) => {
crash!(AppExitCode::MakePkgError, "{} {msg}", fl!("makepkg-failed"))
crash!(AppExitCode::MakePkgError, "makepkg failed {msg}")
}
_ => fl_crash!(AppExitCode::Other, "unknown-error"),
_ => crash!(AppExitCode::Other, "Unknown error"),
}
}
}

@ -1,10 +1,8 @@
use std::collections::HashSet;
use crate::error::AppResult;
use crate::{
builder::pacman::PacmanInstallBuilder,
fl_info,
internal::{dependencies::DependencyInformation, structs::Options},
internal::{dependencies::DependencyInformation, error::AppResult, structs::Options},
};
use super::{aur_dependency_installation::AurDependencyInstallation, BuildContext};
@ -25,7 +23,7 @@ impl RepoDependencyInstallation {
.collect();
if !repo_dependencies.is_empty() {
fl_info!("installing-repo-deps");
tracing::info!("Installing repo dependencies");
PacmanInstallBuilder::default()
.as_deps(true)
.packages(repo_dependencies)

@ -2,11 +2,8 @@ use crate::builder::paccache::PaccacheBuilder;
use crate::builder::pacman::PacmanQueryBuilder;
use crate::builder::pacman::PacmanUninstallBuilder;
use crate::builder::rm::RmBuilder;
use crate::crash;
use crate::fl;
use crate::fl_crash;
use crate::fl_info;
use crate::fl_prompt;
use crate::internal::exit_code::AppExitCode;
use crate::internal::utils::get_cache_dir;
@ -27,17 +24,17 @@ pub async fn clean(options: Options) {
if orphaned_packages.stdout.as_str().is_empty() {
// If no orphaned packages found, do nothing
fl_info!("no-orphans");
tracing::info!("No orphaned packages found");
} else {
// Prompt users whether to remove orphaned packages
fl_info!(
"removing-orphans-would",
packages = orphaned_packages.stdout.trim_end()
tracing::info!(
"Removing orphans would uninstall the following packages: \n{}",
&orphaned_packages.stdout.trim_end()
);
let cont = noconfirm || prompt!(default no, "Continue?");
if !cont {
// If user doesn't want to continue, break
fl_info!("exiting");
tracing::info!("Exiting");
std::process::exit(AppExitCode::PacmanError as i32);
}
@ -60,14 +57,15 @@ pub async fn clean(options: Options) {
.await;
if result.is_err() {
fl_crash!(AppExitCode::PacmanError, "failed-remove-orphans");
crash!(AppExitCode::PacmanError, "Failed to remove orphans");
} else {
fl_info!("success-remove-orphans");
tracing::info!("Successfully removed orphans");
}
}
// Prompt the user whether to clear the Amethyst cache
let clear_ame_cache = noconfirm || fl_prompt!(default no, "clear-pkgbuild-cache");
let clear_ame_cache =
noconfirm || prompt!(default no, "Clear Amethyst's internal PKGBUILD cache?");
if clear_ame_cache {
let cache_dir = get_cache_dir();
@ -81,7 +79,7 @@ pub async fn clean(options: Options) {
}
// Prompt the user whether to clear cache or not
let clear_pacman_cache = noconfirm || fl_prompt!(default no, "clear-pacman-cache");
let clear_pacman_cache = noconfirm || prompt!(default no, "Also clear pacman's package cache?");
if clear_pacman_cache {
// Clear pacman's cache
@ -95,13 +93,13 @@ pub async fn clean(options: Options) {
.await;
if let Err(e) = result {
fl_crash!(
crash!(
AppExitCode::PacmanError,
"failed-clear-cache",
error = e.to_string()
);
"Failed to clear package cache, {}",
e
)
} else {
fl_info!("success-clear-cache");
tracing::info!("Successfully cleared package cache");
}
}
}

@ -1,13 +1,10 @@
use crate::builder::pacman::PacmanInstallBuilder;
use crate::internal::exit_code::AppExitCode;
use crate::{fl_crash, fl_info, Options};
use crate::{crash, Options};
#[tracing::instrument(level = "trace")]
pub async fn install(packages: Vec<String>, options: Options) {
fl_info!(
"installing-packages-from-repos",
packages = packages.join(", ")
);
tracing::info!("Installing packages {} from repos", &packages.join(", "));
if !packages.is_empty() {
tracing::debug!("Installing from repos: {:?}", &packages);
@ -18,10 +15,10 @@ pub async fn install(packages: Vec<String>, options: Options) {
.await;
if result.is_err() {
fl_crash!(
crash!(
AppExitCode::PacmanError,
"error-install",
error = packages.join(", ")
"An error occured while installing packages: {}, aborting",
packages.join(", "),
);
}

@ -2,14 +2,11 @@ use std::fmt::Display;
use std::fmt::Formatter;
use std::str::FromStr;
use crate::error::SilentUnwrap;
use crate::fl;
use crate::internal::alpm::Alpm;
use crate::internal::error::SilentUnwrap;
use crate::internal::exit_code::AppExitCode;
use crate::internal::rpc::rpcsearch;
use crate::internal::utils::wrap_text;
use crate::logging::fmt_builder::FmtBuilder;
use crate::logging::fmt_builder::FmtOptions;
use crate::logging::Printable;
use crate::Options;
@ -34,68 +31,97 @@ impl PackageSearchResult {
pub fn score(&self, query: &str) -> f32 {
similarity(query, &self.name)
}
fn fmt_builder(&self) -> FmtBuilder<'_> {
let mut builder = FmtBuilder::new();
builder
.append({
let repo = self.repo.clone();
if repo == "aur" {
format!("{repo}/").bold().cyan()
} else {
format!("{repo}/").bold().purple()
}
})
.append(self.name.bold())
.append(" ")
.append(self.version.bold().green())
.append_if(
!self.groups.as_ref().map(|g| g.is_empty()).unwrap_or(true),
|| {
self.groups
.as_ref()
.map(|groups| format!("({})", groups.join(",")))
.unwrap()
.bold()
.blue()
},
)
.append(
self.out_of_date
.map(|ood| Local.timestamp(ood.try_into().unwrap(), 0).date_naive())
.map(|ood| format!(" [{} {}]", fl!("out-of-date"), ood).bold().red()),
)
.append_if(self.installed, || {
format!(" [{}]", fl!("installed")).bold().cyan()
})
.append("\n ")
.append(
wrap_text(
self.description
.clone()
.unwrap_or_else(|| "No description".to_string()),
4,
)
.join("\n"),
);
builder
}
}
impl Display for PackageSearchResult {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
self.fmt_builder()
.options(FmtOptions { colored: false })
.fmt(f)
let repo = &self.repo;
let name = &self.name;
let version = &self.version;
let groups = if let Some(groups) = &self.groups {
if groups.is_empty() {
String::new()
} else {
format!("({})", groups.join(", "))
}
} else {
String::new()
};
let out_of_date = if let Some(out_of_date) = self.out_of_date {
format!(
" [out of date: since {}]",
Local
.timestamp(out_of_date.try_into().unwrap(), 0)
.date_naive()
)
} else {
String::new()
};
let installed = if self.installed {
" [installed]".to_string()
} else {
String::new()
};
let description = wrap_text(
self.description
.clone()
.unwrap_or_else(|| "No description".to_string()),
4,
)
.join("\n");
format!("{repo}{name} {version}{groups}{out_of_date}{installed}\n {description}").fmt(f)
}
}
impl Printable for PackageSearchResult {
fn to_print_string(&self) -> String {
self.fmt_builder()
.options(FmtOptions { colored: true })
.build()
let repo = if &self.repo == "aur" {
(self.repo.clone() + "/").bold().cyan()
} else {
(self.repo.clone() + "/").bold().purple()
};
let name = &self.name.bold();
let version = &self.version.bold().green();
let groups = if let Some(groups) = &self.groups {
if groups.is_empty() {
"".to_string()
} else {
format!(" ({})", groups.join(", "))
}
} else {
"".to_string()
}
.bold()
.blue();
let out_of_date = if let Some(out_of_date) = self.out_of_date {
format!(
" [out of date: since {}]",
Local
.timestamp(out_of_date.try_into().unwrap(), 0)
.date_naive()
)
} else {
"".to_string()
}
.bold()
.red();
let installed = if self.installed {
" [installed]".to_string()
} else {
"".to_string()
}
.bold()
.cyan();
let description = wrap_text(
self.description
.clone()
.unwrap_or_else(|| "No description".to_string()),
4,
)
.join("\n");
format!("{repo}{name} {version}{groups}{out_of_date}{installed}\n {description}")
}
}

@ -4,7 +4,7 @@ use tokio::fs;
use crate::builder::pacman::PacmanUninstallBuilder;
use crate::internal::exit_code::AppExitCode;
use crate::{fl_crash, Options};
use crate::{crash, Options};
/// Uninstalls the given packages
#[tracing::instrument(level = "trace")]
@ -18,7 +18,7 @@ pub async fn uninstall(packages: Vec<String>, options: Options) {
.uninstall()
.await
.unwrap_or_else(|_| {
fl_crash!(AppExitCode::PacmanError, "failed-remove-pkgs");
crash!(AppExitCode::PacmanError, "Failed to remove packages");
});
for package in packages {

@ -1,13 +1,11 @@
use alpm::vercmp;
use crate::args::UpgradeArgs;
use crate::builder::pacman::{PacmanColor, PacmanQueryBuilder, PacmanUpgradeBuilder};
use crate::error::SilentUnwrap;
use crate::internal::detect;
use crate::internal::error::SilentUnwrap;
use crate::internal::exit_code::AppExitCode;
use crate::internal::rpc::rpcinfo;
use crate::operations::aur_install::aur_install;
use crate::{fl_error, fl_info, fl_warn, Options};
use crate::{prompt, Options};
/// Upgrades all installed packages
#[tracing::instrument(level = "trace")]
@ -27,22 +25,24 @@ pub async fn upgrade(args: UpgradeArgs, options: Options) {
#[tracing::instrument(level = "trace")]
async fn upgrade_repo(options: Options) {
let noconfirm = options.noconfirm;
let quiet = options.quiet;
tracing::debug!("Upgrading repo packages");
let result = PacmanUpgradeBuilder::default()
.no_confirm(noconfirm)
.quiet(quiet)
.upgrade()
.await;
if result.is_err() {
fl_error!("failed-upgrade-repo-pkgs");
fl_info!("exiting");
std::process::exit(AppExitCode::PacmanError as i32);
let continue_upgrading = prompt!(default no,
"Failed to upgrade repo packages, continue to upgrading AUR packages?",
);
if !continue_upgrading {
tracing::info!("Exiting");
std::process::exit(AppExitCode::PacmanError as i32);
}
} else {
fl_info!("success-upgrade-repo-pkgs");
tracing::info!("Successfully upgraded repo packages");
}
}
@ -65,7 +65,7 @@ async fn upgrade_aur(options: Options) {
.silent_unwrap(AppExitCode::RpcError);
if let Some(remote_package) = remote_package {
if vercmp(remote_package.metadata.version.clone(), pkg.version.clone()).is_gt() {
if remote_package.metadata.version != pkg.version {
tracing::debug!(
"local version: {}, remote version: {}",
pkg.version,
@ -74,7 +74,7 @@ async fn upgrade_aur(options: Options) {
aur_upgrades.push(pkg.name);
}
} else {
fl_warn!("couldnt-find-remote-pkg", pkg = pkg.name);
tracing::warn!("Could not find the remote package for {}", pkg.name);
}
}
@ -85,9 +85,9 @@ async fn upgrade_aur(options: Options) {
};
aur_install(aur_upgrades, options).await;
} else {
fl_info!("no-upgrades-aur-package");
tracing::info!("No upgrades available for installed AUR packages");
}
fl_info!("scanning-for-pacnew");
tracing::info!("Scanning for .pacnew files post-upgrade");
detect().await;
}

Loading…
Cancel
Save