On 2020-06-28 08:12, Jon Turney wrote: > On 26/06/2020 23:20, Brian Inglis wrote: >> On 2020-06-26 12:04, Yasuhiro KIMURA wrote: >>> From: Brian Inglis <brian.ing...@systematicsw.ab.ca> >>> Subject: Re: Listing only manually installed package >>> Date: Fri, 26 Jun 2020 11:20:26 -0600 >>> >>>> $ grep '\s1$' /etc/setup/installed.db # manual >>>> $ grep '\s0$' /etc/setup/installed.db # auto >>>> >>>> $ awk '1 == $3' /etc/setup/installed.db # manual >>>> $ awk '0 == $3' /etc/setup/installed.db # auto >>>> >>>> I can't remember what the pristine state of the Base category packages are, >>>> I've messed around with the setup files so much for so long. >>> >>> I checked /etc/setup/installed.db on my 32bit and 64bit console but in >>> each case all lines end with "0". Therefore, >>> >>> From: Andrey Repin <anrdae...@yandex.ru> >>> Subject: Re: Listing only manually installed package >>> Date: Fri, 26 Jun 2020 20:15:21 +0300 >>> >>>> AFAIK, there's no way to tell if a package was manually selected or not. >>>> Cygwin's setup just don't store this information. >>> >>> As you say, unfortunately there seems to be no way to tell if a >>> package was installed manually or automatically. >> >> Just checked the setup sources, so unless there is a bug, you are running a >> setup version over 5 years old, or not running Cygwin setup, user_picked is >> part >> of the package metadata that is still read from and written to installed.db. > > Unfortunately, it seems there is a bug (since 2.895, 18 months ago, ...), and > this information doesn't always get recorded correctly. > > Thanks for drawing my attention to this.
Thanks for spotting the bug - I missed the user_picked parameter being defaulted. Is there any way to run setup with suitable parameters and have it set the user_picked field in installed.db? Or is it down to finding packages in installed.db that are roots, with no installed packages dependent on them, according to the setup.ini depends2/requires lists, and producing an updated installed.db? -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. [Data in IEC units and prefixes, physical quantities in SI.] -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple