From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SR4Ff-0007Vr-GU for garchives@archives.gentoo.org; Sun, 06 May 2012 16:24:03 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8C20BE08F9; Sun, 6 May 2012 16:15:24 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id B544AE09BE for ; Sun, 6 May 2012 16:07:25 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2BDD31B4065 for ; Sun, 6 May 2012 16:07:25 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id E07B1E542E for ; Sun, 6 May 2012 16:07:23 +0000 (UTC) From: "Sebastian Pipping" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sebastian Pipping" Message-ID: <1251312658.f660dd132fdb09702ac56d79d0a3b06805dc609c.sping@gentoo> Subject: [gentoo-commits] proj/emacs-tools:backups/emacs-updater@1480 commit in: / X-VCS-Repository: proj/emacs-tools X-VCS-Files: ChangeLog emacs-updater emacs-updater.8 X-VCS-Directories: / X-VCS-Committer: sping X-VCS-Committer-Name: Sebastian Pipping X-VCS-Revision: f660dd132fdb09702ac56d79d0a3b06805dc609c X-VCS-Branch: backups/emacs-updater@1480 Date: Sun, 6 May 2012 16:07:23 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 141c97cd-edf1-4995-bc4b-876073d12b45 X-Archives-Hash: 0e78e3ced64a2675c9d52b6e538fef9a Message-ID: <20120506160723.DblsNHRQvV3m4c3ueVqD3-7Ju3f56YS4Ebk4sa-14b0@z> commit: f660dd132fdb09702ac56d79d0a3b06805dc609c Author: Ulrich M=C3=BCller gentoo org> AuthorDate: Wed Aug 26 18:50:58 2009 +0000 Commit: Sebastian Pipping gentoo org> CommitDate: Wed Aug 26 18:50:58 2009 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/emacs-tools.g= it;a=3Dcommit;h=3Df660dd13 New --major option. svn path=3D/emacs-updater/; revision=3D1390 --- ChangeLog | 5 +++-- emacs-updater | 17 ++++++++++++++--- emacs-updater.8 | 3 +++ 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 358e64b..7b18317 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,8 @@ 2009-08-25 Ulrich Mueller =20 - * emacs-updater (OPTIONS): New options --orphans|-o and --version. - (ORPHANS): New variable. + * emacs-updater (OPTIONS): New options --major|-m, --orphans|-o, + and --version. + (MAJOR, ORPHANS): New variables. (version): New function. (usage): Update help text. * emacs-updater.8: Describe new options. diff --git a/emacs-updater b/emacs-updater index 8832fed..8027f27 100755 --- a/emacs-updater +++ b/emacs-updater @@ -19,6 +19,7 @@ PM_COMMAND=3Dpm_auto =20 # Other default variable settings EXACT=3D +MAJOR=3D NOCOLOUR=3D ORPHANS=3D PRETEND=3D @@ -39,6 +40,8 @@ usage() { X byte-compiled Elisp files X (default: sitedir,rebuild) X -e, --exact match exact versions when remerging packages + X -m, --major use only the major version when comparing + X Emacs version numbers X -n, --nocolour, --nocolor X disable colour in output X -o, --orphans list orphan files @@ -96,8 +99,8 @@ pm_auto() { } =20 # Read in all command-line options and force English output -OPTIONS=3D$(LC_ALL=3DC getopt -o a:ehnopP: \ - --long action:,exact,help,nocolour,nocolor,orphans,pretend \ +OPTIONS=3D$(LC_ALL=3DC getopt -o a:ehmnopP: \ + --long action:,exact,help,major,nocolour,nocolor,orphans,pretend \ --long package-manager:,package-manager-command:,version \ -n 'emacs-updater' -- "$@") [ $? -eq 0 ] || usage 1 @@ -110,6 +113,7 @@ do -h|--help) usage 0 ;; --version) version ;; -e|--exact) EXACT=3D"true"; shift 1 ;; + -m|--major) MAJOR=3D"true"; shift 1 ;; -o|--orphans) ORPHANS=3D"true"; shift 1 ;; -p|--pretend) PRETEND=3D"true"; shift 1 ;; -n|--nocolour|--nocolor) NOCOLOUR=3D"true"; shift 1 ;; @@ -147,6 +151,11 @@ do ;; --package-manager-command) PM_COMMAND=3D${2}; shift 2 ;; --) shift; break ;; + *) + # this should not happen; getopt should return bad status + echo "Invalid option '${1}' given!" + usage 22 + ;; esac done =20 @@ -223,7 +232,9 @@ action_rebuild() { version=3D$(bytecomp_version "${elc}") version=3D${version:-unknown} =20 - if [ "${version}" !=3D "${active}" ] || [ "${1}" =3D all ]; then + if [ -z "${MAJOR}" -a "${version}" !=3D "${active}" ] \ + || [ "${version%%.*}" !=3D "${active%%.*}" ] \ + || [ "${1}" =3D all ]; then echo "Found ${elc##*/} (compiled by Emacs version ${version})" echo "${elc}" >> "${TMPFILE}" else diff --git a/emacs-updater.8 b/emacs-updater.8 index 3789882..b05fcae 100644 --- a/emacs-updater.8 +++ b/emacs-updater.8 @@ -33,6 +33,9 @@ Rebuild all packages that have byte-compiled Elisp file= s .B -e, --exact Match exact versions when remerging packages .TP +.B -m, --major +Use only the major version when comparing Emacs version numbers +.TP .B -n, --nocolour, --nocolor Disable colour in output .TP