diff options
author | Scott James Remnant <scott@netsplit.com> | 2005-03-21 03:10:27 +0000 |
---|---|---|
committer | Scott James Remnant <scott@netsplit.com> | 2005-03-21 03:10:27 +0000 |
commit | 4cc3ae4b3a3abda38828926b589d422596af81a8 (patch) | |
tree | 0ccb8aacd2c5c56a440e953acecd6864b033cf3c /src | |
parent | 00e5640a99be03aba40c9e08a663b90d8f8aa797 (diff) | |
download | dpkg-4cc3ae4b3a3abda38828926b589d422596af81a8.tar.gz |
dpkg (1.13.3) experimental; urgency=low
The "Paying off Karma at a vastly acclerated rate" Release.
* Missing newline added to warning output function. Closes: #283798.
* Fixed prototype warning in dpkg-scansources. Closes: #213577, #219760,
#267505.
* Removed trailing line from debian origins file. Closes: #264904.
* Changed dpkg-buildpackage to say "source changed by" rather than
"source maintainer is". Closes: #247313.
* Fixed dpkg-gencontrol to allow '-' in architecture names. Closes: #274677.
* Fixed "unknown information field" error to report field that it doesn't
know about. Closes: #275243.
* Documentation:
- Remove "medium-level" from description of dpkg. Closes: #292454.
- Harmonised argument names in update-alternatives(8).
Closes: #267095, #284941
- Documented what the '+' and '*' mean in update-alternatives --config
output. Closes: #270486.
- Mention aptitude alongside dselect in 'dpkg --usage' and
'dpkg-deb --help', fix quote style of mention in 'dpkg --help'.
Closes: #274800, #278118.
- Associate --truename with the description of what it does in
dpkg-divert(8). Closes: #277076.
- Removed last remaining references to the packaging manual, replacing
with better references. Closes: #262775.
- Documented format of file dpkg --set-selections takes. Closes: #270043.
-- Scott James Remnant <scott@netsplit.com> Mon, 21 Mar 2005 03:10:27 +0000
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 4 | ||||
-rw-r--r-- | src/query.c | 18 |
2 files changed, 13 insertions, 9 deletions
diff --git a/src/main.c b/src/main.c index a999d3bdb..8265068d5 100644 --- a/src/main.c +++ b/src/main.c @@ -110,7 +110,7 @@ Comparison operators for --compare-versions are:\n\ lt-nl le-nl ge-nl gt-nl (treat empty version as later than any version);\n\ < << <= = >= >> > (only for compatibility with control file syntax).\n\ \n\ -Use `dselect' or 'aptitude' for user-friendly package management.\n"), +Use `dselect' or `aptitude' for user-friendly package management.\n"), BACKEND, ADMINDIR) < 0) werr ("stdout"); } @@ -118,7 +118,7 @@ const char thisname[]= "dpkg"; const char architecture[]= ARCHITECTURE; const char printforhelp[]= N_("\ Type dpkg --help for help about installing and deinstalling packages [*];\n\ -Use dselect for user-friendly package management;\n\ +Use `dselect' or `aptitude' for user-friendly package management;\n\ Type dpkg -Dhelp for a list of dpkg debug flag values;\n\ Type dpkg --force-help for a list of forcing options;\n\ Type dpkg-deb --help for help about manipulating *.deb files;\n\ diff --git a/src/query.c b/src/query.c index b36dafce6..7c9b72556 100644 --- a/src/query.c +++ b/src/query.c @@ -183,9 +183,9 @@ Desired=Unknown/Install/Remove/Purge/Hold\n\ void listpackages(const char *const *argv) { struct pkgiterator *it; struct pkginfo *pkg; - struct pkginfo **pkgl; + struct pkginfo **pkgl, **pkgf; const char *thisarg; - int np, i, head, found; + int np, nf, i, head, found; modstatdb_init(admindir,msdbrw_readonly); @@ -199,14 +199,12 @@ void listpackages(const char *const *argv) { iterpkgend(it); assert(i==np); - qsort(pkgl,np,sizeof(struct pkginfo*),pkglistqsortcmp); - head=0; - + pkgf= m_malloc(sizeof(struct pkginfo*)*np); nf=0; if (!*argv) { for (i=0; i<np; i++) { pkg= pkgl[i]; if (pkg->status == stat_notinstalled) continue; - list1package(pkg,&head,pkgl,np); + pkgf[nf++] = pkg; } } else { while ((thisarg= *argv++)) { @@ -214,7 +212,7 @@ void listpackages(const char *const *argv) { for (i=0; i<np; i++) { pkg= pkgl[i]; if (fnmatch(thisarg,pkg->name,0)) continue; - list1package(pkg,&head,pkgl,np); found++; + pkgf[nf++] = pkg; found++; } if (!found) { fprintf(stderr,_("No packages found matching %s.\n"),thisarg); @@ -222,6 +220,12 @@ void listpackages(const char *const *argv) { } } } + + qsort(pkgf,nf,sizeof(struct pkginfo*),pkglistqsortcmp); + head=0; + for (i=0; i<nf; i++) + list1package(pkgf[i],&head,pkgf,nf); + if (ferror(stdout)) werr("stdout"); if (ferror(stderr)) werr("stderr"); modstatdb_shutdown(); |