1 |
Author: ulm |
2 |
Date: 2009-08-25 12:48:59 +0000 (Tue, 25 Aug 2009) |
3 |
New Revision: 1364 |
4 |
|
5 |
Modified: |
6 |
emacs-updater/ChangeLog |
7 |
emacs-updater/emacs-updater |
8 |
emacs-updater/emacs-updater.8 |
9 |
Log: |
10 |
New --orphans option (and commit forgotten ChangeLog entry for --version). |
11 |
|
12 |
Modified: emacs-updater/ChangeLog |
13 |
=================================================================== |
14 |
--- emacs-updater/ChangeLog 2009-08-24 21:14:37 UTC (rev 1363) |
15 |
+++ emacs-updater/ChangeLog 2009-08-25 12:48:59 UTC (rev 1364) |
16 |
@@ -1,3 +1,11 @@ |
17 |
+2009-08-25 Ulrich Mueller <ulm@g.o> |
18 |
+ |
19 |
+ * emacs-updater (OPTIONS): New options --orphans|-o and --version. |
20 |
+ (ORPHANS): New variable. |
21 |
+ (version): New function. |
22 |
+ (usage): Update help text. |
23 |
+ * emacs-updater.8: Describe new options. |
24 |
+ |
25 |
2009-08-09 Ulrich Mueller <ulm@g.o> |
26 |
|
27 |
* emacs-updater (OPTIONS): New option --package-manager-command. |
28 |
|
29 |
Modified: emacs-updater/emacs-updater |
30 |
=================================================================== |
31 |
--- emacs-updater/emacs-updater 2009-08-24 21:14:37 UTC (rev 1363) |
32 |
+++ emacs-updater/emacs-updater 2009-08-25 12:48:59 UTC (rev 1364) |
33 |
@@ -20,6 +20,7 @@ |
34 |
# Other default variable settings |
35 |
EXACT= |
36 |
NOCOLOUR= |
37 |
+ORPHANS= |
38 |
PRETEND= |
39 |
|
40 |
usage() { |
41 |
@@ -40,6 +41,7 @@ |
42 |
X -e, --exact match exact versions when remerging packages |
43 |
X -n, --nocolour, --nocolor |
44 |
X disable colour in output |
45 |
+ X -o, --orphans list orphan files |
46 |
X -p, --pretend don't actually emerge packages |
47 |
X -P, --package-manager PM |
48 |
X select a package manager. PM is one out of |
49 |
@@ -94,8 +96,8 @@ |
50 |
} |
51 |
|
52 |
# Read in all command-line options and force English output |
53 |
-OPTIONS=$(LC_ALL=C getopt -o a:ehnpP: \ |
54 |
- --long action:,exact,help,nocolour,nocolor,pretend \ |
55 |
+OPTIONS=$(LC_ALL=C getopt -o a:ehnopP: \ |
56 |
+ --long action:,exact,help,nocolour,nocolor,orphans,pretend \ |
57 |
--long package-manager:,package-manager-command:,version \ |
58 |
-n 'emacs-updater' -- "$@") |
59 |
[ $? -eq 0 ] || usage 1 |
60 |
@@ -108,6 +110,7 @@ |
61 |
-h|--help) usage 0 ;; |
62 |
--version) version ;; |
63 |
-e|--exact) EXACT="true"; shift 1 ;; |
64 |
+ -o|--orphans) ORPHANS="true"; shift 1 ;; |
65 |
-p|--pretend) PRETEND="true"; shift 1 ;; |
66 |
-n|--nocolour|--nocolor) NOCOLOUR="true"; shift 1 ;; |
67 |
-a|--action) |
68 |
@@ -256,7 +259,9 @@ |
69 |
[ ${NO_OF_FILES} -eq 1 ] && s= || s=s |
70 |
message "Assigning ${NO_OF_FILES} file${s} to packages ..." |
71 |
|
72 |
-if [ "${EXACT}" ]; then |
73 |
+if [ "${ORPHANS}" ]; then |
74 |
+ qfile -oCR -f "${TMPFILE}" | sort -u |
75 |
+elif [ "${EXACT}" ]; then |
76 |
qfile -eqCR -f "${TMPFILE}" | sort -u | sed 's/^/=/' > "${PKGFILE}" |
77 |
else |
78 |
qfile -qCR -f "${TMPFILE}" | sort -u > "${PKGFILE}" |
79 |
|
80 |
Modified: emacs-updater/emacs-updater.8 |
81 |
=================================================================== |
82 |
--- emacs-updater/emacs-updater.8 2009-08-24 21:14:37 UTC (rev 1363) |
83 |
+++ emacs-updater/emacs-updater.8 2009-08-25 12:48:59 UTC (rev 1364) |
84 |
@@ -36,6 +36,9 @@ |
85 |
.B -n, --nocolour, --nocolor |
86 |
Disable colour in output |
87 |
.TP |
88 |
+.B -o, --orphans |
89 |
+List orphan files, i.e. files that are not owned by any package. |
90 |
+.TP |
91 |
.B -p, --pretend |
92 |
Don't actually emerge packages |
93 |
.TP |