From 1faf5f21c7f0be885b80e56270f92a86221d71b6 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 16 Sep 2014 10:03:11 +0200 Subject: [PATCH] xbps{,-static}: merge patch from master to print msg guards. --- srcpkgs/xbps-static/template | 2 +- ...ove-print-guards-in-post-install-pre.patch | 51 +++++++++++++++++++ srcpkgs/xbps/template | 2 +- 3 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/xbps/patches/0002-xbps-install-remove-print-guards-in-post-install-pre.patch diff --git a/srcpkgs/xbps-static/template b/srcpkgs/xbps-static/template index b6bd6d4adf3..9426508495c 100644 --- a/srcpkgs/xbps-static/template +++ b/srcpkgs/xbps-static/template @@ -3,7 +3,7 @@ # NOTE: keep this package synchronized with "srcpkgs/xbps". pkgname=xbps-static version=0.39 -revision=2 +revision=3 bootstrap=yes short_desc="The XBPS package system utilities - static binaries" maintainer="Juan RP " diff --git a/srcpkgs/xbps/patches/0002-xbps-install-remove-print-guards-in-post-install-pre.patch b/srcpkgs/xbps/patches/0002-xbps-install-remove-print-guards-in-post-install-pre.patch new file mode 100644 index 00000000000..729d810d4d6 --- /dev/null +++ b/srcpkgs/xbps/patches/0002-xbps-install-remove-print-guards-in-post-install-pre.patch @@ -0,0 +1,51 @@ +From f80df0fa22ca7d2e0879a943b307770d532db8e8 Mon Sep 17 00:00:00 2001 +From: Juan RP +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 + diff --git a/srcpkgs/xbps/template b/srcpkgs/xbps/template index 169e62a47b7..5f8e132b1df 100644 --- a/srcpkgs/xbps/template +++ b/srcpkgs/xbps/template @@ -1,7 +1,7 @@ # Template file for 'xbps' pkgname=xbps version=0.39 -revision=2 +revision=3 bootstrap=yes short_desc="The XBPS package system utilities" maintainer="Juan RP "