52 lines
2.0 KiB
Diff
52 lines
2.0 KiB
Diff
From f80df0fa22ca7d2e0879a943b307770d532db8e8 Mon Sep 17 00:00:00 2001
|
|
From: Juan RP <xtraeme@gmail.com>
|
|
Date: Tue, 16 Sep 2014 09:56:00 +0200
|
|
Subject: [PATCH 1/3] xbps-{install,remove}: print guards in
|
|
post-install/pre-remove messages.
|
|
|
|
This avoids the need to manually add them to the {INSTALL,REMOVE}.msg
|
|
files in binary packages, and saves some bytes in the repository archive
|
|
and binary packages.
|
|
|
|
Idea by @dominikh.
|
|
---
|
|
bin/xbps-install/state_cb.c | 5 ++++-
|
|
bin/xbps-remove/main.c | 5 ++++-
|
|
2 files changed, 8 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/bin/xbps-install/state_cb.c b/bin/xbps-install/state_cb.c
|
|
index 88f2925..0b5ee4a 100644
|
|
--- bin/xbps-install/state_cb.c
|
|
+++ bin/xbps-install/state_cb.c
|
|
@@ -141,7 +141,10 @@ state_cb(const struct xbps_state_cb_data *xscd, void *cbdata _unused)
|
|
rv = yesno("Do you want to import this public key?");
|
|
break;
|
|
case XBPS_STATE_SHOW_INSTALL_MSG:
|
|
- printf("%s: post-install message:\n%s", xscd->arg, xscd->desc);
|
|
+ printf("%s: post-install message:\n", xscd->arg);
|
|
+ printf("========================================================================\n");
|
|
+ printf("%s", xscd->desc);
|
|
+ printf("========================================================================\n");
|
|
break;
|
|
case XBPS_STATE_UNPACK_FILE_PRESERVED:
|
|
printf("%s\n", xscd->desc);
|
|
diff --git a/bin/xbps-remove/main.c b/bin/xbps-remove/main.c
|
|
index 5c2f23a..7b56328 100644
|
|
--- bin/xbps-remove/main.c
|
|
+++ bin/xbps-remove/main.c
|
|
@@ -92,7 +92,10 @@ state_cb_rm(const struct xbps_state_cb_data *xscd, void *cbdata _unused)
|
|
}
|
|
break;
|
|
case XBPS_STATE_SHOW_REMOVE_MSG:
|
|
- printf("%s: pre-remove message:\n%s", xscd->arg, xscd->desc);
|
|
+ printf("%s: pre-remove message:\n", xscd->arg);
|
|
+ printf("========================================================================\n");
|
|
+ printf("%s", xscd->desc);
|
|
+ printf("========================================================================\n");
|
|
break;
|
|
/* errors */
|
|
case XBPS_STATE_REMOVE_FAIL:
|
|
--
|
|
2.1.0
|
|
|