Unregistering lots of packages

Unregistering lots of packages is quite slow now, since we run haddock in the unregister script (to recompute the index?). Any thoughts on how to avoid it?

On Sat, Aug 22, 2009 at 11:35 PM, Don Stewart
Unregistering lots of packages is quite slow now, since we run haddock in the unregister script (to recompute the index?).
Any thoughts on how to avoid it?
Does pacman support some sort of post-{remove,install} operations? Everything else I can think of has the feeling of being incredibly hack-y or require user interaction. /M -- Magnus Therning (OpenPGP: 0xAB4DFBA4) magnus@therning.org Jabber: magnus@therning.org http://therning.org/magnus identi.ca|twitter: magthe

2009/8/23 Magnus Therning
On Sat, Aug 22, 2009 at 11:35 PM, Don Stewart
wrote: Unregistering lots of packages is quite slow now, since we run haddock in the unregister script (to recompute the index?).
Any thoughts on how to avoid it?
Does pacman support some sort of post-{remove,install} operations?
Everything else I can think of has the feeling of being incredibly hack-y or require user interaction.
Yes, through the post_install() and post_remove() functions in the install script (sample at /usr/share/pacman/proto.install) Abhishek

On Mon, Aug 24, 2009 at 9:02 AM, Abhishek Dasgupta
2009/8/23 Magnus Therning
: On Sat, Aug 22, 2009 at 11:35 PM, Don Stewart
wrote: Unregistering lots of packages is quite slow now, since we run haddock in the unregister script (to recompute the index?).
Any thoughts on how to avoid it?
Does pacman support some sort of post-{remove,install} operations?
Everything else I can think of has the feeling of being incredibly hack-y or require user interaction.
Yes, through the post_install() and post_remove() functions in the install script (sample at /usr/share/pacman/proto.install)
Not exactly what I meant. That is still per package, and if I understand Don correctly it's the fact that _every_ Haskell package does the same thing in its post_{install,remove}() (rebuilding the Haddock index) that is bothering him. What I so clumsily tried to ask was if pacman has a post-{install,remove} action that _isn't_ per package but rather per invocation of pacman. In this example, it would be nice to rebuild the haddock index once rather than once per package. /M -- Magnus Therning (OpenPGP: 0xAB4DFBA4) magnus@therning.org Jabber: magnus@therning.org http://therning.org/magnus identi.ca|twitter: magthe

2009/8/24 Magnus Therning
On Mon, Aug 24, 2009 at 9:02 AM, Abhishek Dasgupta
wrote: Yes, through the post_install() and post_remove() functions in the install script (sample at /usr/share/pacman/proto.install)
Not exactly what I meant. That is still per package, and if I understand Don correctly it's the fact that _every_ Haskell package does the same thing in its post_{install,remove}() (rebuilding the Haddock index) that is bothering him. What I so clumsily tried to ask was if pacman has a post-{install,remove} action that _isn't_ per package but rather per invocation of pacman. In this example, it would be nice to rebuild the haddock index once rather than once per package.
What you're talking of is a general hook mechanism which is being considered for pacman as it would not only simplify this case, but also allow us to update man-db, update the icon cache and mime cache etc. automatically, after all the packages in a pacman transaction have finished installing. Some initial discussion on this has taken place [1] [2], but I don't think anything concrete has happened. [1]: http://wiki.archlinux.org/index.php/User:Allan/Pacman_Hooks [2]: http://archlinux.org/pipermail/pacman-dev/2008-August/007421.html Abhishek

magnus:
On Mon, Aug 24, 2009 at 9:02 AM, Abhishek Dasgupta
wrote: 2009/8/23 Magnus Therning
: On Sat, Aug 22, 2009 at 11:35 PM, Don Stewart
wrote: Unregistering lots of packages is quite slow now, since we run haddock in the unregister script (to recompute the index?).
Any thoughts on how to avoid it?
Does pacman support some sort of post-{remove,install} operations?
Everything else I can think of has the feeling of being incredibly hack-y or require user interaction.
Yes, through the post_install() and post_remove() functions in the install script (sample at /usr/share/pacman/proto.install)
Not exactly what I meant. That is still per package, and if I understand Don correctly it's the fact that _every_ Haskell package does the same thing in its post_{install,remove}() (rebuilding the Haddock index) that is bothering him. What I so clumsily tried to ask was if pacman has a post-{install,remove} action that _isn't_ per package but rather per invocation of pacman. In this example, it would be nice to rebuild the haddock index once rather than once per package.
Ah, I see: it is rebuilding the index each time, which is slow. So bulk remove (i.e. after I do a hackage build) is slow. Maybe I should just use the chroot and blow that away instead. -- Don

Don Stewart wrote:
magnus:
2009/8/23 Magnus Therning
: On Sat, Aug 22, 2009 at 11:35 PM, Don Stewart
wrote: Unregistering lots of packages is quite slow now, since we run haddock in the unregister script (to recompute the index?).
Any thoughts on how to avoid it? Does pacman support some sort of post-{remove,install} operations?
Everything else I can think of has the feeling of being incredibly hack-y or require user interaction.
Yes, through the post_install() and post_remove() functions in the install script (sample at /usr/share/pacman/proto.install) Not exactly what I meant. That is still per package, and if I understand Don correctly it's the fact that _every_ Haskell package does the same thing in its post_{install,remove}() (rebuilding the Haddock index) that is bothering him. What I so clumsily tried to ask was if pacman has a post-{install,remove} action that _isn't_ per
On Mon, Aug 24, 2009 at 9:02 AM, Abhishek Dasgupta
wrote: package but rather per invocation of pacman. In this example, it would be nice to rebuild the haddock index once rather than once per package. Ah, I see: it is rebuilding the index each time, which is slow. So bulk remove (i.e. after I do a hackage build) is slow.
Maybe I should just use the chroot and blow that away instead.
Using a chroot sounds like a good idea, not only to address this particular issue. /M -- Magnus Therning (OpenPGP: 0xAB4DFBA4) magnus@therning.org Jabber: magnus@therning.org http://therning.org/magnus identi.ca|twitter: magthe
participants (3)
-
Abhishek Dasgupta
-
Don Stewart
-
Magnus Therning