/* run ldconfig if it exists */
+ EVENT(trans, PM_TRANS_EVT_LDCONFIG_START, NULL, NULL);
_alpm_log(PM_LOG_DEBUG, "running "ldconfig -r %s"
", handle->root);
_alpm_ldconfig(handle->root);
+ EVENT(trans, PM_TRANS_EVT_LDCONFIG_DONE, NULL, NULL);
return(0);
}
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index fbef057..c61533a 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -338,6 +338,10 @@ typedef enum _pmtransevt_t {
* to the callback, respectively.
*/
PM_TRANS_EVT_UPGRADE_DONE,
+ /** ldconfig will run */
+ PM_TRANS_EVT_LDCONFIG_START,
+ /** ldconfig ran */
+ PM_TRANS_EVT_LDCONFIG_DONE,
/** Target package's integrity will be checked. */
PM_TRANS_EVT_INTEGRITY_START,
/** Target package's integrity was checked. */
diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c
index 864fafa..a5ee3f0 100644
--- a/lib/libalpm/remove.c
+++ b/lib/libalpm/remove.c
@@ -404,8 +404,10 @@ int _alpm_remove_commit(pmtrans_t *trans, pmdb_t *db)
/* run ldconfig if it exists */
if(trans->type != PM_TRANS_TYPE_REMOVEUPGRADE) {
+ EVENT(trans, PM_TRANS_EVT_LDCONFIG_START, NULL, NULL);
_alpm_log(PM_LOG_DEBUG, "running "ldconfig -r %s"
", handle->root);
_alpm_ldconfig(handle->root);
+ EVENT(trans, PM_TRANS_EVT_LDCONFIG_DONE, NULL, NULL);
}
return(0);
diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index f968873..3bcf55e 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -159,7 +159,7 @@ void cb_trans_evt(pmtransevt_t event, void *data1, void *data2)
{
switch(event) {
case PM_TRANS_EVT_CHECKDEPS_START:
- printf(_("checking dependencies...
"));
+ printf(_("checking dependencies...
"));
break;
case PM_TRANS_EVT_FILECONFLICTS_START:
if(config->noprogressbar) {
@@ -230,6 +230,9 @@ void cb_trans_evt(pmtransevt_t event, void *data1, void *data2)
case PM_TRANS_EVT_RETRIEVE_START:
printf(_(":: Retrieving packages from %s...
"), (char*)data1);
break;
+ case PM_TRANS_EVT_LDCONFIG_START:
+ printf(_("running ldconfig...
"));
+ break;
/* all the simple done events, with fallthrough for each */
case PM_TRANS_EVT_FILECONFLICTS_DONE:
case PM_TRANS_EVT_CHECKDEPS_DONE:
@@ -238,6 +241,7 @@ void cb_trans_evt(pmtransevt_t event, void *data1, void *data2)
case PM_TRANS_EVT_INTEGRITY_DONE:
case PM_TRANS_EVT_DELTA_INTEGRITY_DONE:
case PM_TRANS_EVT_DELTA_PATCHES_DONE:
+ case PM_TRANS_EVT_LDCONFIG_DONE:
/* nothing */
break;
}
--
1.5.6.3
_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
07-17-2008, 10:27 AM
Nagy Gabor
New PM_TRANS_EVT_LDCONFIG events
> >From 49899f082d6ccd52dc8164a5856353dd2a12ee20 Mon Sep 17 00:00:00
> >2001
> From: Nagy Gabor <ngaba@bibl.u-szeged.hu>
> Date: Thu, 17 Jul 2008 12:15:29 +0200
> Subject: [PATCH] New PM_TRANS_EVT_LDCONFIG events
>
> User will see "running ldconfig..." message.
>
> Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
I know that this cannot be accepted to 3.2 because of string freeze.
So if you like it, you may push it to 3.2.1. Alternatively, you can
keep the alpm part (this is an API "extension", which is expected in
major releases), and comment out the "printf" in front-end
temporarily (not behaviour change, but extended API).
Bye
_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev