X-Recipient: archive-cygwin AT delorie DOT com X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E6C2F387084F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=SystematicSw.ab.ca Authentication-Results: sourceware.org; spf=none smtp.mailfrom=brian DOT inglis AT systematicsw DOT ab DOT ca X-Authority-Analysis: v=2.3 cv=ecemg4MH c=1 sm=1 tr=0 a=kiZT5GMN3KAWqtYcXc+/4Q==:117 a=kiZT5GMN3KAWqtYcXc+/4Q==:17 a=IkcTkHD0fZMA:10 a=7vT8eNxyAAAA:8 a=vaJtXVxTAAAA:8 a=jChkm-x5hCMFubTIiR0A:9 a=QEXdDO2ut3YA:10 a=Mzmg39azMnTNyelF985k:22 Subject: Re: Listing only manually installed package To: cygwin AT cygwin DOT com References: <20200627 DOT 013459 DOT 435705702566725844 DOT yasu AT utahime DOT org> <0310877b-25b4-168d-f605-98b924ca6b62 AT SystematicSw DOT ab DOT ca> <20200627 DOT 030404 DOT 1219230595825821536 DOT yasu AT utahime DOT org> <33a21818-8fa4-e05a-64c5-90c0a01bdb63 AT dronecode DOT org DOT uk> From: Brian Inglis Autocrypt: addr=Brian DOT Inglis AT SystematicSw DOT ab DOT ca; prefer-encrypt=mutual; keydata= mDMEXopx8xYJKwYBBAHaRw8BAQdAnCK0qv/xwUCCZQoA9BHRYpstERrspfT0NkUWQVuoePa0 LkJyaWFuIEluZ2xpcyA8QnJpYW4uSW5nbGlzQFN5c3RlbWF0aWNTdy5hYi5jYT6IlgQTFggA PhYhBMM5/lbU970GBS2bZB62lxu92I8YBQJeinHzAhsDBQkJZgGABQsJCAcCBhUKCQgLAgQW AgMBAh4BAheAAAoJEB62lxu92I8Y0ioBAI8xrggNxziAVmr+Xm6nnyjoujMqWcq3oEhlYGAO WacZAQDFtdDx2koSVSoOmfaOyRTbIWSf9/Cjai29060fsmdsDLg4BF6KcfMSCisGAQQBl1UB BQEBB0Awv8kHI2PaEgViDqzbnoe8B9KMHoBZLS92HdC7ZPh8HQMBCAeIfgQYFggAJhYhBMM5 /lbU970GBS2bZB62lxu92I8YBQJeinHzAhsMBQkJZgGAAAoJEB62lxu92I8YZwUBAJw/74rF IyaSsGI7ewCdCy88Lce/kdwX7zGwid+f8NZ3AQC/ezTFFi5obXnyMxZJN464nPXiggtT9gN5 RSyTY8X+AQ== Organization: Systematic Software Message-ID: Date: Sun, 28 Jun 2020 12:47:35 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <33a21818-8fa4-e05a-64c5-90c0a01bdb63@dronecode.org.uk> Content-Language: en-CA X-CMAE-Envelope: MS4wfNrQH0I9OTj3MWxWkIOHwFYbHaAllyLm2sWD7rWxXCxt/R6ypx4L2F8RCcfeGWlkIzplWObj03cOq8t8pn+wCTdXRI6fiQhqssZJYeBfy8uy3zW85Fig 4sDS1k4GlT6idXidPHvhOG4lxyF1fePSQ3KiKXRj4X48/VnJ0hsR5LoqaGArs9mCdZMJG0hOt5SoJw== X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: cygwin AT cygwin DOT com Content-Type: text/plain; charset="utf-8" Errors-To: cygwin-bounces AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 05SIm7An021023 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 >>> 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 >>> 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