public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* [PATCH setup] Ignore reinstall requests if version is not accessible
@ 2022-12-11 15:11 Christian Franke
  2022-12-15 17:39 ` Jon Turney
  0 siblings, 1 reply; 4+ messages in thread
From: Christian Franke @ 2022-12-11 15:11 UTC (permalink / raw)
  To: cygwin-apps

[-- Attachment #1: Type: text/plain, Size: 231 bytes --]

This prevents accidental package loss if reinstall is run from local 
directory but the package is no longer cached.

Possible further improvement: Do not offer "Reinstall" in the popup menu 
in this case.

-- 
Regards,
Christian


[-- Attachment #2: 0001-Ignore-reinstall-requests-if-version-is-not-accessib.patch --]
[-- Type: text/plain, Size: 717 bytes --]

From 054697c297a3e21ee5e63f51b27431640cab5cde Mon Sep 17 00:00:00 2001
From: Christian Franke <christian.franke@t-online.de>
Date: Sun, 11 Dec 2022 15:55:47 +0100
Subject: [PATCH] Ignore reinstall requests if version is not accessible

---
 package_meta.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package_meta.cc b/package_meta.cc
index 2257b59..3daa970 100644
--- a/package_meta.cc
+++ b/package_meta.cc
@@ -672,7 +672,7 @@ packagemeta::set_action (_actions action, packageversion const &default_version,
   else if (action == Reinstall_action)
     {
       desired = installed;
-      if (desired)
+      if (desired.accessible ())
 	{
 	  pick (true);
 	  srcpick (false);
-- 
2.38.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-12-17 17:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-11 15:11 [PATCH setup] Ignore reinstall requests if version is not accessible Christian Franke
2022-12-15 17:39 ` Jon Turney
2022-12-16 15:40   ` Christian Franke
2022-12-17 17:00     ` Jon Turney

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).