forked from termux/termux-packages
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
21 changed files
with
2,197 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
From abad5e3de2d680f905d4b95349b1d6926cea36c2 Mon Sep 17 00:00:00 2001 | ||
From: David Knaack <[email protected]> | ||
Date: Mon, 21 Oct 2024 19:10:17 +0200 | ||
Subject: [PATCH] fix(username): avoid using `whoami` on android | ||
|
||
Closes #6340 | ||
|
||
Co-Authored-By: AminurAlam <[email protected]> | ||
--- | ||
src/modules/username.rs | 4 ++-- | ||
1 file changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/src/modules/username.rs b/src/modules/username.rs | ||
index 8ba3509e44b9..59d6f8330f51 100644 | ||
--- a/src/modules/username.rs | ||
+++ b/src/modules/username.rs | ||
@@ -19,13 +19,13 @@ const USERNAME_ENV_VAR: &str = "USERNAME"; | ||
/// Does not display the username: | ||
/// - If the option `username.detect_env_vars` is set with a negated environment variable [A] | ||
pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> { | ||
- #[cfg(not(test))] | ||
+ #[cfg(not(any(test, target_os = "android")))] | ||
let mut username = whoami::fallible::username() | ||
.inspect_err(|e| log::debug!("Failed to get username {e:?}")) | ||
.ok() | ||
.or_else(|| context.get_env(USERNAME_ENV_VAR))?; | ||
|
||
- #[cfg(test)] | ||
+ #[cfg(any(test, target_os = "android"))] | ||
let mut username = context.get_env(USERNAME_ENV_VAR)?; | ||
|
||
let mut module = context.new_module("username"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
diff --git a/src/common/dir.c b/src/common/dir.c | ||
index 59db410..fdce0ed 100644 | ||
--- a/src/common/dir.c | ||
+++ b/src/common/dir.c | ||
@@ -30,7 +30,7 @@ static struct dir config_dirs[] = { | ||
.path = "labwc" | ||
}, { | ||
.prefix = "XDG_CONFIG_DIRS", | ||
- .default_prefix = "/etc/xdg", | ||
+ .default_prefix = "@TERMUX_PREFIX@/etc/xdg", | ||
.path = "labwc", | ||
}, { | ||
.path = NULL, | ||
@@ -47,7 +47,7 @@ static struct dir theme_dirs[] = { | ||
.path = ".themes", | ||
}, { | ||
.prefix = "XDG_DATA_DIRS", | ||
- .default_prefix = "/usr/share:/usr/local/share:/opt/share", | ||
+ .default_prefix = "@TERMUX_PREFIX@/share:@TERMUX_PREFIX@/local/share:@TERMUX_PREFIX@/opt/share", | ||
.path = "themes", | ||
}, { | ||
.path = NULL, |
Oops, something went wrong.