commit:     76ce5ffa89e4e188666f976c274776425358eb41
Author:     Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
AuthorDate: Sun Jul 28 20:39:20 2024 +0000
Commit:     Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
CommitDate: Sun Jul 28 20:39:20 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=76ce5ffa

app-admin/rbw: fix parser's argument group

Closes: https://bugs.gentoo.org/935517
Signed-off-by: Lucio Sauer <watermanpaint <AT> posteo.net>

 app-admin/rbw/files/rbw-1.11.1-gen-completions.patch  | 19 +++++++++++++++++++
 .../rbw/{rbw-1.11.1.ebuild => rbw-1.11.1-r1.ebuild}   |  5 ++++-
 app-admin/rbw/rbw-9999.ebuild                         |  5 ++++-
 3 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/app-admin/rbw/files/rbw-1.11.1-gen-completions.patch 
b/app-admin/rbw/files/rbw-1.11.1-gen-completions.patch
new file mode 100644
index 000000000..8f2b47996
--- /dev/null
+++ b/app-admin/rbw/files/rbw-1.11.1-gen-completions.patch
@@ -0,0 +1,19 @@
+`rbw gen-completions bash` breaks when the package was built with a debug
+profile. This is a tentative fix.
+
+Bug: https://bugs.gentoo.org/935517
+See-also: https://github.com/doy/rbw/issues/198
+Author: Lucio Sauer <[email protected]>
+--- a/src/bin/rbw/main.rs
++++ b/src/bin/rbw/main.rs
+@@ -145,8 +145,8 @@ enum Opt {
+             password to the database.",
+         visible_alias = "gen",
+         group = clap::ArgGroup::new("password-type").args(&[
+-            "no-symbols",
+-            "only-numbers",
++            "no_symbols",
++            "only_numbers",
+             "nonconfusables",
+             "diceware",
+         ])

diff --git a/app-admin/rbw/rbw-1.11.1.ebuild 
b/app-admin/rbw/rbw-1.11.1-r1.ebuild
similarity index 98%
rename from app-admin/rbw/rbw-1.11.1.ebuild
rename to app-admin/rbw/rbw-1.11.1-r1.ebuild
index 398f359a2..a1405bed3 100644
--- a/app-admin/rbw/rbw-1.11.1.ebuild
+++ b/app-admin/rbw/rbw-1.11.1-r1.ebuild
@@ -326,6 +326,8 @@ SLOT="0"
 RDEPEND="app-crypt/pinentry"
 BDEPEND=">=virtual/rust-1.74"
 
+PATCHES="${FILESDIR}"/${P}-gen-completions.patch
+
 QA_FLAGS_IGNORED="
        usr/bin/rbw
        usr/bin/rbw-agent
@@ -351,7 +353,8 @@ src_install() {
 
        local comp DOCS="CHANGELOG.md README.md"
        for comp in bash fish zsh; do
-               "$(cargo_target_dir)"/rbw gen-completions ${comp} > rbw.${comp} 
|| die
+               "$(cargo_target_dir)"/rbw gen-completions ${comp} > rbw.${comp} 
|| \
+                       die "Failed to generate completions for ${comp}."
        done
        newbashcomp rbw.bash rbw
        dofishcomp rbw.fish

diff --git a/app-admin/rbw/rbw-9999.ebuild b/app-admin/rbw/rbw-9999.ebuild
index 70fc347d0..d884f0d3b 100644
--- a/app-admin/rbw/rbw-9999.ebuild
+++ b/app-admin/rbw/rbw-9999.ebuild
@@ -29,6 +29,8 @@ SLOT="0"
 RDEPEND="app-crypt/pinentry"
 BDEPEND=">=virtual/rust-1.74"
 
+PATCHES="${FILESDIR}"/${PN}-1.11.1-gen-completions.patch
+
 QA_FLAGS_IGNORED="
        usr/bin/rbw
        usr/bin/rbw-agent
@@ -54,7 +56,8 @@ src_install() {
 
        local comp DOCS="CHANGELOG.md README.md"
        for comp in bash fish zsh; do
-               "$(cargo_target_dir)"/rbw gen-completions ${comp} > rbw.${comp} 
|| die
+               "$(cargo_target_dir)"/rbw gen-completions ${comp} > rbw.${comp} 
|| \
+                       die "Failed to generate completions for ${comp}."
        done
        newbashcomp rbw.bash rbw
        dofishcomp rbw.fish

Reply via email to