summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog26
-rwxr-xr-xemacs-updater21
2 files changed, 37 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 25f549d..372c88b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,31 @@
+2024-05-02 Ulrich Müller <ulm@gentoo.org>
+
+ * Version 1.18 released.
+
+ * emacs-updater (OPTIONS): Drop the -n, --nocolor, --nocolour
+ option, which is deprecated since version 1.11 released in 2013.
+
+ * emacs-updater (COLOUR): Respect the NO_COLOR environment
+ variable.
+
+2024-05-01 Arsen Arsenović <arsen@gentoo.org>
+
+ * emacs-updater (pm_portage): Pass --usepkg=n to Portage.
+ Fixes bug 931064.
+
+2023-09-25 Ulrich Müller <ulm@gentoo.org>
+
+ * Version 1.17 released.
+
+ * emacs-updater: The -e,--exact option of qfile no longer works in
+ portage-utils-0.80 or later. The "exact package" functionality is
+ now available with the -v,--verbose option (--verbose --quiet
+ looks strange, but is not a contradiction here). Fixes bug 914479.
+
2019-08-30 Ulrich Müller <ulm@gentoo.org>
+ * Version 1.16 released.
+
* emacs-updater (action_rebuild): Drop the last component,
i.e., the build number, from Emacs versions below 26 only.
Fixes bug 693140.
diff --git a/emacs-updater b/emacs-updater
index 0bca953..2936b64 100755
--- a/emacs-updater
+++ b/emacs-updater
@@ -1,12 +1,12 @@
#!/bin/bash
-# Copyright 2007-2016 Gentoo Authors
+# Copyright 2007-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 or later
# Authors:
# Christian Faulhammer <fauli@gentoo.org>
# Ulrich Müller <ulm@gentoo.org>
-VERSION=1.15
+VERSION=1.18
EMACS=/usr/bin/emacs
GETOPT=/usr/bin/getopt
SITELISP=/usr/share/emacs/site-lisp
@@ -20,12 +20,14 @@ PM_EXTRAOPTS=( )
# Other default variable settings
BATCH=
-COLOUR=
EXACT=
MAJOR=
ORPHANS=
PRETEND=
+# Check for NO_COLOR environment variable: https://no-color.org/
+COLOUR=${NO_COLOR:+no}
+
usage() {
sed -e 's/^X//' <<-EOF
Usage: ${0##*/} [OPTION]...
@@ -69,7 +71,7 @@ usage() {
version() {
cat <<-EOF
Emacs updater version ${VERSION}
- Copyright 2007-2016 Gentoo Authors
+ Copyright 2007-2024 Gentoo Authors
Distributed under the terms of the GNU GPL version 2 or later.
Gentoo Emacs project: <https://wiki.gentoo.org/wiki/Project:Emacs>
@@ -79,7 +81,7 @@ version() {
# Wrapper for package manager commands
have_portage() { type -P emerge >/dev/null; }
-pm_portage() { emerge --oneshot "$@"; }
+pm_portage() { emerge --usepkg=n --oneshot "$@"; }
have_pkgcore() { type -P pmerge >/dev/null; }
pm_pkgcore() { pmerge --oneshot "$@"; }
@@ -105,9 +107,9 @@ pm_auto() {
}
# Read in all command-line options and force English output
-OPTIONS=$(LC_ALL=C "${GETOPT}" -o a:behmnopP: \
- --long action:,batch,color::,colour::,nocolor,nocolour,exact,help,major \
- --long orphans,pretend,package-manager:,package-manager-command:,version \
+OPTIONS=$(LC_ALL=C "${GETOPT}" -o a:behmopP: \
+ --long action:,batch,color::,colour::,exact,help,major,orphans \
+ --long pretend,package-manager:,package-manager-command:,version \
-n 'emacs-updater' -- "$@") \
|| usage $?
@@ -135,7 +137,6 @@ do
esac
shift 2
;;
- -n|--nocolor|--nocolour) COLOUR="no"; shift ;; # legacy option
-a|--action)
ACTIONS=
for action in ${2/,/ }; do
@@ -292,7 +293,7 @@ message "Assigning ${NO_OF_FILES} file${s} to packages ..."
if [[ ${ORPHANS} ]]; then
xargs qfile -oCR <"${TMPFILE}" | sort -u >"${PKGFILE}"
elif [[ ${EXACT} ]]; then
- xargs qfile -eqCR <"${TMPFILE}" | sort -u | sed 's/^/=/' >"${PKGFILE}"
+ xargs qfile -vqCR <"${TMPFILE}" | sort -u | sed 's/^/=/' >"${PKGFILE}"
else
# Get package and slot number, requires >=portage-utils-0.3
xargs qfile -SqCR <"${TMPFILE}" | sort -u >"${PKGFILE}"