Codebase list debian-goodies / f8c6b15
Remove trailing whitespace from various files git and various editors highlight spurious whitespace. Paul Wise 6 years ago
12 changed file(s) with 151 addition(s) and 151 deletion(s). Raw diff Collapse all Expand all
127127
128128 # process package names given on the cmdline
129129 for cmdline_pkg in "${PKGS[@]}"
130 do
130 do
131131 pkgs_enhancing_pkg_status $cmdline_pkg
132132 done
133133
44 # - included patch from Justin Pryzby <justinpryzby_AT_users.sourceforge.net>
55 # to work with the latest Lsof - modify to reduce false positives by not
66 # complaining about deleted inodes/files under /tmp/, /var/log/,
7 # /var/run or named /SYSV.
7 # /var/run or named /SYSV.
88 # - introduced a verbose option
99
1010 # PENDING:
1313 # (available at http://robots.org.uk/src/psdel)
1414 # - make it work with a whitelist of directories instead of a blacklist
1515 # (might make it less false positive prone)
16 #
16 #
1717 #
1818 # This program is free software; you can redistribute it and/or modify
1919 # it under the terms of the GNU General Public License as published by
2727
2828 # You should have received a copy of the GNU General Public License
2929 # along with this program; if not, write to the Free Software
30 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
30 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
3131 # MA 02110-1301 USA
3232 #
3333 # On Debian systems, a copy of the GNU General Public License may be
283283 restartServiceCommands.extend(['systemctl restart ' + s for s in package.systemdservice])
284284 else:
285285 nonrestartable.append(package)
286
286
287287 if len(restartable) > 0:
288288 print()
289289 print("Of these, %d seem to contain systemd service definitions or init scripts which can be used to restart them." % len(restartable))
293293 print(package.name + ':')
294294 for process in package.processes:
295295 print("\t%s\t%s" % (process.pid,process.program))
296
296
297297 if len(restartServiceCommands)>0:
298298 print()
299299 print("These are the systemd services:")
487487 if f.startswith('/usr/lib/locale/'):
488488 return 0
489489 # Skip files from the user's home directories
490 # many processes hold temporafy files there
490 # many processes hold temporafy files there
491491 if f.startswith('/home/'):
492492 return 0
493493 # Skip automatically generated files
694694 if f.startswith('/usr'):
695695 statinfo = os.lstat('/usr')[ST_MODE]
696696 # If /usr is a symlink then find where it points to
697 if S_ISLNK(statinfo):
697 if S_ISLNK(statinfo):
698698 newusr = os.readlink('/usr')
699699 if not newusr.startswith('/'):
700700 # If the symlink is relative, make it absolute
44 .\" it under the terms of the GNU General Public License as published by
55 .\" the Free Software Foundation; either version 2, or (at your option)
66 .\" any later version.
7 .\"
7 .\"
88 .\" On Debian systems, a copy of the GNU General Public License version 2
99 .\" can be found in /usr/share/common-licenses/GPL-2.
1010 .TH checkrestart 1 "December 19 2006" "debian\-goodies" "debian\-goodies"
2727 {
2828 echo "Usage: `basename $0` [--help] package"
2929 }
30
30
3131 if [ $# -eq 0 ] ; then
3232 usage
3333 exit 1
4040 esac
4141
4242 # First check if apt-get is sane enough before proceeding
43 set +e
43 set +e
4444 apt-get -q2 --print-uris --reinstall install "dpkg" 2>/dev/null >/dev/null
4545 if [ $? -ne 0 ] ; then
4646 echo "ERROR: There was an error calling apt-get. Check that the database is in a consistent state and try again"
5050 echo "ERROR: Your apt lists are empty. Update your package database"
5151 echo "using 'apt-get update'"
5252 fi
53 set -e
53 set -e
5454
5555
5656 for pkgspec in $*; do
6565 set -e
6666 # This provides only one version, but it's better than the apt-get
6767 # call which will not work in packages not available locally
68 apt-cache show "$pkgspec" 2>/dev/null | grep ^Ver |
68 apt-cache show "$pkgspec" 2>/dev/null | grep ^Ver |
6969 while read version; do
7070 version=`echo $version | sed -ne '$s/^.*: \(.*\).*$/\1/p'`
7171 echo "($pkgspec -> $version)"
110110 * [dglob, dglob.pod]
111111 - Add a new '-n' option to make it possible to search for packages that
112112 are available but not installed, thanks to A. Costa (Closes: #594959)
113
113
114114 * Change license of manual pages written by author to GPL-2
115115
116116 -- Javier Fernández-Sanguino Peña <jfs@debian.org> Fri, 23 Jan 2015 01:07:34 +0100
171171
172172 debian-goodies (0.61) unstable; urgency=low
173173
174 * [checkrestart]
174 * [checkrestart]
175175 - Prover fix to avoid false positives due to /drm (Closes: #548380)
176176 - Add patch provided by Tollef Fog Heen which includes a new -b
177177 (blacklist) option. This makes it possible for system
194194 list of items
195195 - Improve handling of interpreted files using patch provided by Guillaume
196196 Delacour and Michal Fiala (Closes: #657087)
197 * [debget]
198 - Allow error in apt calls since those are handled by the script
197 * [debget]
198 - Allow error in apt calls since those are handled by the script
199199 (Closes: 676715)
200200
201201 -- Javier Fernández-Sanguino Peña <jfs@debian.org> Sat, 16 Jun 2012 04:22:24 +0200
241241
242242 debian-goodies (0.59) unstable; urgency=low
243243
244 * [checkrestart]:
245 - Properly define variables to prevent Python errors when using the
244 * [checkrestart]:
245 - Properly define variables to prevent Python errors when using the
246246 -p switch (Closes: #646513)
247247 - Pass a default environment for all subprocess calls
248248
250250
251251 debian-goodies (0.58) unstable; urgency=low
252252
253 * [dglob]
253 * [dglob]
254254 - Remove any empty lines from grep-dctrl's output (Closes: 646189)
255255
256256 -- Javier Fernandez-Sanguino Pen~a <jfs@debian.org> Sun, 23 Oct 2011 13:54:27 +0200
257257
258258 debian-goodies (0.57) unstable; urgency=low
259259
260 * [checkrestart]:
261 - Exclude /run/ from the deleted files check, this prevents
260 * [checkrestart]:
261 - Exclude /run/ from the deleted files check, this prevents
262262 false positives from some programs such as newer releases of
263263 jackd2 and chromium which use /run/shm/ instead of
264264 /dev/shm/ (Closes: #595096)
267267
268268 debian-goodies (0.56) unstable; urgency=low
269269
270 * [checkrestart]:
270 * [checkrestart]:
271271 - Use patch provided by Jörg Sommer and Piotr Kaczuba that makes the
272272 script use a set for the initscripts information, thus making the
273273 program work with Python 2.7 (Closes: #643977)
275275 not belong to any package, thanks to Peter Eisentraut for the
276276 patch. (Closes: #608387)
277277 - Fix handling of --verbose option (Closes: #623168)
278 - Exclude /dev/shm/ from the deleted files check, this prevents
278 - Exclude /dev/shm/ from the deleted files check, this prevents
279279 a false positive from some programs such as jackd2 (Closes: #595096)
280280 - Exclude /home from the deleted files check as these
281281 generate a number of false positives. This included: GNOME's mixer
282282 applet, dovecot, nautilus, chromium-broswer and evolution-data-server
283283 (Closes: #595096, #609454)
284 * [checkrestart.1]:
284 * [checkrestart.1]:
285285 - Update the manpage to indicate what information to provide when
286286 reporting a false positive in checkrestart
287287 * /debmany/man/debmany.1:
288288 - Fix typo in manpage (Closes: #600252)
289
289
290290
291291 -- Javier Fernandez-Sanguino Pen~a <jfs@debian.org> Sun, 09 Oct 2011 20:51:11 +0200
292292
331331 * [dpigs] Fix getopt configuration for -h. Thanks Jakub Wilk for
332332 spotting this. (Closes: #584580)
333333 * Bump Standards-Version to 3.9.1 (no changes)
334
334
335335 -- Axel Beckert <abe@debian.org> Wed, 04 Aug 2010 12:35:05 +0200
336336
337337 debian-goodies (0.52) unstable; urgency=low
374374 with processes that lack a proper link /proc/$PID/exe. This seems to happen
375375 with UML processes and confused the program. (Closes: 522850)
376376 * Include patches provided by Joerg Sommer for checkrestart:
377 (Closes: 511537)
377 (Closes: 511537)
378378 - Set locale to POSIX ('C') since the output of dpkg is localized and
379379 localisations makes the match for diversions fail.
380380 - Skip the last output line from diversions since it is a summary
381381 listing packages that are part of a diversion.
382382 - Use dpkg-query instead of dpkg since dpkg-query is the generic interface
383 for querying the dpkg database is dpkg-query, and dpkg is only a
383 for querying the dpkg database is dpkg-query, and dpkg is only a
384384 wrapper for it.
385385 - Removed useless check in the isdeletedFile function that covers
386386 mutt in /tmp since there is already a match for /tmp
407407 debian-goodies (0.48) unstable; urgency=low
408408
409409 * Provide dhomepage application (and manual page) that can be used
410 to open a packages' homepage. This program was provided by
410 to open a packages' homepage. This program was provided by
411411 Thadeu Lima de Souza Cascardo (Closes: 500397)
412412 * Document degrep, dfgrep and dzgrep through the dgrep manpage by creating a
413413 symlink during package installation, thanks to Xavier Luthi for the
422422 - adjust command line options in usage()
423423 (Closes: 497611)
424424 * dpigs: Use script snipet provided by Aaron M. Ucko to make it possible
425 to group by source package, use a new (-S, --source) option.
425 to group by source package, use a new (-S, --source) option.
426426 (Closes: 511349)
427 * debget:
427 * debget:
428428 - check the contents of /var/lib/apt/lists before executing
429429 apt to warn if there is no Release information there
430430 - document that APT's package database needs to be up-to-dat if a
431431 package is not found (might happen to aptitude users)
432 * popbugs: adjust error message:
432 * popbugs: adjust error message:
433433 - popularity contest is now run through cron.daily
434434 - provide the command line needed to generate the popconf data
435435 (Closes: 500432)
482482 - add bash_completion example into examples
483483 - add less to Depends, as it is the default viewer for other files.
484484 - add zenity to Suggests, it is a graphical alternative for dialog.
485 * Fix popbugs to prevent it from removing temporary files before the browser
485 * Fix popbugs to prevent it from removing temporary files before the browser
486486 has opened them, thanks to Chris Lamb for the bug report and the fix
487487 (Closes: #471752)
488488 * checkrestart:
505505 uploading, oops. (Closes: #405040)
506506 * Add myself to author list in debian/copyright, and fixed a lintian
507507 warning there too.
508
508
509509 -- Javier Fernandez-Sanguino Pen~a <jfs@debian.org> Thu, 10 Jul 2008 00:30:39 +0200
510510
511511 debian-goodies (0.41) unstable; urgency=low
518518 debian-goodies (0.40) unstable; urgency=low
519519
520520 * checkrestart:
521 - skip deleted files under /dev/pts/ to prevent telling users to
521 - skip deleted files under /dev/pts/ to prevent telling users to
522522 restart gpm (Closes: 468124)
523523 - support /usr being symlinked (Closes: 405040)
524524 - minor changes in output messages.
528528 debian-goodies (0.39) unstable; urgency=low
529529
530530 * Remove the network-test script, which now has been moved to the
531 ifupdown-extra package. Also remove the dependencies introduced by
531 ifupdown-extra package. Also remove the dependencies introduced by
532532 that script.
533533
534534 -- Javier Fernandez-Sanguino Pen~a <jfs@debian.org> Tue, 18 Dec 2007 21:37:18 +0100
621621 * Network-test: use -t switch to use user's TMPDIR or /tmp instead of
622622 trying to create it under $PWD (Closes: #432311)
623623 * Add a Suggests: netcat (Closes: #400479)
624 * popbugs:
624 * popbugs:
625625 * Make it parse the new format of the RC buglist properly (Closes: #421355)
626626 * Add a debug option
627627 * Fix a typo in the output
631631
632632 debian-goodies (0.28) unstable; urgency=low
633633
634 * Apply patch by Francesco Potorti that makes checkrestart list
634 * Apply patch by Francesco Potorti that makes checkrestart list
635635 processes that should be restarted when a daemon is restarted.
636636 This helps warn users that some processes will not be restarted
637637 even though they use the init script (such as active ssh connections). And
652652 (Note I have included the code from Sam Morris, available at
653653 http://robots.org.uk/src/psdel and contributed in the BTS. But it still
654654 needs to be massaged to work as a replacement for lsof)
655 * Write a manpage for checkrestart so administrators are aware that this
655 * Write a manpage for checkrestart so administrators are aware that this
656656 tool should not be completely relied on. (Closes: #305279)
657657 * Update the version of network-test which fixes some of the bugs already
658658 fixed in the experimental 'ifupdown-extra' package:
665665 installed (just recommends its installation)
666666 * Fix duplicate spaces in the script as well as some typos with patch
667667 provided by Norbert Kiesel (Closed: #400463)
668 * Change behaviour of network-test when testing ethernet link
668 * Change behaviour of network-test when testing ethernet link
669669 (based on ifupdown-extra's 'check-network-cable' tests) this is better
670670 (and more reliable) than just using 'ifconfig' but requires users
671671 install additional software.
807807
808808 debian-goodies (0.14) unstable; urgency=low
809809
810 * Minor formatting changes to checkrestart
810 * Minor formatting changes to checkrestart
811811 * New program, popbugs, which sorts and filters the RC bug list based on
812812 data from popularity-contest
813813 * Suggests: popularity-contest
838838 debian-goodies (0.10) unstable; urgency=low
839839
840840 * Modify checkrestart to use dpkg rather than dpkg-query, so that it can be
841 used on stable and does not require a dependency on newer dpkg
841 used on stable and does not require a dependency on newer dpkg
842842
843843 -- Matt Zimmerman <mdz@debian.org> Fri, 2 May 2003 10:19:15 -0400
844844
845845 debian-goodies (0.9) unstable; urgency=low
846846
847 * Add dependencies on lsof and python
847 * Add dependencies on lsof and python
848848
849849 -- Matt Zimmerman <mdz@debian.org> Wed, 30 Apr 2003 14:20:54 -0400
850850
851851 debian-goodies (0.8) unstable; urgency=low
852852
853853 * New program, checkrestart, which informs about running processes using old
854 versions of upgraded files (such as shared libraries)
854 versions of upgraded files (such as shared libraries)
855855
856856 -- Matt Zimmerman <mdz@debian.org> Wed, 30 Apr 2003 13:53:25 -0400
857857
33 .SH "SYNOPSIS"
44 .B debmany
55 \fI\-\-help
6 .br
6 .br
77 .B debmany
88 \fI[\-v[v]] [\-k|\-g|\-x] [\-m manpageviewer] [\-o otherviewer] [\-L limit] [\-l lang1[,...]] package|package.deb\fR
9 .br
9 .br
1010 .B debmany
1111 \fI[\-v[v]] [\-k|\-g|\-x] [\-m manpageviewer] [\-o otherviewer] [\-L limit] [\-l lang1[,...]] \-z [package|package.deb]\fR
1212 .SH "DESCRIPTION"
1313 .\" Add any additional description here
14 .PP
14 .PP
1515 Select a manpage or files in /usr/share/doc from a Debian package for viewing with "man", "sensible-pager" or an alternative viewer. The list of files is displayed in a dialog. Supported locations for Debian packages are: local .deb\-file, a package in the repository or an installed package.
16 .TP
16 .TP
1717 \fB\-\-help\fR
1818 display a short usage guide and exit
19 .TP
19 .TP
2020 \fB\-k\fR
2121 Display the manpage using your preferred viewer (must support .gz files) if you use KDE \- this is the short form of \-m 'kfmclient exec man:%s'. "kfmclient" is a part of the package "konqueror" (at least in Debian Etch).
22 .TP
22 .TP
2323 \fB\-g\fR
2424 Display the manpage using your preferred viewer (must support .gz files) if you use GNOME \- this is the short form of \-m 'gnome\-open man:%s'. "gnome\-open" is a part of the package "libgnome2\-0" (at least in Debian Etch).
25 .TP
25 .TP
2626 \fB\-x\fR
2727 Display the manpage using your preferred viewer (must support .gz files) if you use KDE/GNOME/Xfce \- this is the short form of \-m 'xdg\-open man:%s'. "xdg\-open" is a part of the package "xdg\-utils" (at least in Debian Etch).
28 .TP
28 .TP
2929 \fB\-m manpageviewer\fR
3030 Optionally set a manpage viewer. The viewer must support .gz files. You must define the complete request. "%s" gets replaced with the path to the manpage. If "%s" is missing " %s" is appended to the manpageviewer. The manpageviewer must be enclosed with "" or '' \- see examples.
3131 If you use a graphical viewer you must ensure that you have access to your desktop (if necessary: sux or ssh with X\-forwarding)
32 .TP
32 .TP
3333 \fB\-o otherviewer\fR
3434 Optionally set a viewer for other files (/usr/share/doc).
35 .TP
35 .TP
3636 \fB\-L limit\fR
3737 If a file which must be downloaded exceeds this limit, you are asked if the download should start. Without unit the value is in bytes. You can append K, M, G or T to the value to change the unit.
38 .TP
38 .TP
3939 \fB\-l lang1[,...]\fR
4040 English manpages are displayed always. If you want more languages you can specify them here. Provide a comma separated list of the folder names in the manpage folders (/usr/share/man) \- e.g. de,fr or "zh*" if you want to see all Chinese manpages (Simplified and Traditional Chinese as well). It is safe always to use "*" at the end of your language.
4141 Character set versions automatically generated during installation are not available for selection.
42 .TP
42 .TP
4343 \fB\-z\fR
4444 Zenity (a graphical dialog) is used to select the files and if necessary to enter the package name. You must have the rights to start X programs. This option combined with the parameters \-k, \-g, \-x or \-m and \-o make it possible to use debmany without console.
45 .PP
45 .PP
4646 The manpages are temporarily extracted to a temporary directory under /tmp (or /var/tmp, if /tmp is not a directory). You can override the path if you set and export the environment variable TMPDIR or set it as a temporary variable.
47 .PP
47 .PP
4848 You need to have the Debian package "whiptail" (preferred) or "dialog" as well as "curl" installed.
4949 .SH "EXAMPLES"
50 .TP
50 .TP
5151 debmany coreutils
5252 Show all manpages from the installed Debian package "coreutils" using man.
53 .TP
53 .TP
5454 debmany 3dchess
5555 Show all manpages from the package "3dchess" using man. Since it is not already installed the package is accessed from the repository \- even downloading is done if needed.
56 .TP
56 .TP
5757 debmany test.deb
5858 Show all manpages from the local Debian package "./test.deb" using man.
59 .TP
59 .TP
6060 debmany \-k sc
6161 Use your preferred man\-viewer (for KDE users).
62 .TP
62 .TP
6363 debmany \-g sc
6464 Use your preferred man\-viewer (for GNOME users).
65 .TP
65 .TP
6666 debmany \-x sc
6767 Use your preferred man\-viewer (for KDE/GNOME/XFCE users).
68 .TP
68 .TP
6969 debmany \-z \-k
7070 Uses "zenity" to select files and to enter the package name.
71 .TP
71 .TP
7272 TMPDIR=~/tmp debmany \-m 'konqueror man:%s' sc
7373 Use ~/tmp as temporary folder and Konqueror as viewer.
74 .TP
74 .TP
7575 alias debmany='debmany \-l de \-L 5M \-k'; debmany \-m man \-l "zh*" foo
7676 Set an alias with your preferred options and override them if needed.
77 .TP
77 .TP
7878 vi /usr/local/bin/ask # after saving: chmod 755 ask
7979 #!/bin/dash
80 .br
80 .br
8181 read \-p "program to use: " pgm
82 .br
82 .br
8383 eval $pgm "$1"
84 .br
84 .br
8585
86 .br
86 .br
8787 debmany \-o ask
88 .br
88 .br
8989 Every time you select other files from a package you will be asked which program to use.
9090 .SH "AUTHOR"
9191 Written by Michael Arlt.
33 .SH "SYNTAX"
44 .B debmany
55 \fI\-\-help
6 .br
6 .br
77 .B debmany
88 \fI[\-v[v]] [\-k|\-g|\-x] [\-m manpageviewer] [\-o otherviewer] [\-L Limit] [\-l Sprache1[,...]] Paket|Paket.deb\fR
9 .br
9 .br
1010 .B debmany
1111 \fI[\-v[v]] [\-k|\-g|\-x] [\-m manpageviewer] [\-o otherviewer] [\-L Limit] [\-l Sprache1[,...]] \-z [Paket|Paket.deb]\fR
1212 .SH "BESCHREIBUNG"
1313 .\" Add any additional description here
14 .PP
14 .PP
1515 Wählen Sie eine Manpage oder Dateien aus usr/share/doc von einem Debian Paket um sie mit "man" oder "sensible-pager" bzw. einem alternativen Viewer zu betrachten. Die Liste der Dateien wird in einem Dialog dargestellt. Unterstützte Quellen für Debian Pakete sind: Lokale .deb\-Datei, ein Paket aus dem Repository oder ein installiertes Paket.
16 .TP
16 .TP
1717 \fB\-\-help\fR
1818 zeigt eine kurze Hilfe und beendet sich
19 .TP
19 .TP
2020 \fB\-k\fR
2121 Zeigt die Manpage im bevorzugten Viewer (muss .gz Dateien unterstützen) an, falls Sie KDE benutzen \- Kurzform von \-m 'kfmclient exec man:%s' bzw. 'kfmclient exec %s' für andere Dateien. "kfmclient" ist Teil des Paketes "konqueror" (zumindest in Debian Etch).
22 .TP
22 .TP
2323 \fB\-g\fR
2424 Zeigt die Manpage im bevorzugten Viewer (muss .gz Dateien unterstützen) an, falls Sie GNOME benutzen \- Kurzform von \-m 'gnome\-open man:%s'. "gnome\-open" ist Teil des Paketes "libgnome2\-0" (zumindest in Debian Etch).
25 .TP
25 .TP
2626 \fB\-x\fR
2727 Zeigt die Manpage im bevorzugten Viewer (muss .gz Dateien unterstützen) an, falls Sie KDE/GNOME/Xfce benutzen \- Kurzform von \-m 'xdg\-open man:%s'. "xdg\-open" ist Teil des Paketes "xdg\-utils" (zumindest in Debian Etch).
28 .TP
28 .TP
2929 \fB\-m manpageviewer\fR
3030 Überschreibt den Manpageviewer. Der Viewer muss .gz Dateien unterstützen. Es ist zu beachten, dass der komplette Aufruf formuliert werden muss. "%s" wird durch den Pfad zur Manpage ersetzt. Wenn "%s" fehlt wird " %s" an den Manpageviewer angehängt. Der Aufruf muss in "" oder '' gefasst werden \- siehe Beispiele.
3131 Bei der Benutzung eines grafischen Manpageviewers müssen Sie sicherstellen, dass Sie Zugriff auf den Desktop haben (ggf.: sux oder ssh mit x\-forwarding)
32 .TP
32 .TP
3333 \fB\-o otherviewer\fR
3434 Überschreibt den Viewer für sonstige Dateien (/usr/share/doc).
35 .TP
35 .TP
3636 \fB\-L Limit\fR
3737 Überschreitet ein File, das per Download heruntergeladen werden muss, das Limit so werden Sie gefragt, ob der Download stattfinden soll. Ohne Angabe einer Einheit ist die Angabe in Bytes. Durch Anhängen der Buchstaben K, M, G oder T kann die Einheit geändert werden.
38 .TP
38 .TP
3939 \fB\-l Sprache1[,...]\fR
4040 Englische Manpages werden immer angezeigt. Wenn Sie mehr Sprachen sehen wollen, so können Sie dies hier festlegen. Im Prinzip geben Sie hier eine mit Komma getrennte Liste der Ordner aus den Manpage Ordnern (/usr/share/man) an \- z. B. de,fr oder "zh*" wenn Sie alle chinesischen Manpages (sowohl das einfache "zh_CN" als auch das traditionelle Chinesisch "zh_TW") sehen wollen. Sicherheitshalber kann man auch immer "*" am Ende der Sprache anhängen.
4141 Bei der Installation ggf. dynamisch generierte zeichensatzbasierte Abwandlungen stehen nicht zur Auswahl.
42 .TP
42 .TP
4343 \fB\-z\fR
4444 Zur Auswahl der Dateien und ggf. zur Eingabe des Paketes wird "zenity" (grafischer Dialog) verwendet. Hierzu muss man berechtigt sein, X\-Programme zu starten. Diese Option in Kombination mit den Parametern \-k, \-g, \-x bzw. \-m und \-o ermöglicht es, debmany ohne Console zu verwenden.
45 .PP
45 .PP
4646 Die Manpages werden temporär nach /tmp oder /var/tmp extrahiert. Durch das Setzen und Exportieren der Umgebungsvariable TMPDIR bzw. das Setzen als temporären Variable kann der Speicherort überschrieben werden.
47 .PP
47 .PP
4848 Das Debian Paket "whiptail" (bevorzugt) oder "dialog" sowie "curl" muss installiert sein.
4949 .SH "BEISPIELE"
50 .TP
50 .TP
5151 debmany coreutils
5252 Zeigt alle Manpages des installierten Debian Pakets "coreutils" mit "man" an.
53 .TP
53 .TP
5454 debmany 3dchess
55 Zeigt alle Manpages des Paketes "3dchess" mit "man" an. Da es noch nicht installiert ist wird es vom Repository bezogen \- wenn nötig auch per Download.
56 .TP
55 Zeigt alle Manpages des Paketes "3dchess" mit "man" an. Da es noch nicht installiert ist wird es vom Repository bezogen \- wenn nötig auch per Download.
56 .TP
5757 debmany test.deb
5858 Zeigt alle Manpages des lokalen Debian Paketes "./test.deb" mit "man" an.
59 .TP
59 .TP
6060 debmany \-k sc
6161 Benutzt den bevorzugten Manviewer (für KDE Anwender)
62 .TP
62 .TP
6363 debmany \-g sc
6464 Benutzt den bevorzugten Manviewer (für GNOME Anwender)
65 .TP
65 .TP
6666 debmany \-x sc
6767 Benutzt den bevorzugten Manviewer (für KDE/GNOME/Xfce Anwender)
68 .TP
68 .TP
6969 debmany \-z \-k
7070 Benutzt "zenity" um Dateien auszuwählen und Paketnamen einzugeben.
71 .TP
71 .TP
7272 TMPDIR=~/tmp debmany \-m 'konqueror man:%s' sc
7373 Benutzt ~/tmp als temporären Ordner und Konqueror als Viewer
74 .TP
74 .TP
7575 alias debmany='debmany \-l de \-L 5M \-k'; debmany \-m man \-l "zh*" foo
7676 Setzte einen Alias um die bevorzugten Optionen festzulegen. Diese können, wie man sieht, jederzeit überschrieben werden.
77 .TP
77 .TP
7878 vi /usr/local/bin/ask # nach dem Speichern: chmod 755 ask
7979 #!/bin/dash
80 .br
80 .br
8181 read \-p "Programm zum Öffnen: " pgm
82 .br
82 .br
8383 eval $pgm "$1"
84 .br
84 .br
8585
86 .br
86 .br
8787 debmany \-o ask
88 .br
88 .br
8989 Beim Öffnen einer Datei aus usr/share/doc wird man nach dem Programm, mit dem man sie öffnen möchte, gefragt.
9090 .SH "AUTOR"
9191 Geschrieben von Michael Arlt.
44
55 debpaste - http://paste.debian.net/ XML-RPC client
66
7 =cut
7 =cut
88
99 # Author: Hanno Hecker <vetinari@ankh-morp.org>
1010 # Licence: AGPL 3.0 (http://www.fsf.org/licensing/licenses/agpl-3.0.html)
1111 # Version: $Id: debpaste 22 2009-11-19 17:23:47Z vetinari $
1212 # SVN: http://svn.ankh-morp.org:8080/tools/paste-dn/
13 #
14 # Required:
15 # deb: perl-base perl-modules
13 #
14 # Required:
15 # deb: perl-base perl-modules
1616 # libtimedate-perl libfrontier-rpc-perl libtext-iconv-perl
1717 #
18 # ToDo:
18 # ToDo:
1919 # * "get" formatting?
2020 # * wishlist :)
21 #
21 #
2222 use strict;
2323 use Getopt::Long;
2424 use Pod::Usage;
4242
4343 Your paste infos are saved to I<~/.debpaste.history>
4444
45 =item del
45 =item del
4646
4747 Usage: debpaste del [OPTIONS] ID
4848
49 Deletes paste with id ID. This must be an ID which you have pasted before
49 Deletes paste with id ID. This must be an ID which you have pasted before
5050 (and is in your history file)
5151
5252 =item get
6262
6363 Usage: debpaste lang [OPTIONS]
6464
65 Dumps the list of available languages for syntax highlighting, use the
65 Dumps the list of available languages for syntax highlighting, use the
6666 B<--lang=LANG> option when B<add>ing a paste.
6767
6868 =item edit
7676
7777 Usage: debpaste expire [OPTIONS] [ID]
7878
79 Removes the entry ID from history file. If no ID is given it removes all
79 Removes the entry ID from history file. If no ID is given it removes all
8080 entries which are expired.
8181
82 =back
83
84 =head1 OPTIONS
82 =back
83
84 =head1 OPTIONS
8585
8686 =over 4
8787
88 =item --user=USERNAME
88 =item --user=USERNAME
8989
9090 paste as USERNAME instead of C<anonymous>
9191
101101
102102 use LANG for syntax highlight ('debpaste lang' for available languages)
103103
104 =item --expires=SEC
104 =item --expires=SEC
105105
106106 expires in SEC seconds (default: 259200 = 72h)
107107
109109
110110 when adding new paste, use ENC as encoding of file, default: UTF-8
111111
112 =item --noheader
112 =item --noheader
113113
114114 when B<get>ting entries, don't print header, just dump the paste to stdout.
115115
134134
135135 The right place for setting default options like the username or expire values.
136136 Format is C<KeyInAnYCase: value>, example:
137
137
138138 User: Vetinari
139139 Expires: 86400
140140
158158 server => "http://paste.debian.net/server.pl",
159159 user => "anonymous",
160160 lang => "",
161 expires => 86400 * 3, #
161 expires => 86400 * 3, #
162162 history_file => $history,
163163 no_get_header => 0,
164164 );
181181 ." pasted before (and is in your history file)\n",
182182 'lang' => "\n"
183183 ."Usage: $0 lang [OPTIONS]\n"
184 ." Dumps the list of available languages for syntax highlighting\n",
184 ." Dumps the list of available languages for syntax highlighting\n",
185185 'edit' => "\n"
186186 ."Usage: $0 edit [OPTIONS] ID\n"
187187 ." Downloads the paste with id ID, spawns an editor (\$EDITOR)\n"
266266 $self->{$_} = $args{$_};
267267 }
268268 unless (exists $self->{editor}) {
269 $self->{editor} = $ENV{EDITOR} ?
270 $ENV{EDITOR} : ($ENV{VISUAL} ?
269 $self->{editor} = $ENV{EDITOR} ?
270 $ENV{EDITOR} : ($ENV{VISUAL} ?
271271 $ENV{VISUAL} : "/usr/bin/editor");
272272 }
273273 $self->{encoding} = "UTF-8" unless $self->{encoding};
320320 # FIXME: probably only works with paste.d.n's timezone:
321321 my $stime = str2time($rc->{submitdate}, "CET") - 3600;
322322 my $sub_date = strftime('%Y-%m-%d %H:%M:%S', localtime $stime);
323 my $exp_date = strftime('%Y-%m-%d %H:%M:%S',
323 my $exp_date = strftime('%Y-%m-%d %H:%M:%S',
324324 localtime($stime + $rc->{expiredate}));
325325 unless ($self->{no_get_header}) {
326326 print "User: ", $rc->{submitter}, "\n",
368368 close $fh or $self->_error("Failed to close tempfile: $!");
369369
370370 if (system($self->{editor}, $self->{_tempfile}) != 0) {
371 $self->_error("failed to execute: $!")
371 $self->_error("failed to execute: $!")
372372 if $? == -1;
373373
374374 $self->_error(sprintf('child died with signal %d, %s coredump',
380380
381381 open FH, $self->{_tempfile}
382382 or $self->_error("Failed to open temp file: $!");
383 {
384 local $/ = undef;
385 $txt = <FH>;
383 {
384 local $/ = undef;
385 $txt = <FH>;
386386 };
387387 close FH;
388388 unlink $self->{_tempfile};
397397 die "$0: no id given\n" unless $id;
398398 open FILE, $self->{history_file}
399399 or die "$0: failed to open history file: $!\n";
400 {
401 local $/ = "\n\n";
400 {
401 local $/ = "\n\n";
402402 while (<FILE>) {
403403 s#^[\n\s]+##ms;
404404 s#[\n\s]+$##ms;
434434 my @ids = ();
435435 open FILE, $self->{history_file}
436436 or return;
437 {
437 {
438438 local $/ = "\n\n";
439439 while (<FILE>) {
440440 s#^[\n\s]+##ms;
458458 }
459459 }
460460 close FILE;
461 open FILE, ">", $self->{history_file}
461 open FILE, ">", $self->{history_file}
462462 or die "$0: Failed to open history file: $!\n";
463463 foreach my $h (@history) {
464464 foreach (keys %{$h}) {
468468 print FILE "\n";
469469 }
470470 close FILE or die "$0: failed to write: $!\n";
471 print "$0: expired ", scalar(@ids), " entries from history",
471 print "$0: expired ", scalar(@ids), " entries from history",
472472 (@ids ? ": ".join(", ", @ids) : ""), "\n";
473473 }
474474
486486 unless $code;
487487
488488 $code = $self->_to_utf8($code);
489 my $rc = $self->{_service}->call("paste.addPaste", $code,
490 $self->{user},
491 $self->{expires} - time,
489 my $rc = $self->{_service}->call("paste.addPaste", $code,
490 $self->{user},
491 $self->{expires} - time,
492492 $self->{lang});
493 die $rc->{statusmessage},"\n"
493 die $rc->{statusmessage},"\n"
494494 if $rc->{rc};
495495 print $rc->{statusmessage},"\n";
496496 print "To delete this entry, use: $0 del $rc->{id}\n";
515515
516516 =head1 DOWNLOAD
517517
518 L<http://ankh-morp.org/code/paste-dn/debpaste> or
518 L<http://ankh-morp.org/code/paste-dn/debpaste> or
519519 L<SVN|http://svn.ankh-morp.org:8080/tools/paste-dn/>
520520
521521 =head1 NOTES
2828 grep_dctrl_options=""
2929 all="no"
3030
31 dglob_not() {
32 # List packages that are available but not installed
33 { dglob $* ; dglob -a $* ; } | sort | uniq -u ;
31 dglob_not() {
32 # List packages that are available but not installed
33 { dglob $* ; dglob -a $* ; } | sort | uniq -u ;
3434 }
3535
3636 while true; do
5252 fi
5353 shift
5454 ;;
55
55
5656 --) shift ; break ;;
5757 esac
5858 done
1313 packages.
1414
1515 It passes the I<package> argument(s) to L<dglob(1)> to retrieve a list of files
16 in those packages. You can use POSIX regular expressions for the package
16 in those packages. You can use POSIX regular expressions for the package
1717 names.
1818
1919 If B<dgrep> is invoked as B<degrep>, B<dfgrep> or B<dzgrep> then L<egrep(1)>,
2121
2222 =head1 OPTIONS
2323
24 B<dgrep> supports most of grep(1)'s options. Please refer to your
24 B<dgrep> supports most of grep(1)'s options. Please refer to your
2525 L<grep(1)> documentation (i.e. the manpage or the texinfo manual) for
26 a complete listing. Only a few options are excluded because they do not
26 a complete listing. Only a few options are excluded because they do not
2727 conform with the intended behaviour, see the list below.
2828
2929 =head2 Options of grep that are not supported by dgrep
8181
8282 ''')
8383 sys.exit(1)
84
84
8585 if outputfile == None:
8686 fd, outputfile = tempfile.mkstemp(suffix='.html')
8787 output = os.fdopen(fd, 'w')
111111 if (fields[0] == 'POPULARITY-CONTEST-0' or
112112 fields[0] == 'END-POPULARITY-CONTEST-0'):
113113 continue
114
114
115115 (atime, ctime, package, pathname) = fields
116116 # if pathname == '<NOFILES>' or pathname == '<RECENT-CTIME>':
117117 # continue
120120 print("POPCON: Adding package " + package)
121121 packages[package] = Package(package,atime)
122122 pkglist.append(packages[package])
123
123
124124 popcon.close()
125125
126126 page = urllib.request.urlopen(bugurl).readlines()
44 .\" it under the terms of the GNU General Public License as published by
55 .\" the Free Software Foundation; either version 2, or (at your option)
66 .\" any later version.
7 .\"
7 .\"
88 .\" On Debian systems, a copy of the GNU General Public License version 2
99 .\" can be found in /usr/share/common-licenses/GPL-2.
1010 .TH which-pkg-broke 1 "July 24 2006" "debian\-goodies" "debian\-goodies"