Debian Bug report logs - #136097
grep-dctrl: Merging status and available would be helpful

version graph

Package: dctrl-tools; Maintainer for dctrl-tools is dctrl-tools developers <dctrl-tools-devel@lists.alioth.debian.org>; Source for dctrl-tools is src:dctrl-tools.

Reported by: Ben Armstrong <synrg@sanctuary.nslug.ns.ca>

Date: Wed, 27 Feb 2002 21:03:05 UTC

Severity: wishlist

Found in version dctrl-tools/2.7

Fixed in version dctrl-tools/2.11

Done: Antti-Juhani Kaijanaho <ajk@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to Antti-Juhani Kaijanaho <ajk@debian.org>, grep-dctrl@packages.qa.debian.org:
Bug#136097; Package grep-dctrl. Full text and rfc822 format available.

Acknowledgement sent to Ben Armstrong <synrg@sanctuary.nslug.ns.ca>:
New Bug report received and forwarded. Copy sent to Antti-Juhani Kaijanaho <ajk@debian.org>, grep-dctrl@packages.qa.debian.org. Full text and rfc822 format available.

Message #5 received at maintonly@bugs.debian.org (full text, mbox):

From: Ben Armstrong <synrg@sanctuary.nslug.ns.ca>
To: Debian Bug Tracking System <maintonly@bugs.debian.org>
Subject: grep-dctrl: Merging status and available would be helpful
Date: Wed, 27 Feb 2002 16:55:41 -0400
Package: grep-dctrl
Version: 1.9
Severity: wishlist

It would be nice if grep-dctrl were able to look at a merged view
of two Debian control file sources.  This would allow one at a glance
to answer questions such as "Of all of the available packages matching
this query, which do I have installed?"

I need just such a thing for Debian Jr.  I want to be able to generate
a little web page, a la:

grep-status -sPackage,Status,Description junior- |awk 'BEGIN {print 
"<html><head><title>Debian Jr. Packages</title><head><body><u1>Debian 
Jr. Packages</u1><p><table><tr><td>Package<td>Status<td>Description"} 
/^P/ {print "<tr><td>" $2} /^(S|D)/ {$1=""; print "<td>" $0} END {print 
"</table></p></body></html>"}' >jr-status.html

The trouble with this is it is missing the descriptions for everything
I don't have installed.  This information would be accessible if 
grep-status were capable of merging the available file.

The feature would be something like:

cd /var/lib/dpkg ; grep-dctrl --merge available status ...

The --merge would be implicitly on "Package:".  I cannot imagine what
other field it would make sense to merge on, but if you think it makes
sense to allow other sorts of merges (from a set of "partial" Debian
control files?) you might want to implement it in a more general
way.

Thanks,
Ben Armstrong

-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux sanctuary 2.4.17 #1 Fri Feb 22 22:16:07 AST 2002 i586
Locale: LANG=C, LC_CTYPE=C

Versions of packages grep-dctrl depends on:
ii  libc6                         2.2.5-1    GNU C Library: Shared libraries an




Information forwarded to debian-bugs-dist@lists.debian.org, Antti-Juhani Kaijanaho <ajk@debian.org>, grep-dctrl@packages.qa.debian.org:
Bug#136097; Package grep-dctrl. Full text and rfc822 format available.

Acknowledgement sent to Ben Armstrong <synrg@sanctuary.nslug.ns.ca>:
Extra info received and forwarded to list. Copy sent to Antti-Juhani Kaijanaho <ajk@debian.org>, grep-dctrl@packages.qa.debian.org. Full text and rfc822 format available.

Message #10 received at 136097@bugs.debian.org (full text, mbox):

From: Ben Armstrong <synrg@sanctuary.nslug.ns.ca>
To: 136097@bugs.debian.org
Subject: Proposed design and sample hack
Date: Thu, 28 Feb 2002 10:49:17 -0400
OK, wdiff is an unspeakably horrible way of doing this, but this
produces results something like what I want:

grep-status junior- >temp1
grep-available junior- >temp2
wdiff temp1 temp2 |sed -e's/\[-//; s/-\]//; s/{+//; s/+}//'
	|grep-dctrl -sPackage,Status,Description 'junior-'
rm temp1 temp2

Note that I apply the pattern match to both status and available
first and then redo the pattern match on the merged file.  This
is for wdiff's benefit.  I think if temp1 and temp2 were rather
dissimilar, wdiff would get very confused and start mismatching
package records, producing a mishmash as a result.  I don't think
this is a terribly good way of doing it.

Note also that I *assume* both dctrl inputs are sorted the same
way.  This is probably not a good assumption to make, either.

So I think the problem reduces to:

- write a sort-dctrl program that sorts on the specified field
  (normally Package)
- write a merge-dctrl program that takes two sorted dctrl files
  as input and produces merged output following these simple
  rules:
  - merge on the specified field (normally Package)
  - fields present in one but not in the other are output by
    default (may need switch to control this behaviour, a la
    join -a)
  - entire paragraphs present in one but not in the other are
    output by default too (again, something like join -a may
    be desired)
  - fields present in both are either:
    - wordwise merged a la wdiff (ugh, I cannot imagine what a
      mess this would make if we are merging dissimilar descriptions)
    - output the field from file 1
    - output the field from file 2

Use sort-dctrl and merge-dctrl with grep-dctrl to allow searching
of the resulting merged dctrl files.  Writing sort-dctrl can be
skipped or deferred so long as we continue to assume pre-sorted dctrl 
inputs.  Are 'available' and 'status' guaranteed to be sorted (or at
least in the same order) anyway?

Ben
-- 
    nSLUG       http://www.nslug.ns.ca      synrg@sanctuary.nslug.ns.ca
    Debian      http://www.debian.org       synrg@debian.org
[ pgp key fingerprint = 7F DA 09 4B BA 2C 0D E0  1B B1 31 ED C6 A9 39 4F ]
[ gpg key fingerprint = 395C F3A4 35D3 D247 1387  2D9E 5A94 F3CA 0B27 13C8 ]



Information forwarded to debian-bugs-dist@lists.debian.org, Antti-Juhani Kaijanaho <ajk@debian.org>, grep-dctrl@packages.qa.debian.org:
Bug#136097; Package grep-dctrl. Full text and rfc822 format available.

Acknowledgement sent to Antti-Juhani Kaijanaho <gaia@iki.fi>:
Extra info received and forwarded to list. Copy sent to Antti-Juhani Kaijanaho <ajk@debian.org>, grep-dctrl@packages.qa.debian.org. Full text and rfc822 format available.

Message #15 received at 136097@bugs.debian.org (full text, mbox):

From: Antti-Juhani Kaijanaho <gaia@iki.fi>
To: Ben Armstrong <synrg@sanctuary.nslug.ns.ca>, 136097@bugs.debian.org
Subject: Re: Bug#136097: Proposed design and sample hack
Date: Fri, 1 Mar 2002 09:55:05 +0200
On 20020228T104917-0400, Ben Armstrong wrote:
>   - fields present in both are either:
>     - wordwise merged a la wdiff (ugh, I cannot imagine what a
>       mess this would make if we are merging dissimilar descriptions)
>     - output the field from file 1
>     - output the field from file 2

What about:
      - output the field from both files
so that the result contains two instances of that field?
At least as an option?

(BTW: it's likely that I'll have this implemented before the end
of this month, it has caught my interest :-)

-- 
Antti-Juhani Kaijanaho, LuK (BSc)    * http://www.iki.fi/gaia/ * gaia@iki.fi



Information forwarded to debian-bugs-dist@lists.debian.org, Antti-Juhani Kaijanaho <ajk@debian.org>, grep-dctrl@packages.qa.debian.org:
Bug#136097; Package grep-dctrl. Full text and rfc822 format available.

Acknowledgement sent to Ben Armstrong <synrg@sanctuary.nslug.ns.ca>:
Extra info received and forwarded to list. Copy sent to Antti-Juhani Kaijanaho <ajk@debian.org>, grep-dctrl@packages.qa.debian.org. Full text and rfc822 format available.

Message #20 received at 136097@bugs.debian.org (full text, mbox):

From: Ben Armstrong <synrg@sanctuary.nslug.ns.ca>
To: Antti-Juhani Kaijanaho <gaia@iki.fi>, 136097@bugs.debian.org
Subject: Re: Bug#136097: Proposed design and sample hack
Date: Fri, 1 Mar 2002 09:36:23 -0400
On Fri, Mar 01, 2002 at 09:55:05AM +0200, Antti-Juhani Kaijanaho wrote:
> What about:
>       - output the field from both files
> so that the result contains two instances of that field?
> At least as an option?

If it breaks the control file format, I would say no.  Whatever the
merge does, it should produce valid control file output.

> (BTW: it's likely that I'll have this implemented before the end
> of this month, it has caught my interest :-)

Super!

Ben
-- 
    nSLUG       http://www.nslug.ns.ca      synrg@sanctuary.nslug.ns.ca
    Debian      http://www.debian.org       synrg@debian.org
[ pgp key fingerprint = 7F DA 09 4B BA 2C 0D E0  1B B1 31 ED C6 A9 39 4F ]
[ gpg key fingerprint = 395C F3A4 35D3 D247 1387  2D9E 5A94 F3CA 0B27 13C8 ]



Information forwarded to debian-bugs-dist@lists.debian.org, Antti-Juhani Kaijanaho <ajk@debian.org>:
Bug#136097; Package grep-dctrl. Full text and rfc822 format available.

Acknowledgement sent to Andreas Tille <tillea@rki.de>:
Extra info received and forwarded to list. Copy sent to Antti-Juhani Kaijanaho <ajk@debian.org>. Full text and rfc822 format available.

Message #25 received at 136097@bugs.debian.org (full text, mbox):

From: Andreas Tille <tillea@rki.de>
To: 136097@bugs.debian.org
Cc: Ben Armstrong <synrg@sanctuary.nslug.ns.ca>
Subject: Re: Bug#136097: Proposed design and sample hack
Date: Wed, 3 Mar 2004 12:05:11 +0100 (CET)
On Fri, Mar 01, 2002 at 09:55:05AM +0200, Antti-Juhani Kaijanaho wrote:

> (BTW: it's likely that I'll have this implemented before the end
> of this month, it has caught my interest :-)
Hmmm, there are 24 Month left now and a redesign of the whole
program was done.  Any chance to get this fixed in the near future?

Kind regards and thanks for maintaining this useful program

          Andreas.



Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#136097; Package grep-dctrl. Full text and rfc822 format available.

Acknowledgement sent to Antti-Juhani Kaijanaho <ajk@debian.org>:
Extra info received and forwarded to list. Full text and rfc822 format available.

Message #30 received at 136097@bugs.debian.org (full text, mbox):

From: Antti-Juhani Kaijanaho <ajk@debian.org>
To: Andreas Tille <tillea@rki.de>, 136097@bugs.debian.org
Cc: Ben Armstrong <synrg@sanctuary.nslug.ns.ca>
Subject: Re: Bug#136097: Proposed design and sample hack
Date: Wed, 3 Mar 2004 21:19:04 +0200
[Message part 1 (text/plain, inline)]
On 20040303T120511+0100, Andreas Tille wrote:
> Hmmm, there are 24 Month left now and a redesign of the whole
> program was done.  Any chance to get this fixed in the near future?

I decided it's best done by a separate program.  It is in the todo list
(I even wrote a paper on the design!), but it'll take some time before I
have time to write it.  (Best guess, I'll start in April.  I need the
implementation for work reasons as well.)

-- 
Antti-Juhani Kaijanaho, Debian developer 

http://kaijanaho.info/antti-juhani/blog/en/debian
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Antti-Juhani Kaijanaho <ajk@debian.org>:
Bug#136097; Package grep-dctrl. Full text and rfc822 format available.

Acknowledgement sent to Andreas Tille <tillea@rki.de>:
Extra info received and forwarded to list. Copy sent to Antti-Juhani Kaijanaho <ajk@debian.org>. Full text and rfc822 format available.

Message #35 received at 136097@bugs.debian.org (full text, mbox):

From: Andreas Tille <tillea@rki.de>
Cc: 136097@bugs.debian.org, Ben Armstrong <synrg@sanctuary.nslug.ns.ca>
Subject: Re: Bug#136097: Proposed design and sample hack
Date: Wed, 3 Mar 2004 21:42:12 +0100 (CET)
On Wed, 3 Mar 2004, Antti-Juhani Kaijanaho wrote:

> I decided it's best done by a separate program.  It is in the todo list
> (I even wrote a paper on the design!), but it'll take some time before I
> have time to write it.  (Best guess, I'll start in April.  I need the
> implementation for work reasons as well.)
Thanks for the clarification.  Good to hear that youz need it for
your own work. ;-)

Hmm April - this might be right in time for Sarge release.
<duck>

Kind regards

         Andreas.



Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#136097; Package grep-dctrl. Full text and rfc822 format available.

Acknowledgement sent to Antti-Juhani Kaijanaho <ajk@debian.org>:
Extra info received and forwarded to list. Full text and rfc822 format available.

Message #40 received at 136097@bugs.debian.org (full text, mbox):

From: Antti-Juhani Kaijanaho <ajk@debian.org>
To: 136097@bugs.debian.org
Subject: On merge-dctrl
Date: Fri, 26 Aug 2005 17:01:06 +0300
[Message part 1 (text/plain, inline)]
Yet another year and no merge-dctrl despite promises.

I suppose I should note here the chief reason: I am still not confident
that I know what the program should do!  It is not at all obvious what
the correct specification is.

I return to this bug from time to time and try to handle it but every
time I get bogged down in the specification stage, and give up, for the
time being.

However, I have not lost hope.
[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Antti-Juhani Kaijanaho <ajk@debian.org>:
Bug#136097; Package grep-dctrl. Full text and rfc822 format available.

Acknowledgement sent to Antti-Juhani Kaijanaho <antti-juhani@kaijanaho.fi>:
Extra info received and forwarded to list. Copy sent to Antti-Juhani Kaijanaho <ajk@debian.org>. Full text and rfc822 format available.

Message #45 received at 136097@bugs.debian.org (full text, mbox):

From: Antti-Juhani Kaijanaho <antti-juhani@kaijanaho.fi>
To: 136097@bugs.debian.org
Subject: Re: Bug#136097: grep-dctrl: Merging status and available would be helpful
Date: Mon, 9 Apr 2007 18:22:21 +0300
I'm currently working on join-dctrl, which implements join(1)-like
functionality for dctrl-tools.  I expect implementation to take about a
day or two, though it may take longer.  It looks to me like it ought to
be enough to satisfy this wish.

Sorry about taking so long about it.  The trouble was not in the actual
implementation, but in the specification of what exactly it should do.




Information forwarded to debian-bugs-dist@lists.debian.org, Antti-Juhani Kaijanaho <ajk@debian.org>:
Bug#136097; Package grep-dctrl. Full text and rfc822 format available.

Acknowledgement sent to Antti-Juhani Kaijanaho <antti-juhani@kaijanaho.fi>:
Extra info received and forwarded to list. Copy sent to Antti-Juhani Kaijanaho <ajk@debian.org>. Full text and rfc822 format available.

Message #50 received at 136097@bugs.debian.org (full text, mbox):

From: Antti-Juhani Kaijanaho <antti-juhani@kaijanaho.fi>
To: 136097@bugs.debian.org, Ben Armstrong <synrg@sanctuary.nslug.ns.ca>
Subject: Re: Bug#136097: grep-dctrl: Merging status and available would be helpful
Date: Wed, 11 Apr 2007 02:27:13 +0300
Ben Armstrong wrote:
> It would be nice if grep-dctrl were able to look at a merged view
> of two Debian control file sources.  This would allow one at a glance
> to answer questions such as "Of all of the available packages matching
> this query, which do I have installed?"

Progress report:

There is now a join-dctrl in the experimental Darcs repository (see
http://people.debian.org/~ajk/dctrl-tools-darcs.html).  It has one known
bug (it doesn't handle it if the -o option is not specified) and it is
missing one feature required for closing this bug report (namely, the
analogue of join(1)'s -a option).

I expect to get those two issues done by the end of the week, possibly
earlier, at which time I will upload to experimental.

If you want to test it beforehand, the following ought to work:

% darcs get http://antti-juhani.kaijanaho.fi/darcs/dctrl-tools-experimental/
% sudo apt-get build-dep dctrl-tools
% debuild -b -us -uc

I realise that in these five years, you probably have solved the problem in
some other way, but hopefully this will be of some help, if not to you
then to somebody else :)




Bug reassigned from package `grep-dctrl' to `dctrl-tools'. Request was from Antti-Juhani Kaijanaho <antti-juhani@kaijanaho.fi> to control@bugs.debian.org. (Fri, 20 Apr 2007 17:36:03 GMT) Full text and rfc822 format available.

Bug marked as found in version 2.7. Request was from Antti-Juhani Kaijanaho <antti-juhani@kaijanaho.fi> to control@bugs.debian.org. (Fri, 20 Apr 2007 18:09:02 GMT) Full text and rfc822 format available.

Tags added: pending Request was from Antti-Juhani Kaijanaho <antti-juhani@kaijanaho.fi> to control@bugs.debian.org. (Sun, 05 Aug 2007 17:57:04 GMT) Full text and rfc822 format available.

Message sent on to Ben Armstrong <synrg@sanctuary.nslug.ns.ca>:
Bug#136097. Full text and rfc822 format available.

Message #59 received at 136097-submitter@bugs.debian.org (full text, mbox):

From: Antti-Juhani Kaijanaho <antti-juhani@kaijanaho.fi>
To: 136097-submitter@bugs.debian.org
Subject: Re: Bug#136097: grep-dctrl: Merging status and available would be helpful
Date: Sun, 5 Aug 2007 20:56:33 +0300
[Message part 1 (text/plain, inline)]
package dctrl-tools
tags 136097 + pending
thanks

I just pushed to the non-experimental repository an implementation for
join-dctrl -a option.  As far as I can tell, this fulfils this
longstanding wishlist item.

-- 
Antti-Juhani Kaijanaho, Jyväskylä
http://antti-juhani.kaijanaho.fi/newblog/
http://www.flickr.com/photos/antti-juhani/
[signature.asc (application/pgp-signature, inline)]

Reply sent to Antti-Juhani Kaijanaho <ajk@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Ben Armstrong <synrg@sanctuary.nslug.ns.ca>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #64 received at 136097-close@bugs.debian.org (full text, mbox):

From: Antti-Juhani Kaijanaho <ajk@debian.org>
To: 136097-close@bugs.debian.org
Subject: Bug#136097: fixed in dctrl-tools 2.11
Date: Sun, 05 Aug 2007 18:32:02 +0000
Source: dctrl-tools
Source-Version: 2.11

We believe that the bug you reported is fixed in the latest version of
dctrl-tools, which is due to be installed in the Debian FTP archive:

dctrl-tools_2.11.dsc
  to pool/main/d/dctrl-tools/dctrl-tools_2.11.dsc
dctrl-tools_2.11.tar.gz
  to pool/main/d/dctrl-tools/dctrl-tools_2.11.tar.gz
dctrl-tools_2.11_amd64.deb
  to pool/main/d/dctrl-tools/dctrl-tools_2.11_amd64.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 136097@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Antti-Juhani Kaijanaho <ajk@debian.org> (supplier of updated dctrl-tools package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sun, 05 Aug 2007 21:06:22 +0300
Source: dctrl-tools
Binary: dctrl-tools
Architecture: source amd64
Version: 2.11
Distribution: unstable
Urgency: low
Maintainer: Antti-Juhani Kaijanaho <ajk@debian.org>
Changed-By: Antti-Juhani Kaijanaho <ajk@debian.org>
Description: 
 dctrl-tools - Command-line tools to process Debian package information
Closes: 136097
Changes: 
 dctrl-tools (2.11) unstable; urgency=low
 .
   * new program join-dctrl
     Closes: #136097 (grep-dctrl: Merging status and available would be helpful)
     Requested by Ben Armstrong <synrg@sanctuary.nslug.ns.ca>.
   * Update copyright lines
   * debian/rules: typo fix
   * Compatibility: remove (out of date, duplicates manpage information)
   * NEWS: delete (out of date)
   * README: delete (out of date and useless)
   * AUTHORS: delete (out of date and hard to keep up to date)
   * debian/README: update
   * debian/changelog: start 2.11
   * grep-dctrl/grep-dctrl.c: fix GET_BACKUP_FIELD for (size_t)-1
     on machines where sizeof(int) != sizeof(size_t)
   * export para_compare from lib/sorter.[ch]
   * GNUmakefile (test): call tester.sh using sh explicitly
Files: 
 6a60dcd1bb04bf724115f025136a55fc 584 utils optional dctrl-tools_2.11.dsc
 19462b754ed179a91f048fa3bec22f05 2694435 utils optional dctrl-tools_2.11.tar.gz
 4e0bb551f63ade907facab83d4ec7f43 120424 utils optional dctrl-tools_2.11_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGthW5HsI32VNFhOgRAggfAJ9gy57Oz1WjKj/WUHdWb5000NLb8QCdFniB
jb6JLZomgEIru7Lelc3L/xE=
=HccW
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Wed, 19 Sep 2007 07:43:37 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Apr 25 08:03:04 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.