Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#21771 - [pkgtools-21] /etc/profile.d/pkgfile-hook.sh refer to $HOME/.pkgtools/pkgfile.conf

Attached to Project: Community Packages
Opened by solsTiCe (zebul666) - Sunday, 21 November 2010, 11:03 GMT
Last edited by Gavin Bisesi (Daenyth) - Sunday, 16 January 2011, 20:29 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Gavin Bisesi (Daenyth)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

pkgfile is supposed to use XDG settings and has its own config file in $HOME/.config/pkgtools/pkgfile.conf

so /etc/profile.d/pkgfile-hook.sh is wrong bacause it cehcks for $HOME/.pkgtools/pkgfile.conf

But that's not all.

I am using GDM and non-logins shell in my terminals. And command_not_found_handle function is never defined because /etc/profile.d/pkgfile-hook.sh is not run for non-login shell. (it is run once for the non-interactive login shell run by GDM but the fucntion is not exported, so not visible for all children shell)

One way to fix this is to export the function command_not_found_handle in /usr/share/pkgtools/pkgfile-hook.bash with
export -f command_not_found_handle
in that same file

but is this desirable because EVERY shell will have that command defined and not necesseraly return an error when a command is not found ?

so this feature seems kind of broken and doomed to me.

those profile file better be removed and ask the user to manually add the content of /usr/share/pkgtools/pkgfile-hook.bash (that defines command_not_found_handle) to its .bashrc.
This task depends upon

Closed by  Gavin Bisesi (Daenyth)
Sunday, 16 January 2011, 20:29 GMT
Reason for closing:  Fixed
Comment by solsTiCe (zebul666) - Sunday, 21 November 2010, 11:17 GMT
also one needed improvement to command_not_command_handle would be to return the same error code than bash and write to stderr instead of stdout
for example

printf "bash: $(gettext bash "%s: command not found")\n" $command >&2
return 127

and this fix might allow to use the export -f command_not_found_handle without any damage or fear of any wrong behavior
Comment by solsTiCe (zebul666) - Monday, 22 November 2010, 14:53 GMT
so using the setup i mentionnned above with 2 modified line in command_not_found_handle, and using CMD_SEARCH_ENABLED=1 seems to be the cause of a fork-bomb when running
autoconf --version
which calls himself recursvily ad infinitam

this has to be confirmed obviously. And I have no idea why this is happening.

Loading...