tags 670542 + patch
thanks

* Carsten Hey [2012-04-26 16:29 +0200]:
>  * Pass an option to deborphan to let it print it's output in the way
>    you like, or teach synaptic to parse both output formats.

This untested but trivial patch fixes synaptic to be able to parse both
output formats by stripping the architecture suffix:

--- a/common/raptoptions.cc
+++ b/common/raptoptions.cc
@@ -222,8 +222,8 @@ void RAPTOptions::rereadOrphaned()
       return;
    }
    while (fgets(buf, 254, fp) != NULL) {
-      //mvo: FIXME this sucks (remove newline at end)
-      buf[strlen(buf) - 1] = 0;
+      // remove newline at end and strip architecture suffix
+      buf[strcspn(buf, "\n:")] = '\0';
       //cout << "buf: " << buf << endl;
       setPackageOrphaned(buf, true);
    }


> Adapt synaptic to work with multiarch enabled deborphan versions:
> -----------------------------------------------------------------

All additional options intended to be used by deborphan's frontends are
documented in /usr/share/doc/deborphan/README.frontends on an up to date
Debian sid.


> Reimplement a subset of deborphan:
> ----------------------------------

Trying to prevent the need to discuss details afterwards might have lead
to a bit too verbose description.

In a nutshell:
  * create a set of possibly orphaned packages you want to check
  * create a set of all dependencies of all installed packages
  * remove packages that are in the second set from the first
  * do something sane with Provides:, depending on your data structure
    (Squeeze has 180 packages in main/{old,}libs with a Provides: field
     and 2695 packages without.)


>  * Get a set D of all Depends: and all Recommends: ...

deborphan by default also considers Suggests: as dependency.
Enhances: might be worth considering too.


Regards
Carsten



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to