public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: Jon Turney <jon.turney@dronecode.org.uk>
To: Christian Franke <Christian.Franke@t-online.de>,
	"cygwin-apps@cygwin.com" <cygwin-apps@cygwin.com>
Subject: Re: [PATCH setup] Add view mode "Unneeded"
Date: Sun, 14 Aug 2022 14:55:53 +0100	[thread overview]
Message-ID: <7ac0957d-b881-d276-733d-3b3736dab14b@dronecode.org.uk> (raw)
In-Reply-To: <68d66187-7b70-9fb0-fd12-e1dca7e08399@t-online.de>

On 02/08/2022 13:17, Christian Franke wrote:
> In long standing cygwin installations, many no longer needed 
> automatically installed packages (e.g. libicuNN) accumulate. This patch 
> adds a new view which is possibly helpful to cleanup packages manually.
> 
> Some possible later enhancements:
> - automatically refresh this view (a few seconds) after the user changed 
> a package status as this may add or remove entries.
> - add a keyboard shortcut (^U) to the list view for "Uninstall this 
> package and then select next package"
> 

Thanks.  This looks good.

I think perhaps a better approach would be a view showing all packages 
which aren't user_picked, or a dependency of a user_picked package.

(If I've read the code correctly your implementation has the weakness 
that if e.g. appA -> libbB -> libC, which is then changed to appA -> 
libD -> libE, it will only show libC as unneeded, then libB on the next 
run?)

> +// Scan installed or desired packages and collect the names of packages
> +// which provide the dependencies of other packages or are member of
> +// category "Base".
> +static void FindNeededPackages (const packagedb & db, std::set<std::string> & needed)
> +{
> +  std::map<std::string, std::string> providedBy;
> +  for (const auto & p : db.packages)
> +    {
> +      const packagemeta & pkg = *p.second;
> +      if (!pkg.isBinary ())
> +        continue;
> +      if (!(pkg.desired && (pkg.installed || pkg.picked ())))
> +        continue;

This seems redundant.  Why can't this be just !pkg.desired?

This should also update the tooltip for the view dropdown 
(IDS_VIEWBUTTON_TOOLTIP) to describe the new view.

  reply	other threads:[~2022-08-14 13:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-02 12:17 Christian Franke
2022-08-14 13:55 ` Jon Turney [this message]
2022-08-15 13:04   ` Christian Franke
2022-08-16 19:57     ` Jon Turney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7ac0957d-b881-d276-733d-3b3736dab14b@dronecode.org.uk \
    --to=jon.turney@dronecode.org.uk \
    --cc=Christian.Franke@t-online.de \
    --cc=cygwin-apps@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).