maximbaz / rebuild-detector

Detects which Arch Linux packages need to be rebuilt
ISC License
215 stars 11 forks source link

Warning: $HOME not set. Using /tmp. #35

Open jrd opened 3 days ago

jrd commented 3 days ago

I regulary have this in my pamac checkrebuild output:

...
Checking which packages need to be rebuilt
parallel: Warning: $HOME not set. Using /tmp.
Updating the desktop file MIME type cache...
...

You can reproduce the error easily:

$ env HOME= checkrebuild

As there is already a temporary folder named $log it’s easy to correct this:

In get_broken_ldd_pkgs around line 77:

filter_executable |
env HOME="$log" parallel --will-cite 'check_broken_ldd "{}"'

I can provide a pull request if necessary but it’s really easy to fix.

maximbaz commented 3 days ago

Thanks for the report! Makes sense to silence this warning, what do you think about https://github.com/maximbaz/rebuild-detector/commit/bcd1faeb24ca2f059e3d97b15fc40b81844860b3 ? I just went with setting it to /tmp as (1) it's what parallel itself apparently wants to fallback to, and (2) since parallel actually does create new folders and files in that folder, it might be easier to not mix that up with a folder that we actually use.