FS#6255 - extend pacman to recognize new files in /etc/profile.d/ and act... somehow.

Attached to Project: Pacman
Opened by Jens Adam (byte) - Tuesday, 23 January 2007, 03:56 GMT
Last edited by Aaron Griffin (phrakture) - Friday, 11 May 2007, 18:24 GMT
Task Type Feature Request
Category
Status Closed
Assigned To Aaron Griffin (phrakture)
Architecture not specified
Severity Low
Priority Normal
Reported Version 0.7.2 Gimmick
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

http://bbs.archlinux.org/viewtopic.php?t=28455 had some great ideas, but mostly about .install files.
The 'profile.d problem' comes up very often on the forums and IRC, so I think it would be nice to either notify the user about it or even source /etc/profile automatically.
On the other hand, maintainers of such packages could just echo a hint in the .install file.
This task depends upon

Closed by  Aaron Griffin (phrakture)
Friday, 11 May 2007, 18:24 GMT
Reason for closing:  Won't implement
Additional comments about closing:  See final two comments
Comment by Dan McGee (toofishes) - Wednesday, 21 February 2007, 22:53 GMT
Posting this here from the BBS as said by phrakture:

When I finally get around to adding a global "on install" system, which I plan on doing, this will be cake. The idea came from the fact that I want some sort of trigger when "/usr/include" is touched by pacman, to re-run ctags for my global tag file. So, in theory, we have a file pattern and a command to run. It would be very easy to have "match *" run something like "check-front-page-news.py"
Comment by Aaron Griffin (phrakture) - Friday, 23 February 2007, 17:15 GMT
Another case where this would be useful:
http://bbs.archlinux.org/viewtopic.php?id=29518
Comment by Aaron Griffin (phrakture) - Friday, 11 May 2007, 17:38 GMT
Just tacking a comment on here: Re-running profile.d scripts is impossible due to the privilege separation that Unix/Linux has.

Phrased better: If pacman is run with su or sudo, there is no way to react, in the user's session, once pacman completes. The only possible way to do something like this is a script that does the following:

* check profile.d scripts (store mtimes?)
* run "sudo pacman" with script args
* compare profile.d scripts and rerun ones with newer mtimes
Comment by Dan McGee (toofishes) - Friday, 11 May 2007, 18:18 GMT
This is something that still won't work all that well even if implemented.

Most people encounter this in the context of a desktop environment, and sourcing /etc/profile.d/* still won't help them. Why isn't firefox starting when I type firefox in my panel command line? A login/logout is still the best way to take care of this.

I think this one could be closed as "not implementing", as the situations where it comes into play are rare (especially since we just moved gnome and xfce out of /opt).

Loading...