Skip to content

Commit

Permalink
Add a hack to get rid of ~/.rpmdb
Browse files Browse the repository at this point in the history
This commit overshadows `rpm` with an alias that points `--dbpath` to a
location under `XDG_CACHE_HOME`.

This of course has the problem of only being applied in ZSH contexts,
but it's a step towards a clean HOME under Ubuntu.
  • Loading branch information
matyama committed Mar 11, 2024
1 parent 4f7f79b commit 1f2a9a8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .config/zsh/.zshenv
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ export VIMRC=${XDG_CONFIG_HOME}/nvim/init.vim
export NAME="Martin Matyášek"
export EMAIL=martin.matyasek@gmail.com

# RPM: hack to get rid of `~/.rpmdb` on Ubuntu (https://askubuntu.com/a/476941)
# - Currently this is hard-coded: `rpm -v --showrc | grep "/.rpmdb"`
# - Note that it should be safe to delete the dir, hence the `XDG_CACHE_HOME`
alias rpm="rpm --dbpath=${XDG_CACHE_HOME}/rpmdb"

# CUDA
export CUDA_CACHE_PATH=${XDG_CACHE_HOME}/nv

Expand Down

0 comments on commit 1f2a9a8

Please sign in to comment.