commit:     0883a2c682f0fd49e4bb0dcf35b64d39e7a052c5
Author:     ingenarel <ingenarelitems <AT> gmail <DOT> com>
AuthorDate: Mon Dec  8 22:54:42 2025 +0000
Commit:     Saad Abdullah <ingenarelitems <AT> gmail <DOT> com>
CommitDate: Wed Dec 10 01:13:29 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0883a2c6

app-misc/watchexec: update format

- modify src_unpack() internally instead of redefining:
  functions should be defined on the order that they are called
  for more info, check:
  
https://github.com/gentoo/guru/commit/e19c6d574461655f11cb1c6e1b37ff22c9a6ff70#commitcomment-172006236

- fixed the long line which fixes the following pkgcheck error:
  app-misc/watchexec
    ExcessiveLineLength: version 2.3.2: excessive line length
    (over 120 characters) on line: 8

- used ${var} instead of $var which was recommended by negril

Signed-off-by: ingenarel <ingenarelitems <AT> gmail.com>

 app-misc/watchexec/watchexec-2.3.2.ebuild | 19 +++++++++++++------
 app-misc/watchexec/watchexec-9999.ebuild  | 15 ++++++++++-----
 2 files changed, 23 insertions(+), 11 deletions(-)

diff --git a/app-misc/watchexec/watchexec-2.3.2.ebuild 
b/app-misc/watchexec/watchexec-2.3.2.ebuild
index d7244e6c44..dda7fd7a67 100644
--- a/app-misc/watchexec/watchexec-2.3.2.ebuild
+++ b/app-misc/watchexec/watchexec-2.3.2.ebuild
@@ -5,7 +5,9 @@
 
 EAPI=8
 
-# pycargoebuild -i watchexec-<$PV>.ebuild $(find watchexec/crates -regextype 
egrep -regex '.*watchexec/crates/.*Cargo.toml' | sed -E 's/Cargo.toml//')
+# find watchexec/crates -maxdepth 2 -type f  -name 'Cargo.toml' -print0 |
+# xargs --null dirname --zero |
+# xargs --null sudo pycargoebuild -i watchexec-${PV}.ebuild
 CRATES="
        [email protected]
        [email protected]
@@ -508,13 +510,9 @@ inherit cargo shell-completion
 DESCRIPTION="Executes commands in response to file modifications"
 HOMEPAGE="https://watchexec.github.io";
 
-if [[ "$PV" == 9999 ]]; then
+if [[ "${PV}" == 9999 ]]; then
        inherit git-r3
        EGIT_REPO_URI="https://github.com/watchexec/watchexec.git";
-       src_unpack() {
-               git-r3_src_unpack
-               cargo_live_src_unpack
-       }
 else
        
SRC_URI="https://github.com/watchexec/${PN}/archive/refs/tags/v${PV}.tar.gz -> 
${P}.tar.gz"
        SRC_URI+=" ${CARGO_CRATE_URIS}"
@@ -537,6 +535,15 @@ DOCS=( crates/cli/README.md )
 # update with proper path to binaries this crate installs, omit leading /
 QA_FLAGS_IGNORED="usr/bin/${PN}"
 
+src_unpack() {
+       if [[ "${PV}" == 9999 ]];then
+               git-r3_src_unpack
+               cargo_live_src_unpack
+       else
+               cargo_src_unpack
+       fi
+}
+
 src_compile() {
        cargo_src_compile --manifest-path=crates/cli/Cargo.toml
 }

diff --git a/app-misc/watchexec/watchexec-9999.ebuild 
b/app-misc/watchexec/watchexec-9999.ebuild
index 0c2793dfa4..2ae774108e 100644
--- a/app-misc/watchexec/watchexec-9999.ebuild
+++ b/app-misc/watchexec/watchexec-9999.ebuild
@@ -15,13 +15,9 @@ inherit cargo shell-completion
 DESCRIPTION="Executes commands in response to file modifications"
 HOMEPAGE="https://watchexec.github.io";
 
-if [[ "$PV" == 9999 ]]; then
+if [[ "${PV}" == 9999 ]]; then
        inherit git-r3
        EGIT_REPO_URI="https://github.com/watchexec/watchexec.git";
-       src_unpack() {
-               git-r3_src_unpack
-               cargo_live_src_unpack
-       }
 else
        
SRC_URI="https://github.com/watchexec/${PN}/archive/refs/tags/v${PV}.tar.gz -> 
${P}.tar.gz"
        SRC_URI+=" ${CARGO_CRATE_URIS}"
@@ -44,6 +40,15 @@ DOCS=( crates/cli/README.md )
 # update with proper path to binaries this crate installs, omit leading /
 QA_FLAGS_IGNORED="usr/bin/${PN}"
 
+src_unpack() {
+       if [[ "${PV}" == 9999 ]];then
+               git-r3_src_unpack
+               cargo_live_src_unpack
+       else
+               cargo_src_unpack
+       fi
+}
+
 src_compile() {
        cargo_src_compile --manifest-path=crates/cli/Cargo.toml
 }

Reply via email to