vrms-1.16/0000755000000000000000000000000011625736207007327 5ustar vrms-1.16/reasons/0000755000000000000000000000000011625736207011001 5ustar vrms-1.16/reasons/vrms0000644000000000000000000000366311625736207011723 0ustar angband: No commercial distribution autobook: Modifications limited doc-html-w3: No modifications or derivatives allowed font3d: No commercial use gimp1.2-nonfree: (US only) Includes patent-encumbered algorithms gimp1.3-nonfree: (US only) Includes patent-encumbered algorithms gsfonts-other: Partly no modifications allowed, partly shareware gsn-curses: No modifications allowed gsn-jigsaw: No modifications allowed human-icon-theme: Creative Commons Attribution-ShareAlike 2.5 License hwb: No modifications allowed ibm-j2re1.5: Proprietary licence, no source available ibm-j2sdk1.4: Proprietary licence, no source available ibm-j2sdk1.5: Proprietary licence, no source available jdk1.1: Proprietary license lha: No modifications allowed, non-network distributions problematic mcvert: No commercial distribution nvidia-glx: Proprietary license nvidia-glx-dev: Proprietary license povray: Distribution limitations, modifications limited povray-doc: Distribution limitations, modifications limited povray-misc: Distribution limitations, modifications limited snes9x-common: No commercial use snes9x-fx: No commercial use snes9x-opengl: No commercial use snes9x-svga: No commercial use snes9x-x: No commercial use sun-j2re1.3: Proprietary licence, no source available sun-j2re1.4: Proprietary licence, no source available sun-j2re1.5: Proprietary licence, no source available sun-j2sdk1.3: Proprietary licence, no source available sun-j2sdk1.4: Proprietary licence, no source available sun-j2sdk1.5: Proprietary licence, no source available unrar: Modifications problematic xanim: No commercial distribution xanim-modules: Highly restricting license terms xfonts-scalable-nonfree: No modifications allowed xmame: Distribution limitations, no commercial use xmame-fx: Distribution limitations, no commercial use xmame-gl: Distribution limitations, no commercial use xmame-svga: Distribution limitations, no commercial use xmame-x: Distribution limitations, no commercial use vrms-1.16/vrms.10000644000000000000000000000503511625736207010403 0ustar .TH VRMS 1 "A Cute Little Hack" \" -*- nroff -*- .SH NAME vrms \- report of installed non-free software .SH SYNOPSIS .B vrms [\fIOPTION\fR] ... .SH DESCRIPTION This program began as an attempt to create a "virtual Richard M. Stallman" for Debian GNU/Linux. Thus the choice of name. .PP This program analyzes the currently-installed package list on a Debian GNU/Linux system, and reports the non-free and contrib packages that are currently installed to stdout. In some cases, such as regarding documentation licensed under the GNU Free Documentation License with invariant sections, the opinions of Richard M. Stallman and the Debian project have diverged since this program was originally written. In such cases, this program follows the definition of freedom embodied in the Debian Free Software Guidelines. .PP The packages in the non-free tree have restrictions on their use and/or distribution which cause them to fail to meet the terms of the Debian Free Software Guidelines included as part of the Debian Social Contract. However, some are sufficiently useful that their presence is often tolerated by Debian users despite their licensing. .PP The packages in the contrib tree are themselves free software but have some dependency on non-free software for their use that make them worthy of reporting so that their use can also be consciously considered. .PP Richard is the most vocal among us on the issue of software morality, and we agree with Richard that Debian users should have an easy way to know when they are running non-free software on their systems. This program is our attempt to fill that need. .SH OPTIONS All options can be prefixed with \-\- (eg: \fB\-\-noexplain\fR) to turn them off. .TP \fB\-q\fR, \fB\-\-quiet\fR Do nothing if there are no non-free packages installed. .TP \fB\-e\fR, \fB\-\-explain\fR Give a brief explanation of why each package is non-free, if available. This is the default. .TP \fB\-s\fR, \fB\-\-sparse\fR Just output a list of non-free packages. .TP \fB\-\-reason\-dir\fR=\fIDIR\fR Use \fIDIR\fR as the reason directory, instead of /usr/share/vrms/reasons/. .TP \fB\-h\fR, \fB\-\-help\fR Display help. .TP \fB\-d\fR, \fB\-\-debug\fR Generate debugging information. .SH FILES .TP .I /usr/share/vrms/reasons Default source of explanations for why packages are non-free. .SH HISTORY This program was written by Bdale Garbee and Bill Geddes for the Debian GNU/Linux system, in response to an open discussion with Richard Stallman about the issues surrounding the availability/desirability of the 'non-free' package tree in Debian. vrms-1.16/debian/0000755000000000000000000000000011625736207010551 5ustar vrms-1.16/debian/dirs0000644000000000000000000000010511625736207011431 0ustar usr/bin usr/share/vrms/reasons usr/share/doc/vrms usr/share/man/man1 vrms-1.16/debian/copyright0000644000000000000000000000211511625736207012503 0ustar This package was debianized by Bdale Garbee Stephen Moraco now helps maintain this package It was written specifically for Debian GNU/Linux. Authors: Perl Hacking Bill Geddes Docs and Packaging Bdale Garbee Miscellaneous Tasks Rogério Brito Copyright: Copyright (c) 1999-2005 by Bill Geddes, Bdale Garbee and Stephen Moraco Copyright (c) 2005, 2006, 2009 by Bdale Garbee and Rogério Brito This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. A copy of the GNU General Public License is available on Debian-based systems as /usr/share/common-licenses/GPL-2. vrms-1.16/debian/cron.monthly0000644000000000000000000000010111625736207013116 0ustar #!/bin/sh [ -x /usr/bin/vrms ] || exit 0 /usr/bin/vrms --quiet vrms-1.16/debian/README.Debian0000644000000000000000000000266011625736207012616 0ustar This program was written specifically for Debian by Bill Geddes and Bdale Garbee in January of 1999. The effort resulted from a series of discussions with Richard M. Stallman about the problem posed by the existence of the non-free tree on many Debian FTP sites to users who wish to run a system of entirely Free Software. The goal is to make it easy for a Debian user to know what non-free software is currently installed on their system so that they can make conscious decisions about what software to use. Presently, vrms also shows the user if any packages from the contrib section is used. Things that are on our wish list: - augment the script to support a "verbose" option, which would display some text from the collected public writings of RMS, et al, helping to explain the issues posed by non-free software. - further augment the verbose option to make specific comments about each non-free package... for example, explain the patent issues surrounding the GIF image format. - process dependency information to report what DFSG-compliant package, if any, may have led to the installation of each non-free package. Feel free to let us know if you have any other good ideas! The best way to do so would be to file a wishlist bug against package 'vrms' in the Debian Bug Tracking System. Contributions in form of code are also accepted, if you prefer to give a prototype of a feature that you would like vrms to have. vrms-1.16/debian/rules0000755000000000000000000000067211625736207011636 0ustar #!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 %: dh $@ vrms-1.16/debian/install0000644000000000000000000000006711625736207012145 0ustar vrms usr/bin reasons/vrms usr/share/vrms/reasons/vrms vrms-1.16/debian/control0000644000000000000000000000261211625736207012155 0ustar Source: vrms Section: admin Priority: optional Maintainer: Debian vrms Maintainers Standards-Version: 3.9.2 Build-Depends: debhelper (>= 8) Vcs-Git: git://anonscm.debian.org/vrms/vrms.git Vcs-Browser: http://alioth.debian.org/scm/browser.php?group_id=30771 Homepage: http://vrms.alioth.debian.org/ Uploaders: Bdale Garbee , Rogério Brito DM-Upload-Allowed: yes Package: vrms Architecture: all Depends: ${misc:Depends} Description: virtual Richard M. Stallman The vrms program will analyze the set of currently-installed packages on a Debian-based system, and report all of the packages from the non-free and contrib trees which are currently installed. . In some cases, the opinions of Richard M. Stallman and the Debian project have diverged since this program was originally written. In such cases, this program follows the Debian Free Software Guidelines. . Note that vrms is not limited to Debian systems only (which means that it also works with Debian-derived distributions such as Ubuntu). It is also not limited to Linux-based systems. . Future versions of vrms may include an option to also display text from the public writings of RMS and others that explain why use of each of the installed non-free packages might cause moral issues for some in the Free Software community. This functionality is not yet included. vrms-1.16/debian/manpages0000644000000000000000000000000711625736207012264 0ustar vrms.1 vrms-1.16/debian/changelog0000644000000000000000000002653211625736207012433 0ustar vrms (1.16) unstable; urgency=low [ Rogério Brito ] * vrms: + consider the section "partner" as non-free. (LP: #284078). [ Bdale Garbee ] * debian/control: + update maintainer address, standards version, VCS fields + change debhelper build-dep to require version 8 or later * debian/rules, debian/compat: + switch to using debhelper 8 dh -- Bdale Garbee Fri, 26 Aug 2011 09:26:28 -0600 vrms (1.15) unstable; urgency=low [ Rogério Brito ] * reasons/vrms: include "human-icon-theme" explanation. * debian/control: + update Standards-Version to 3.8.1. No changes required. + include proper Homepage: field. + include proper VCS field. + include misc:Depends to the Depends: field of the binary package. + include versioned Build-Depends: on debhelper. * debian/copyright: + fix reference to the GPL file, versioning it. + update the years of copyright. + update my e-mail address. * debian/rules: + change deprecated dh_clean -k call to dh_prep. + make more extensive use of debhelper: - use dh_install for the files. - use dh_fixperms to fix the file permissions. * reasons/vrms: + remove tango-icon-theme, which is now in public domain (see http://tango.freedesktop.org/Tango_Desktop_Project). + remove bender (Fix "Blender is free") (Closes: #525377). [ Bdale Garbee ] * debian/control: + include "DM-U-A" field set to yes. -- Rogério Brito Tue, 19 May 2009 02:35:46 -0300 vrms (1.14) unstable; urgency=low [ Bdale Garbee ] * merge patch from Robert Millan that includes contrib packages in the report generated by vrms, closes: #99989, #160478, #210455, #210645 * remove Stephen Moraco from the list of uploaders, closes: #465954 * always display numeric package stats even when no non-free or contrib packages are present, closes: #424938 * update the package description and the man page to reflect the inclusion of contrib packages in the output, and to make it clear that when the DFSG and opinions of RMS differ, vrms follows the DFSG -- Bdale Garbee Wed, 23 Apr 2008 08:16:32 -0600 vrms (1.13) unstable; urgency=low [ Rogério Brito ] * Acknowledge the NMU work done by Christian Perrier; * debian/control: removed "Depends:" field completely; * debian/control: added "XS-Vcs-SVN:" field for our repository; * debian/control: added "XS-Homepage:" field for our homepage at alioth; * debian/control: updated my e-mail address; * debian/postinst: removed: it did nothing. Tks: Joey Hess (Closes: #419147); * debian/rules: change the rules so that the "arch: all" package is built in the "binary-indep" target, which is more correct than in the "binary-arch" target; * reasons/vrms: remove mpg123 entries. Tks: Daniel Kobras (Closes: #397445); * reasons/vrms: include tango-icon-theme. Tks: Chris Lamb (Closes: #403752); * vrms: don't complain with packages missing Section field. Tks: Joey Hess (Closes: #161368); * vrms: removed dependency on diagnostics.pm; -- Rogério Brito Wed, 11 Jul 2007 18:35:39 -0300 vrms (1.12-0.1) unstable; urgency=low * Non-maintainer upload to fix a longstanding issue (abusive debconf note) * Remove the superfluous debconf note. Closes: #397433 * This removes the need for debconf translations. Apologies to translators for the extra useless work. Closes: #398076, #399210, #404488 -- Christian Perrier Wed, 17 Jan 2007 22:49:41 +0100 vrms (1.12) unstable; urgency=low [ Rogério Brito ] * With the last updates, it seems that bug 298147 got fixed. Closes: #298147; * debian/README.Debian: renamed the old README.debian (Tks: Daniel Baumann); * debian/README.Debian: removed spurious last empty line (Tks: Daniel Baumann); * debian/changelog: removed spurious tabs and spaces (Tks: Daniel Baumann); * debian/config: configuration script for debconf; * debian/control: added myself (with Bdale's permission) as an uploader; * debian/control: include dependency on debconf; * debian/control: make debhelper a build-depends, not build-depends-indep; * debian/control: mention that vrms is not limited to Debian, nor to Linux; * debian/control: upgraded the Policy Standard to 3.7.2 (no changes required); * debian/copyright: include the years of copyright the authors; * debian/copyright: mention my changes in vrms; * debian/copyright: removed spurious last empty line (Tks: Daniel Baumann); * debian/dirs: removed, as install -D is sufficient (Tks: Daniel Baumann); * debian/po: Initial use of i18n with debconf-gettextize. * debian/postinst: modify the script for debconf; * debian/postinst: remove content superseded by debconf (Tks: Daniel Baumann); * debian/rules: remove `pwd` in calls to install (Tks: Daniel Baumann); * debian/rules: remove use of dh_fixperms (Tks: Daniel Baumann); * debian/rules: remove useless dh_installmenu (Tks: Daniel Baumann); * debian/rules: removed build-stamp and install-stamp as suggested by Daniel Baumann; * debian/rules: use the debhelper script for using debconf; * debian/templates: introduce templates for debconf; * debian/templates: use of debconf-textintroduce the templates for debconf; * vrms: include preamble with copyright, so that we use the best-current practices; -- Rogério Brito Fri, 3 Nov 2006 03:10:02 -0300 vrms (1.11) unstable; urgency=low [ Bdale Garbee ] * drop urgency back to low * update debhelper compat level to 5 * freshen the README.Debian file [ Rogério Brito ] * Urgency high because it fixes an RC bug: - debian/control: for "use diagnostics", include perl-modules as a dependency (Closes: #338243); * Acknowledge the previous NMU: Closes: #252146, #306734, #211988, #274296, #302504, #158702; * Forgot to mention minor fixes of vrms in the previous version; * debian/control: updated build-dependency to debhelper (>= 4.0.0); * debian/control: cosmetic change to long description; * Gave this changelog a proper facelift (thanks: Lionel Elie Mamane); * Incorporated a slightly modified version Ubuntu's patch for checking for non-free packages (thanks: Martin Meredith); * reasons/vrms: improvements: - sorted the file; - fixed typo (smes -> snes); - fixed the reason reported for autobook (thanks: Joost van Baal); - removed graphviz entry for good; - included (some) non-free java packages generated by java-package; - sorted the file in a better way (thanks: Lionel Elie Mamane). -- Bdale Garbee Thu, 8 Dec 2005 12:13:36 -0700 vrms (1.10) unstable; urgency=low [ Bdale Garbee ] * create debian/compat instead of using DH_COMPAT in rules file * more entries for reasons file from Sebastian Rittau, closes: #174520 * update control file to reflect move to team maintainership [ Rogério Brito ] * debian/rules: put DH_COMPAT=4, just to be up-to-date with debhelper; * debian/rules: fix installation of executable and manpage; * debian/rules: eliminated some unnecessary use of dh_* scripts. -- Bdale Garbee Tue, 11 Oct 2005 19:41:10 -0600 vrms (1.9-0.1) unstable; urgency=low [ Rogério Brito ] * NMU to fix some trivial changes. * vmrs: Minimal update to fix the "(pur)" problem. Closes: #252146. * vrms.1: Spelling fixes. Closes: #306734. * vrms.1: Fix manpage for --sparse option. Closes: #211988. * vrms.1: Remove HTML-entities from the manpage. Closes: #274296. * debian/rules: change dh_installmanpages to (newer) dh_installman. * debian/control: upgraded to standards 3.6.1. Closes: 302504. * debian/control: changed short description to start with lowcase. * This package is now lintian-clean. [ Joey Hess ] * Reviewed and sponsored this release. * Increase standards-version to 2.6.2 (no changes). * graphviz and autobook are now free, remove them from the reasons file. Closes: #158702 -- Joey Hess Wed, 24 Aug 2005 16:35:29 -0400 vrms (1.9) unstable; urgency=low * fix spelling error, closes: #155201, #155549 * "he who does all the work should be the maintainer of record..." -- Bdale -- Bdale Garbee Mon, 5 Aug 2002 20:57:38 -0600 vrms (1.8) unstable; urgency=low * Verified outstanding NMU's (Closes: #88082, #55443, #57926, #79748, #82721, #99485, #121215) * Added light weight statistics (Closes: #32368) * Added detect and report of badly formed entries in status file (when affects vrms ability) (Closes: #32517) * Verified that curent code fixes existing bugs (Closes: #53155, #57693, #57766, #78633, #84280, #148106) * Applied patch adding display options and built-in help, updated manpage, added Reason display (Closes: bug#146782) * Bdale added Stephen as an authorized uploader -- Stephen M Moraco Wed, 3 Jul 2002 20:10:02 -0600 vrms (1.7) unstable; urgency=low * new (return of the original) maintainer, closes: #141228, #90183 * cosmetic update of rules file, etc * lintian clean -- Bdale Garbee Thu, 4 Apr 2002 17:14:57 -0700 vrms (1.6.2) unstable; urgency=low * Non-maintainer upload. * debian/cron.monthly: Exit quietly if /usr/bin/vrms doesn't exist (closes: #99485, #121215). * vrms: Change some regex matches to equality tests to avoid 'not-installed' matching 'installed' and showing some purged packages (closes: #57926). * debian/control: Use Build-Depends-Indep rather than Build-Depends. * Remove per-user Emacs local variables from this changelog. -- Colin Watson Tue, 27 Nov 2001 11:10:04 +0000 vrms (1.6.1) unstable; urgency=low * Non-maintainer upload. * Standards-Version: 3.5.2 (closes: #82721): - Build dependencies. - Added debhelper token to postinst so that the /usr/doc link gets created. * Removed spurious man page in /usr/man left over from FHS updates (closes: #55443). * Removed dh_make templates debian/init.d.ex and debian/menu.ex. * Corrected path to GPL in copyright file (closes: #79748). * Removed obsolete dh_suidregister call from debian/rules. * Run postinst with 'set -e'. * Mark /etc/cron.monthly/vrms as a conffile (closes: #88082, part 1). * Run vrms in the postinst only on an initial install (closes: #88082, part 2). -- Colin Watson Sat, 17 Mar 2001 01:13:14 +0000 vrms (1.6) unstable; urgency=low * Fixed case where vrms missed packages in section non-us/non-free. -- Bill Geddes Thu, 16 Dec 1999 16:08:45 -0700 vrms (1.4) unstable; urgency=low * Fixed bug 32622 - hang on package w/no description. -- Bill Geddes Thu, 18 Feb 1999 07:17:51 -0700 vrms (1.3) unstable; urgency=low * Fixed bug 32394 - unnecessary dependency - an oversight. * Re-worded some language in control file. -- Bill Geddes Thu, 28 Jan 1999 14:02:55 -0700 vrms (1.2) unstable; urgency=low * Fixed bug - did not find all non-free packages. * Eliminate execution of 'dpkg -l'. -- Bill Geddes Mon, 25 Jan 1999 14:23:45 -0700 vrms (1.1) unstable; urgency=low * New Maintainer. * Now accounts for partially installed packages, closes #32380 -- Bill Geddes Mon, 25 Jan 1999 14:23:45 -0700 vrms (1.0) unstable; urgency=low * Initial Release. -- Bdale Garbee Tue, 19 Jan 1999 23:16:27 -0700 vrms-1.16/debian/compat0000644000000000000000000000000211625736207011747 0ustar 8 vrms-1.16/vrms0000755000000000000000000002523411625736207010252 0ustar #!/usr/bin/perl # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # use strict; use warnings; use Getopt::Long; # Declaration of important/main variables. my $quiet = 0; my $sparse = 0; my $help = 0; my $explain = 1; my $debug = 0; my $reasondir = '/usr/share/vrms/reasons/'; my %reason = (); # # Auxiliary functions section (FIXME: put them in a file by themselves). # # sub usage: # Input: nothing. # Output: Messages to stdout telling the usage of the program. sub usage() { print <= 1; open(REASON, "<", $file) or die "Can't open FILE [$file]: $!\n"; while (my $line = ) { chomp $line; # Grab a line of the form 'package: reason', skip if we don't match my ($pkg, $reason) = ($line =~ /^(\S+):\s+(.*)\s*$/) or next; print "'$pkg' because '$reason'\n" if ($debug >= 1); # If this is _our_ master file, then prefer anything # else (so that package maintainers can override) next if exists $reason{$pkg} and $file =~ /\/vrms$/; $reason{$pkg} = $reason; } close REASON or die "Can't close FILE [$file]: $!\n"; } # # Main program starts here. # GetOptions('q|quiet' => \$quiet, 's|sparse' => \$sparse, 'e|explain!' => \$explain, 'reason-dir=s' => \$reasondir, 'd|debug+' => \$debug, 'h|help' => \$help); if ($help) { usage(); exit 0; } opendir(REASONDIR, $reasondir) or die "Can't open DIR [$reasondir]: $!\n"; # Parse all the reason files in $reasondir except those beginning with # a . or ending with a ~ parse_reason_file("$reasondir/$_") foreach (grep {!/~$/ && !/^\./} readdir(REASONDIR)); closedir REASONDIR or die "Can't close DIR [$reasondir]: $!\n"; my $statusfile = '/var/lib/dpkg/status'; my $is_nonfree = 0; ### preset none found, yet my %nonfree = (); my $is_other_nonfree = 0; ### preset none found, yet my %other_nonfree = (); my $is_contrib = 0; ### preset none found, yet my %contrib = (); my $is_other_contrib = 0; ### preset none found, yet my %other_contrib = (); my %pkg_status = (); my $pkgcnt = 0; my $clumpcnt = 0; my $dontcarelines = 5; ### no. of lines a non-installed entry may have in the statusfile my $sysname = ""; chop($sysname = `uname -n`); open(PKG_SOURCE, "< $statusfile") or die "Can't open FILE [$statusfile]: $!\n"; $/ = ""; ### snarf a paragraph at a time while() { my $clump = $_; $clumpcnt++; my (@pkglines) = split(/\n/, $clump); ### iff more than $dontcarelines lines, package is installed, so process it ### (speed-up by skipping don't-care entries) if (@pkglines > $dontcarelines) { my $pkg = ""; ### name of this package my $pkgstatus = ""; ### status my $plan = ""; ### install plan (hold, deinstall, purge, install, etc.) my $state = ""; ### state (ok or ???) my $status = ""; ### status (installed, not-installed, etc.) my $section = ""; ### section this is where non-free is marked my $shortdescr = ""; ### one-liner description of pkg my $linenbr = 0; ### current line number of this pkackag's info my $label = ""; ### junk field (not used, except to catch split values) my $has_pkg = 0; ### reset the markers my $has_status = 0; my $has_section = 0; foreach (@pkglines) { chomp; $linenbr++; if (/^Package:/) { ($label, $pkg) = split(/:\s+/,$_,2); $pkgcnt++; printf "pkg(%4.4d) pkg=[%s]\n",$pkgcnt,$pkg if $debug >= 1; $has_pkg = 1; ### we have necessary section next; } if (/^Status:/) { my $label = ""; ($label, $pkgstatus) = split(/:\s+/,$_,2); print "\tpkgstatus=[$pkgstatus]\n" if $debug >= 1; $pkg_status{$pkg} = $pkgstatus; ($plan, $state, $status) = split(/\s+/,$pkgstatus); print "\t\tplan=[$plan]\n" if $debug >= 1; print "\t\tstate=[$state]\n" if $debug >= 1; print "\t\tstatus=[$status]\n" if $debug >= 1; $has_status = 1; ### we have necessary section next; } if (/^Section:/) { my $label = ""; ($label, $section) = split(/:\s+/,$_,2); print "\tsection=[$section]\n" if $debug >= 1; $has_section = 1; ### we have necessary section if ($section =~ /contrib|non-free|restricted|multiverse|partner/) { ### read thru rest of array to find descr instead of waiting for it my $found_descr =0; while (! $found_descr) { if ($linenbr > $#pkglines) { ### iff badly formed entry ensure blank description print "\tEEEE shortdescr=[$shortdescr]\n" if $debug >= 1; last; } my $dline = $pkglines[$linenbr++]; if($dline =~ /^Description:/) { ($label, $shortdescr) = split(/:\s+/,$dline,2); print "\tshortdescr=[$shortdescr]\n" if $debug >= 1; $found_descr = 1; } } if ($section =~ /contrib/) { if (lc $status eq 'installed') { $is_contrib = 1; $contrib{$pkg} = $shortdescr; } else { $is_other_contrib = 1; $other_contrib{$pkg} = $shortdescr; } } else { if (lc $status eq 'installed') { $is_nonfree = 1; $nonfree{$pkg} = $shortdescr; } else { $is_other_nonfree = 1; $other_nonfree{$pkg} = $shortdescr; } } } last; ### this is last desriptor of package we care about so end loop } else { ### un-processed lines from package info if($debug >= 1) { print "\t\t--- $_\n"; } } } if (!$has_status or !$has_pkg) { print STDERR "vrms: ERROR- Badly formed dpkg-status entry #$clumpcnt!\n"; print STDERR " pkg=[$pkg], pkgstatus=[$pkgstatus], section=[$section] \n"; } } else { ### Entries which are 2 or 4 lines are not-installed if ($debug >= 1) { ### emit debug so can veryify parsing my $lineCt = @pkglines; print " SKIPPED <5: $lineCt lines\n"; foreach (@pkglines) { my $spacer = ($_ =~ /Package:/) ? "" : " "; print " SKIPPED <5:$spacer [$_]\n"; } } } } close (PKG_SOURCE) or die "Can't close FILE [$statusfile]: $!\n"; #print "$pkgcnt packages installed\n"; my $nfcnt = 0; my $pkgname = ""; my $nonfreecnt = (keys %nonfree); if($is_nonfree) { if($sparse) { foreach $pkgname (sort keys (%nonfree)) { $nfcnt++; print "$pkgname\n"; } } else { $~ = "nonfree_head"; write ; $~ = "nfp"; foreach $pkgname (sort keys(%nonfree) ) { $nfcnt++; write ; print " Reason: $reason{$pkgname}\n" if (exists $reason{$pkgname} and $explain); } } } my $pnfcnt = 0; my $other_nonfreecnt = (keys %other_nonfree); if($is_other_nonfree) { if($sparse) { foreach $pkgname (sort keys(%other_nonfree)) { $pnfcnt++; print "$pkgname\n"; } } else { $~ = "nonfree_partialhead"; write; $~ = "pnf"; foreach $pkgname (sort keys(%other_nonfree)) { $pnfcnt++; write; print " Reason: $reason{$pkgname}\n" if (exists $reason{$pkgname} and $explain); } } } my $cbcnt = 0; my $contribcnt = (keys %contrib); if($is_contrib) { print "\n"; if($sparse) { foreach $pkgname (sort keys (%contrib)) { $cbcnt++; print "$pkgname\n"; } } else { $~ = "contrib_head"; write ; $~ = "cbp"; foreach $pkgname (sort keys(%contrib) ) { $cbcnt++; write ; print " Reason: $reason{$pkgname}\n" if (exists $reason{$pkgname} and $explain); } } } my $pcbcnt = 0; my $other_contribcnt = (keys %other_contrib); if($is_other_contrib) { if($sparse) { foreach $pkgname (sort keys(%other_contrib)) { $pcbcnt++; print "$pkgname\n"; } } else { $~ = "contrib_partialhead"; write; $~ = "pcb"; foreach $pkgname (sort keys(%other_contrib)) { $pcbcnt++; write; print " Reason: $reason{$pkgname}\n" if (exists $reason{$pkgname} and $explain); } } } if (!$quiet and !$sparse) { printf "\n"; if ($nfcnt != 0 or $pnfcnt != 0) { my $total_nonfree = $nonfreecnt + $other_nonfreecnt; my $total_installed = $pkgcnt; my $percentage = $total_nonfree * 100 / $total_installed; printf " %d non-free packages, %2.1f%% of %d installed packages.\n", $total_nonfree, $percentage, $total_installed; } if ($cbcnt != 0 or $pcbcnt != 0) { my $total_contrib = $contribcnt + $other_contribcnt; my $total_installed = $pkgcnt; my $percentage = $total_contrib * 100 / $total_installed; printf " %d contrib packages, %2.1f%% of %d installed packages.\n", $total_contrib, $percentage, $total_installed; } } if (!$quiet and $nfcnt == 0 and $pnfcnt == 0 and $cbcnt == 0 and $pcbcnt == 0) { print "No non-free or contrib packages installed on $sysname! rms would be proud.\n" } format nonfree_head = @|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| "Non-free packages installed on $sysname" . format nonfree_partialhead = @|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| "Non-free packages with status other than installed on $sysname" . format contrib_head = @|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| "Contrib packages installed on $sysname" . format contrib_partialhead = @|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| "Contrib packages with status other than installed on $sysname" . format nfp = @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $pkgname, $nonfree{$pkgname} . format pnf = @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<@<<@< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $pkgname, '(', $pkg_status{$pkgname},')', $other_nonfree{$pkgname} . format cbp = @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $pkgname, $contrib{$pkgname} . format pcb = @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<@<<@< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $pkgname, '(', $pkg_status{$pkgname},')', $other_contrib{$pkgname} .