Theo,

rust in ports contains a patch to use getexecpath() for current_exe() that
makes this workaround outdate.

Ok to drop it?

Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/jujutsu/Makefile,v
diff -u -p -r1.40 Makefile
--- Makefile    4 Sep 2026 10:13:20 -0000       1.40
+++ Makefile    5 Sep 2026 14:40:05 -0000
@@ -1,6 +1,7 @@
 COMMENT =              version control system with git compatibility backend
 
 V =                    0.45.1
+REVISION =             0
 PKGNAME =              jujutsu-$V
 
 DIST_TUPLE =           github jj-vcs jj v$V .
@@ -29,11 +30,6 @@ SEPARATE_BUILD =     Yes
 RUN_DEPENDS =          devel/git
 
 MODCARGO_INSTALL_TARGET_PATHS =        cli
-
-post-patch:
-       ${SUBST_CMD} \
-               ${WRKSRC}/cli/src/commands/bisect/run.rs \
-               ${WRKSRC}/cli/src/complete.rs
 
 JJ =   ${WRKBUILD}/target/release/jj
 
Index: patches/patch-cli_src_commands_bisect_run_rs
===================================================================
RCS file: patches/patch-cli_src_commands_bisect_run_rs
diff -N patches/patch-cli_src_commands_bisect_run_rs
--- patches/patch-cli_src_commands_bisect_run_rs        3 Sep 2026 05:46:27 
-0000       1.7
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,24 +0,0 @@
-Sigh.
-
-Index: cli/src/commands/bisect/run.rs
---- cli/src/commands/bisect/run.rs.orig
-+++ cli/src/commands/bisect/run.rs
-@@ -26,7 +26,6 @@ use crate::cli_util::WorkspaceCommandHelper;
- use crate::cli_util::short_operation_hash;
- use crate::command_error::CommandError;
- use crate::command_error::cli_error;
--use crate::command_error::internal_error_with_message;
- use crate::command_error::user_error;
- use crate::command_error::user_error_with_message;
- use crate::complete;
-@@ -281,9 +280,7 @@ async fn evaluate_commit(
-     )
-     .await?;
- 
--    let jj_executable_path = std::env::current_exe().map_err(|err| {
--        internal_error_with_message("Could not get path for the jj 
executable", err)
--    })?;
-+    let jj_executable_path = "${LOCALBASE}/bin/jj";
-     tracing::info!(?cmd, "running bisection evaluation command");
-     let status = cmd
-         .env("JJ_EXECUTABLE_PATH", jj_executable_path)
Index: patches/patch-cli_src_complete_rs
===================================================================
RCS file: patches/patch-cli_src_complete_rs
diff -N patches/patch-cli_src_complete_rs
--- patches/patch-cli_src_complete_rs   3 Sep 2026 05:46:27 -0000       1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-Soupir.
-
-Index: cli/src/complete.rs
---- cli/src/complete.rs.orig
-+++ cli/src/complete.rs
-@@ -1172,7 +1172,7 @@ where
- /// the preferred method, because it's more maintainable and the performance
- /// requirements of completions aren't very high.
- fn get_jj_command() -> Result<(JjBuilder, UserSettings), CommandError> {
--    let current_exe = std::env::current_exe().map_err(user_error)?;
-+    let current_exe = std::path::PathBuf::from("${LOCALBASE}/bin/jj");
-     let mut cmd_args = Vec::<String>::new();
- 
-     // Snapshotting could make completions much slower in some situations


-- 
wbr, Kirill

Reply via email to