This is the mail archive of the cygwin-apps mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [[PATCH setup topic/libsolv] 2/2] Avoid clobbering installed.db when no setup.ini is found

On 10/28/2017 8:29 AM, Ken Brown wrote:
Move the calls to packagedb::read and other packagedb functions from
do_ini_thread to ChooserPage::OnInit.  If no setup.ini is found,
do_ini_thread is never called.  But we need to ensure that
packagedb::read is called, or else installed.db gets emptied.
--- | 5 +++++    | 7 -------
  2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/ b/
index 619d7db..013a30a 100644
--- a/
+++ b/
@@ -268,6 +268,11 @@ ChooserPage::OnInit ()
      packagemeta::ScanDownloadedFiles (MirrorOption);
packagedb db;
+  db.makeBase();
+  db.upgrade();
+  db.fixup_source_package_ids();
+  db.removeEmptyCategories();
    db.setExistence ();
    db.fillMissingCategory ();

Sorry, this isn't quite right. The new calls need happen before ScanDownLoadedFiles is called, to avoid a crash when the latter looks for the installation tarballs.

I'll send a revised patch shortly.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]