]> cygwin.com Git - cygwin-apps/setup.git/log
cygwin-apps/setup.git
5 years agoAdd double-click for a 'default action' to ListView release_2.896
Jon Turney [Wed, 20 Mar 2019 19:56:44 +0000 (19:56 +0000)]
Add double-click for a 'default action' to ListView

Add support for a double-click in the ListView to invoke a 'default
action'.

Because we receive both NM_CLICK and then NM_DBCLK, reduce the area of a
pop-up column which is sensitive to a click to the drop-down button
(which opens a focus-stealing pop-up menu), so the rest of the area can
receive a click (which does nothing) or a double-click (which does the
default action).

For a package, this default action is to toggle between the currently
installed version (or uninstalled, if not installed), and the highest
non-test version.

There is no keyboard acceleration for this action currently.

5 years agoDon't propagate actions down category tree into obsolete categories
Jon Turney [Wed, 20 Mar 2019 18:08:23 +0000 (18:08 +0000)]
Don't propagate actions down category tree into obsolete categories

Choosing the 'Install' action on the 'All' category shouldn't propagate
down into the '_obsolete' category, because that will just result in
dependency conflicts due to trying to install both obsolete packages and
their replacements.

5 years agoDon't show FTP 550 'file not found' errors in a MessageBox
Jon Turney [Wed, 20 Mar 2019 17:12:08 +0000 (17:12 +0000)]
Don't show FTP 550 'file not found' errors in a MessageBox

Don't show FTP 550 'file not found' errors in a MessageBox. Also log
InternetGetLastResponseInfo() when fetching a URL.

WinInet documentation seems to indicate this kind of extended error
information only exists when WinInet has an FTP error code to report.

Log this error (and the associated URL) rather than just showing a
MessageBox. Don't bother showing a MessageBox for 550, since we can
tolerate certain missing files (e.g. setup.zst), and we'll go on to
report that couldn't fetch needed files in a more generic way.

5 years agoUse 'kill -W' when killing processes
Jon Turney [Wed, 20 Mar 2019 16:23:36 +0000 (16:23 +0000)]
Use 'kill -W' when killing processes

We only have access to the Windows PID, which (since Cygwin 3.0.0) are
completely decoupled from Cygwin PIDs.

Use the new '-W' flag to indicate to kill that we are providing a
Windows PID.

(If the Cygwin install is too old to support kill -W, kill will fail,
and we'll fall back to using TerminateProcess())

5 years agoOnly dump transaction list when it's finalized release_2.895
Jon Turney [Sun, 21 Oct 2018 12:14:05 +0000 (13:14 +0100)]
Only dump transaction list when it's finalized

Dumping the transaction list after 1) trust level is set, 2) solving for
dependencies, and 3) adding source packages is a bit much.

5 years agoSimple keyboard accelerators for Listview
Jon Turney [Sat, 21 Jul 2018 21:19:51 +0000 (22:19 +0100)]
Simple keyboard accelerators for Listview

Wire-up certain actions to keyboard accelerators.

To permit selecting a subitem apparently needs us to custom-draw everything,
so for simplicity, just make the accelerators per row.

Getting the enter keypress to be delivered to the listview is tricky (the
propsheet really want to hold onto it), so for the moment we just use the
Windows menu key and space bar as accelerators.

5 years agoIndicate test packages in action menu
Jon Turney [Wed, 17 Oct 2018 13:12:26 +0000 (14:12 +0100)]
Indicate test packages in action menu

5 years agoAdd listview to tab order on chooser page
Jon Turney [Sat, 21 Jul 2018 21:19:51 +0000 (22:19 +0100)]
Add listview to tab order on chooser page

5 years agoUse selected row background colour for a checkbox column
Jon Turney [Wed, 17 Oct 2018 12:39:17 +0000 (13:39 +0100)]
Use selected row background colour for a checkbox column

5 years agoAllow for width of dropdown button in popup columns
Jon Turney [Mon, 15 Oct 2018 19:46:31 +0000 (20:46 +0100)]
Allow for width of dropdown button in popup columns

Currently, the dropdown button in the 'New' column can overlap the version,
because  'New' columns is just sized to hold the widest version.

Allow for the width of the dropdown button as well in the 'New' column width

5 years agoMerge branch 'topic/listview' release_2.894
Jon Turney [Sat, 13 Oct 2018 17:56:11 +0000 (18:56 +0100)]
Merge branch 'topic/listview'

5 years agoEnsure that an installed packageversion has an ldesc if possible
Ken Brown [Mon, 6 Aug 2018 14:05:12 +0000 (10:05 -0400)]
Ensure that an installed packageversion has an ldesc if possible

In packagedb::read(), copy the ldesc from setup.ini to the
packageversion read from installed.db.  Otherwise, an installed
package with only one version will not have an ldesc to use as a
tooltip.

v2: If the installed version is no longer available, copy the ldesc
from the current version of the package.

5 years agoAdd ldesc tooltips to sdesc column of listview
Jon Turney [Fri, 20 Jul 2018 11:52:20 +0000 (12:52 +0100)]
Add ldesc tooltips to sdesc column of listview

Listview's built-in tooltip support doesn't support subitems, so we have to
build our own

v2: Use string cache

5 years agoRestore packagemeta::LDesc()
Jon Turney [Wed, 18 Jul 2018 19:50:31 +0000 (20:50 +0100)]
Restore packagemeta::LDesc()

v2:
Update for removed 'usiing namespace std'

5 years agoAdd LDesc() accessor method to SolvableVersion
Jon Turney [Sun, 15 Jul 2018 14:41:12 +0000 (15:41 +0100)]
Add LDesc() accessor method to SolvableVersion

5 years agoUse indents in category view
Jon Turney [Tue, 17 Jul 2018 10:09:32 +0000 (11:09 +0100)]
Use indents in category view

We keep around an empty imagelist for 1x1 images, to reset the indent when
not in tree view mode

(This isn't quite right as the listview will allocate a 1-pixel space before
column 0 for those images, but this seems the best we can do as 0x0
imagelists aren't allowed...)

5 years agoUse an icon to represent expanded/collapsed state
Jon Turney [Tue, 17 Jul 2018 18:26:23 +0000 (19:26 +0100)]
Use an icon to represent expanded/collapsed state

Use a listview icon to represent expanded/collapsed state, rather than
puttting '[+]'/'[-]' in front of the category name

Just use the item icon directly to represent expanded/collapsed state,
rather than using a state icon as otherwise we have empty space where the
item icon would be, when it's size is being used for indenting.

The icons were made by tracing the previously used .bmp in Inkscape to
produce a .svg, then converting that to an icon with ImageMagick using
'convert -filter point -background transparent -define icon:auto-resize'

v2:
Drop execute mode (Achim Gratz)

5 years agoShow the count of packages in a category
Jon Turney [Mon, 16 Jul 2018 19:02:25 +0000 (20:02 +0100)]
Show the count of packages in a category

5 years agoCustom draw popup menus in ListView control
Jon Turney [Wed, 7 Dec 2016 19:52:58 +0000 (19:52 +0000)]
Custom draw popup menus in ListView control

Construct a menu containing the actions from the action list for the package
or category, and if one is selected, apply it.

This lets us remove packagemeta::set_action() which implements the strange
UX of cycling around actions without showing what the possibilities are.

This somewhat emulates a BS_SPLITBUTTON style control.  The 'popup' cell has
a visual hint that clicking on it opens a menu (a 'combox scrollbar'), and
the popup menu is located at the position of the click.

v2:
Factor out popup_menu, for future use by keyboard accelerators

5 years agoAdd methods for listing possible actions on, and applying one to, a package
Jon Turney [Thu, 8 Dec 2016 17:57:59 +0000 (17:57 +0000)]
Add methods for listing possible actions on, and applying one to, a package

The 'action id' is a value of the _actions enum, if positive, otherwise it's
absolute value is a 0-based index into the 'versions' collection to identify
a specific version to install.

v2:
Fix select_action() to consider deftrust

v3:
Fix select_action() for keep

v4:
Update for removed 'using namespace std'

5 years agoCustom draw checkboxes in ListView control
Jon Turney [Wed, 7 Dec 2016 16:17:12 +0000 (16:17 +0000)]
Custom draw checkboxes in ListView control

Future work: What does this look like when a theme is in used? Does the row
size need to be slightly adjusted to ensure it accomodates checkbox height?

v2:
erase to background colour before drawing checkbox

5 years agoUse a ListView common control rather than a hand-built grid
Jon Turney [Wed, 7 Dec 2016 14:09:35 +0000 (14:09 +0000)]
Use a ListView common control rather than a hand-built grid

Each line is implemented by an object of a subclass of ListViewLine, either
PickPackageLine, or (in catgeory view) PickCategoryLine

v2:
Defer constructing category tree until packagedb is available
Also handle an empty category tree
Remove unused bitmaps
Scoping of strings returned to LVN_GETDISPINFO
Avoid doubled 'all' category
Update some number of lines, rather than just the current one

v3:
Speed up calculating column widths, by caching the DC used
Don't bother recalculating column widths when obsolete packages are
shown/hidden, just allow for obsolete packages always (which makes hardly
any difference)
Don't bother calculating column widths separately for category view since
they are now always the same.

v4:
Store current category action in CategoryTree
Recurse category action onto packages

This slightly changes the behaviour: previously, a category action only
effected packages which matched the name search filter.  Now all packages in
contained by the category are effected.

v5:
When updating, turn off redraw before emptying listview
Make headers a parameter to init
Don't leak contents
Only resize columns once
Remove ListView OnMessage as it has nothing to do
Never use a column width less than minimum
Use LVS_SINGLESEL
Factor out string cache for re-use
Preserve focused row over ListView::setContents()

5 years agoAdd OnNotify virtual function to class Window for WM_NOTIFY notifications
Jon Turney [Fri, 16 Sep 2016 18:23:26 +0000 (19:23 +0100)]
Add OnNotify virtual function to class Window for WM_NOTIFY notifications

Add OnNotify virtual function to class Window for WM_NOTIFY notifications
Note that the result is returned via DWLP_MSGRESULT

5 years agoChange packagemeta::_actions to an enum
Jon Turney [Sun, 15 Jul 2018 17:02:08 +0000 (18:02 +0100)]
Change packagemeta::_actions to an enum

5 years agoAdd zstd package to .appveyor.yml
Jon Turney [Sat, 13 Oct 2018 16:16:40 +0000 (17:16 +0100)]
Add zstd package to .appveyor.yml

Reformat so we can escape newlines to avoid an absurdly long line

5 years agoAdd zstd packages to build instructions
Jon Turney [Sat, 13 Oct 2018 13:23:00 +0000 (14:23 +0100)]
Add zstd packages to build instructions

Also adjust for 'if building from git' is the only way, since we don't make
source releases.

5 years agoAdd support for ZStandard compression
Achim Gratz [Sun, 2 Sep 2018 16:41:24 +0000 (18:41 +0200)]
Add support for ZStandard compression

Add support for ZStandard compression for packages and .ini files

5 years agoRemove misleading copy&paste comments
Achim Gratz [Wed, 10 Oct 2018 17:44:56 +0000 (19:44 +0200)]
Remove misleading copy&paste comments

5 years agoAvoid stringop-overflow warning with gcc8
Jon Turney [Sun, 7 Oct 2018 21:41:06 +0000 (22:41 +0100)]
Avoid stringop-overflow warning with gcc8

desktop.cc: In function 'void start_menu(const string&, const string&, const string&, const string&)':
desktop.cc:110:11: error: 'char* strncat(char*, const char*, size_t)' specified bound 260 equals destination size [-Werror=stringop-overflow=]

I think strlcat() was meant here, which MinGW doesn't have.  In it's
absence, open-code it's equivalent.

(SHGetSpecialFolderLocation() returns a pathname of length at most MAX_PATH,
and make_link() is limited to accepting a pathname of length MAX_PATH, so we
want to append our folder name, while truncating the result to MAX_PATH.)

6 years agoexcise "using namespace std;" and explicitly use a "std::" prefix throughout instead
Achim Gratz [Sun, 2 Sep 2018 16:40:33 +0000 (18:40 +0200)]
excise "using namespace std;" and explicitly use a "std::" prefix throughout instead

6 years agoAvoid potential null deref in check_for_cached()
Jon Turney [Thu, 4 Oct 2018 18:07:14 +0000 (19:07 +0100)]
Avoid potential null deref in check_for_cached()

Packages for which we don't know a filename can't possibly be cached.

See https://cygwin.com/ml/cygwin/2018-10/msg00033.html

6 years agoAllow host machine to be specified to bootstrap
Jon Turney [Thu, 4 Oct 2018 17:26:55 +0000 (18:26 +0100)]
Allow host machine to be specified to bootstrap

Allow host machine to be specified to bootstrap, rather than it picking the
first one it finds a compiler for

6 years agoImprove libgcrypt detection
Jon Turney [Thu, 4 Oct 2018 13:01:50 +0000 (14:01 +0100)]
Improve libgcrypt detection

Set ACLOCAL_PATH so libgcrypt.m4 from cross-package is found, if it is the
only one installed.

Accomodate older libgcrypt.m4, which doesn't check SYSROOT

6 years agoUse pkg-config for dependency checking where possible
Jon Turney [Wed, 1 Nov 2017 13:56:26 +0000 (13:56 +0000)]
Use pkg-config for dependency checking where possible

Modernise depedency checking and use pkg-config where possible

6 years agoFix message spam when package vendor is something other than "cygwin"
Achim Gratz [Tue, 31 Jul 2018 19:29:02 +0000 (21:29 +0200)]
Fix message spam when package vendor is something other than "cygwin"

Installed packages are getting coerced to vendor "cygwin", so there will be
warnings if the vendor string of the single repo is something other than
that.

6 years agoRemove unused IDI_SPIN
Jon Turney [Wed, 18 Jul 2018 12:01:47 +0000 (13:01 +0100)]
Remove unused IDI_SPIN

Added in 713bbe5f, but never actually used

6 years agoRemove unused choose-rtarrow.bmp
Jon Turney [Mon, 16 Jul 2018 11:27:15 +0000 (12:27 +0100)]
Remove unused choose-rtarrow.bmp

Usused since replaced by tree-plus.bmp/tree-minus.bmp in 82306ac2

6 years agoProperly identify Win32 systems which support IsWow64Process2()
Jon Turney [Sat, 28 Jul 2018 22:57:17 +0000 (23:57 +0100)]
Properly identify Win32 systems which support IsWow64Process2()

Properly identify Win32 systems which support IsWow64Process2() (Windows 10
version 1511 (TH2) or later) in the default user-agent string.

6 years agoTeach bitness reporting in user-agent string about WoW64 on ARM64 release_2.893
Jon Turney [Tue, 24 Jul 2018 21:18:51 +0000 (22:18 +0100)]
Teach bitness reporting in user-agent string about WoW64 on ARM64

6 years agoRemove uninitialized NetIO::ftp_auth flag release_2.892
Jon Turney [Sat, 14 Jul 2018 15:48:07 +0000 (16:48 +0100)]
Remove uninitialized NetIO::ftp_auth flag

This appears to be left over since f5d45c3b.

NetIO::get_ftp_auth() doesn't appear to be used at all, but perhaps should
by the NetIO_IE5 constructor for FTP auth.

6 years agoInitialize file_size in NetIO constructor
Jon Turney [Sat, 14 Jul 2018 15:46:57 +0000 (16:46 +0100)]
Initialize file_size in NetIO constructor

At the moment, this is not initialized anywhere.  If it's value happens to
be greater than zero, that will be used as the size to report download
progress against.

6 years agoDon't write dependency problems to log with CRLF line terminators
Jon Turney [Thu, 22 Mar 2018 21:34:51 +0000 (21:34 +0000)]
Don't write dependency problems to log with CRLF line terminators

Only transform line endings in the dependency problems string used in a
Windows dialog text box, not in what's written to the log as well.

https://cygwin.com/ml/cygwin/2018-03/msg00266.html

6 years agoKeep track of all known sites for a given version of a package
Jon Turney [Mon, 9 Jul 2018 18:15:10 +0000 (19:15 +0100)]
Keep track of all known sites for a given version of a package

When adding a packageversion, extend it's packagesource::sites vector to
include the sites from any similar packageversions previously processed.

Also remove those packageversions from the libsolv pool so that libsolv will
always find the one that lists all the sites.

This is needed for:

- Correct handling of local installs where required packages are spread
between cache directories for more than one mirror

- Correctly falling back to a second site when multiple mirrors are used and
a problem occurs connecting to the first mirror tried.

6 years agoAdd Vendor() accessor method to SolvableVersion
Jon Turney [Sun, 8 Jul 2018 15:26:45 +0000 (16:26 +0100)]
Add Vendor() accessor method to SolvableVersion

6 years agoInternalize the libsolv repo attribute data after each setup.ini
Ken Brown [Sat, 17 Mar 2018 14:59:54 +0000 (10:59 -0400)]
Internalize the libsolv repo attribute data after each setup.ini

Call SolverPool::internalize() in the IniDBBuilderPackage destructor. This
makes attribute data from all previously processed setup.ini files available
when the next setup.ini is being processed.

Remove the now unneeded call to SolverPool::internalize() at the beginning
of packagedb::read().

6 years agoPropagate exit code of elevated process
Jon Turney [Sat, 7 Jul 2018 08:09:02 +0000 (09:09 +0100)]
Propagate exit code of elevated process

Propagate the exit code of elevated process, when --wait is used.

This addresses part of the problem about exit code noted in [1], although we
also need to audit that a non-zero exit code is reported in all error
situations.

[1] https://cygwin.com/ml/cygwin/2018-07/msg00020.html

Also report if starting the elevated child process failed.

6 years agoIf setup-minimum-version: was checked, don't check setup-version:
Jon Turney [Fri, 6 Jul 2018 16:45:42 +0000 (17:45 +0100)]
If setup-minimum-version: was checked, don't check setup-version:

Don't check setup-version: to warn about potential setup.ini parsing
problems if a setup-minimum-version: is specified.

6 years agoAdd --no-version-check option
Ken Brown [Thu, 5 Jul 2018 15:22:20 +0000 (11:22 -0400)]
Add --no-version-check option

This suppresses the warning that a newer version of setup is available.

This is intended to be used by shortcuts and scripts that run setup in a
'setup' package.

This would also suppress any future auto-update feature.

6 years agoFix SolvableVersion::deplist() to handle version-relations correctly
Jon Turney [Fri, 6 Jul 2018 16:16:16 +0000 (17:16 +0100)]
Fix SolvableVersion::deplist() to handle version-relations correctly

This was using completely the wrong Id for the version-relation, so it was
always returning unversioned dependencies

6 years agoFinish providing support for provides: and conflicts:
Ken Brown [Wed, 21 Mar 2018 19:38:07 +0000 (15:38 -0400)]
Finish providing support for provides: and conflicts:

Introduce member functions SolvableVersion::provides() and
SolvableVersion::conflicts().  This enables packagedb::read() to access
provides and conflicts lists from setup.ini.

6 years agoREADME: Put marker for footnote about copr next to the correct package
Jon Turney [Mon, 18 Jun 2018 17:19:43 +0000 (18:19 +0100)]
README: Put marker for footnote about copr next to the correct package

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
6 years agonetio.cc: fix a bug in string handling
Corinna Vinschen [Mon, 18 Jun 2018 17:16:59 +0000 (19:16 +0200)]
netio.cc: fix a bug in string handling

commit ed6137e5f94f45e50a12994aeae310278b2bf758 back in 2003(!)
introduced a bug in creating an empty password string which,
embarrassingly, only now has been catched by gcc.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoreplace http links with official https URLs
Corinna Vinschen [Mon, 18 Jun 2018 15:36:39 +0000 (17:36 +0200)]
replace http links with official https URLs

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
6 years agoFix detection of automatically added packages
Ken Brown [Thu, 7 Jun 2018 17:37:24 +0000 (13:37 -0400)]
Fix detection of automatically added packages

In the "confirm" dialog, report a package as automatically added for install
if the version being installed is different from the version requested by
the user.  This can happen if the global update mode is "Keep" but a package
needs to be updated because of a versioned dependency.

6 years agoImprove the preparation of the package database
Ken Brown [Thu, 7 Jun 2018 17:37:23 +0000 (13:37 -0400)]
Improve the preparation of the package database

Introduce a new function packagedb::noChanges() to set the database to a "no
changes requested" state.  Call it the first time the chooser page is
activated, before calling ChooserPage::applyCommandLinePackageSelection().

Also use it to simplify the code in two places.

Remove code from ChooserPage::changeTrust() that was making changes to the
database after ChooserPage::applyCommandLinePackageSelection() had already
been called.

6 years agoAllow command-line uninstallation of specific orphaned packages
Ken Brown [Tue, 27 Mar 2018 17:56:27 +0000 (13:56 -0400)]
Allow command-line uninstallation of specific orphaned packages

Also change the implementation of the "--delete-orphans" option to use
the same definition of "orphaned" that's used elsewhere in the code.

6 years agoMake sure that the IniDBBuilderPackage destructor is called when needed
Ken Brown [Sat, 17 Mar 2018 14:59:53 +0000 (10:59 -0400)]
Make sure that the IniDBBuilderPackage destructor is called when needed

The IniDBBuilderPackage destructor contains code that is intended to be run
after each setup.ini file is processed.  But the IniDBBuilderPackage
variables in do_local_ini() and do_remote_ini were declared outside the loop
that processed the files.  Move the declaration inside the loop so that the
destructor is called after each iteration.

6 years agoHandle test-only packages better
Jon Turney [Wed, 6 Jun 2018 18:57:56 +0000 (19:57 +0100)]
Handle test-only packages better

Don't create a current version with an empty version string when parsing a
package which doesn't have a current version.

6 years agoSort the packages listed in the "confirm" dialog
Ken Brown [Sun, 18 Mar 2018 16:31:37 +0000 (12:31 -0400)]
Sort the packages listed in the "confirm" dialog

6 years agoGive a fatal error on a checksum failure during install
Ken Brown [Wed, 21 Mar 2018 18:03:00 +0000 (14:03 -0400)]
Give a fatal error on a checksum failure during install

This only affects local installs, where the hash of an archive is not
checked until we reach do_install_thread().  At this point it seems
too late to recover safely.

6 years agoLink with -lws2_32 again
Yaakov Selkowitz [Tue, 20 Mar 2018 21:42:19 +0000 (16:42 -0500)]
Link with -lws2_32 again

libgpg-error 1.28 includes new APIs which use socket functions, which
on Win32 are provided by WinSock2.

https://cygwin.com/ml/cygwin/2018-03/msg00306.html

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
6 years agoMigrate configured connection type from the removed 'direct(legacy)' to 'direct' release_2.891
Jon Turney [Thu, 15 Mar 2018 22:13:05 +0000 (22:13 +0000)]
Migrate configured connection type from the removed 'direct(legacy)' to 'direct'

6 years agoMake SolvableVersion::accessible() useful for local installs release_2.890
Ken Brown [Sun, 11 Mar 2018 14:43:06 +0000 (10:43 -0400)]
Make SolvableVersion::accessible() useful for local installs

For local installs, we need SolvableVersion::accessible() indicate whether
or not there is an archive available in the local cache.

This is used in packagemeta::set_action() to prevent the chooser from
offering unavailable versions for re-installation.

6 years agoRemove packages not found by scan from solver
Jon Turney [Wed, 14 Mar 2018 14:52:57 +0000 (14:52 +0000)]
Remove packages not found by scan from solver

Remove not-installed packages not found by scan from solver, as well as from
packagemeta, to avoid solutions including them from being proposed.

6 years agoAdd a --version option
Jon Turney [Wed, 7 Mar 2018 14:47:45 +0000 (14:47 +0000)]
Add a --version option

Add a --version option, and make some related tweaks to output

6 years agoAdd conflicts: support
Jon Turney [Wed, 7 Mar 2018 15:28:12 +0000 (15:28 +0000)]
Add conflicts: support

6 years agoAdd provides: support
Jon Turney [Wed, 7 Mar 2018 15:20:56 +0000 (15:20 +0000)]
Add provides: support

6 years agoAlways give the fake root category the name 'All'
Jon Turney [Tue, 6 Mar 2018 16:17:30 +0000 (16:17 +0000)]
Always give the fake root category the name 'All'

After we rearranged things in 0c539f7f, it's now too early to tell if we
have any packages or not.

The only thing about this category that is ever used is it's name, so we
don't actually need to use the real 'All' category here.

Saying 'No packages found' was never particularly helpful here, so just use
a fake category with the fixed name 'All'.

6 years agoFix packagemeta::ScanDownloadedFiles
Jon Turney [Tue, 6 Mar 2018 14:56:40 +0000 (14:56 +0000)]
Fix packagemeta::ScanDownloadedFiles

packagemeta::scan clears the site list if the package was not found, and
packagemeta::ScanDownloadedFiles uses packageversion::accessible() to check
that.

Instead communicate via a return value

v2:
empty packages were always inaccessible, even though we returned early from
scan() without clearing the sites list, so return false in that case

6 years agoUpdate .gitignore
Jon Turney [Tue, 6 Mar 2018 15:48:03 +0000 (15:48 +0000)]
Update .gitignore

6 years agoAdd setup-minimum-version: to setup.ini
Jon Turney [Fri, 19 Jan 2018 15:36:03 +0000 (15:36 +0000)]
Add setup-minimum-version: to setup.ini

This allows setup.ini to require a certain setup version, rather than advise
a newer version when one is available.

Unfortunately, versions of setup prior to this one don't implement this, but
at least we have this going forward.

When we want to start using this, we can break backwards compatibility with
even older setup in a less clean way, simply by using setup.ini grammar that
they can't parse.

6 years agoImprove file:// URL handling
SZAVAI Gyula [Wed, 28 Feb 2018 11:51:24 +0000 (12:51 +0100)]
Improve file:// URL handling

As a repo URL, we're accepting:

* raw windows paths (with both \ and /), e.g.

  c:\cygwin repo
  \\machine\share\cygwin repo

* proper file: protocol URLs, e.g.

  file:///c:/cygwin%20repo
  file://machine/share/cygwin%20repo

Most non-standard URLs accepted by the old code should work, too.
Paths longer than 260 characters are not supported anymore.

6 years agoNetIO: Remove unused URL parsing code
SZAVAI Gyula [Wed, 28 Feb 2018 11:51:23 +0000 (12:51 +0100)]
NetIO: Remove unused URL parsing code

6 years agoRemove simpsock.{cc,h} and drop linkage with ws2_32
Jon Turney [Sun, 28 Jan 2018 19:43:39 +0000 (19:43 +0000)]
Remove simpsock.{cc,h} and drop linkage with ws2_32

6 years agoRemove NetIO_HTTP
SZAVAI Gyula [Sun, 28 Jan 2018 19:36:49 +0000 (19:36 +0000)]
Remove NetIO_HTTP

6 years agoAdd Proxy class to encapsulate proxy configuration for NetIO_IE5
SZAVAI Gyula [Fri, 26 Jan 2018 16:56:35 +0000 (17:56 +0100)]
Add Proxy class to encapsulate proxy configuration for NetIO_IE5

Drop Proxy::bypass method (jturney)

6 years agoRemove NetIO_File
SZAVAI Gyula [Sun, 28 Jan 2018 19:20:53 +0000 (19:20 +0000)]
Remove NetIO_File

Convert raw paths into file:// form URLs so WinInet can handle them

This maybe changes the set of malformed file:// URLs we handle (which is ok,
although it would be nice to know the details),

6 years agoRename IDC_NET_IE5 to IDC_NET_PRECONFIG
SZAVAI Gyula [Fri, 26 Jan 2018 16:56:33 +0000 (17:56 +0100)]
Rename IDC_NET_IE5 to IDC_NET_PRECONFIG

6 years agoRemove direct(legacy) connection type
SZAVAI Gyula [Sun, 28 Jan 2018 19:06:49 +0000 (19:06 +0000)]
Remove direct(legacy) connection type

If setup.rc contains net-method:Legacy, it will be silently converted to
net-method:IE

6 years agoAvoid a crash if we try to uninstall an unknown package release_2.889
Jon Turney [Wed, 21 Feb 2018 21:31:20 +0000 (21:31 +0000)]
Avoid a crash if we try to uninstall an unknown package

This can happen if the solver decides it wants to uninstall 'base'.

6 years agoA package provides what it obsoletes, as well as itself.
Jon Turney [Wed, 21 Feb 2018 21:29:20 +0000 (21:29 +0000)]
A package provides what it obsoletes, as well as itself.

This is needed to allow a package which obsoletes an installed package to
get installed.

Will need to revisit this when we implement explicit provides: in setup.ini.

6 years agoDon't crash in confirm page when installing source packages release_2.888
Jon Turney [Tue, 13 Feb 2018 22:32:06 +0000 (22:32 +0000)]
Don't crash in confirm page when installing source packages

6 years agoFix a spelling mistake in a tooltip
Jon Turney [Wed, 7 Feb 2018 12:04:13 +0000 (12:04 +0000)]
Fix a spelling mistake in a tooltip

6 years agoAdd .appyveyor.yml release_2.887
Jon Turney [Thu, 1 Feb 2018 13:20:42 +0000 (13:20 +0000)]
Add .appyveyor.yml

6 years agoMake sure we process the last version description in setup.ini
Jon Turney [Fri, 2 Feb 2018 19:41:58 +0000 (19:41 +0000)]
Make sure we process the last version description in setup.ini

6 years agoAllow depends: to be empty release_2.886
Jon Turney [Wed, 31 Jan 2018 14:21:09 +0000 (14:21 +0000)]
Allow depends: to be empty

If a version section has no depends:, we'll end up using any previous
requires: or depends: seen.

This isn't quite right, and we should only use the requires: (if any) if a
particular version section has no depends:

For the moment, just allow an empty depends:, so a version section can be
explicitly marked as having no depends:

6 years agoApply default problem solutions in unattended mode
Jon Turney [Tue, 30 Jan 2018 21:14:07 +0000 (21:14 +0000)]
Apply default problem solutions in unattended mode

Also log problems
Also make --include-source work in unattended mode

6 years agoMerge branch 'topic/libsolv' release_2.885
Jon Turney [Sun, 28 Jan 2018 15:12:03 +0000 (15:12 +0000)]
Merge branch 'topic/libsolv'

6 years agoAdd a new page to let the user review and confirm actions topic/libsolv
Jon Turney [Tue, 23 Jan 2018 17:50:13 +0000 (17:50 +0000)]
Add a new page to let the user review and confirm actions

Add a new page to let the user review and confirm actions, after
dependencies have been added and problems solved.

Ideally, this would re-use the picker-page grid to present these actions,
but for the moment just write it as text (as we did before in the prereq
page) (This is still a slight improvement as it shows all actions for
review, not just the ones added by the solver)

6 years agoAdd handling for 'replace-versions:' in setup.ini
Jon Turney [Mon, 22 Jan 2018 22:33:54 +0000 (22:33 +0000)]
Add handling for 'replace-versions:' in setup.ini

Sometimes we make mistakes and release versions which are broken or have a
version which is wildly incorrect.  We can remove those versions from future
download, but they can linger indefinitely in installs (until a distupgrade
is done), as there is a higher version already installed.

Allow setup.ini to contain a per-package 'replace-versions:' header, which
identifies any versions which should be forcibly dist-upgraded (i.e.
downgraded to the best version in setup.ini).

(It's not possible to just instruct the solver to disfavour these specific
versions, as that's not implemented, see libsolv issue #170)

6 years agoAdd 'depends2:' as an alternative to 'depends':
Jon Turney [Fri, 19 Jan 2018 19:04:38 +0000 (19:04 +0000)]
Add 'depends2:' as an alternative to 'depends':

Prior versions of setup recognize 'depends:', but don't handle it properly:

(i) they always use the dependencies of the current version, not the version
actually being installed

(ii) they cannot parse any version-relation containing a relation and
version identifier (i.e. they can only handle a bare package name)

Thus, there is no safe way to start using 'depends:' lines without getting
undesirable behaviour from old versions of setup

(In case (i), it may install incorrect dependencies if a non-current version
is installed, potentially resulting in a broken package.

In case (ii), it will fail to parse the setup.ini with an error.)

Add 'depends2:', so calm can supply per-version dependencies in a form
useful to setup with libsolv-based dependency solving, without effecting
older versions of setup.

6 years agoPreserve reinstall tasks when going back from dependency problem page.
Jon Turney [Mon, 15 Jan 2018 16:27:39 +0000 (16:27 +0000)]
Preserve reinstall tasks when going back from dependency problem page.

6 years agoClarify the unsolved-problems warning
Ken Brown [Sat, 13 Jan 2018 23:50:14 +0000 (18:50 -0500)]
Clarify the unsolved-problems warning

If the user unchecks the 'Accept default solutions' box and selects
'Next', don't imply that choosing a non-default solution would break
their system.

6 years agoRemove all trailing ".any" from package names in problem report
Jon Turney [Sat, 13 Jan 2018 14:00:01 +0000 (14:00 +0000)]
Remove all trailing ".any" from package names in problem report

6 years agoApply default solution to dependency problems
Jon Turney [Wed, 6 Dec 2017 17:52:45 +0000 (17:52 +0000)]
Apply default solution to dependency problems

Mark the default solution in the problem report

Refactor of SolverSolution::update() so we can apply the default
solution(s).

Also:

Break out logging of the task list, so we can show it in the "dependency
problems exists, but don't use the default solution, just do what I ask"
case.

Break out 'include-source' process, so it can have effect in the case where
dependency problems exist.

v2:
Actually re-solve after adjusting the task list with default solutions.

Use the last solution as the default solution.  The solver sorts the
solutions, and I think the last one will normally be the one which removes
the problematic task from the task list

6 years agoMore crash avoidance in SolvableVersion member functions
Jon Turney [Mon, 6 Nov 2017 18:02:08 +0000 (18:02 +0000)]
More crash avoidance in SolvableVersion member functions

The following call-stack means we end up calling SolvableVersion methods
before packagedb::prep(), i.e. before attributes have been internalized, so
their values aren't available.

PickView::init_headers
PickView::refresh
PickView::init
ChooserPage::createListview
ChooserPage::OnInit

We call PickView::refresh again after we've computed the initial solution,
so the columns always end up with the correct width.

6 years agoCorrectly order preparing packagedb for chooser
Jon Turney [Sat, 4 Nov 2017 18:01:49 +0000 (18:01 +0000)]
Correctly order preparing packagedb for chooser

Do packagedb::prep() in ChooserPage::OnActivate(), as doing it in OnInit()
is wrong, as that only gets called once (but lazily).

Make packagedb::prep() idempotent after packagedb::init(), so it doesn't do
it's work again, if we come back to chooser from a later page.

Re-arrange applying command line package selection, and determining the
initial solution, which should only happen once, but after packagedb::prep()

6 years agoEnsure packagedb and underlying solver pool is empty before we read setup.ini
Jon Turney [Thu, 2 Nov 2017 14:15:04 +0000 (14:15 +0000)]
Ensure packagedb and underlying solver pool is empty before we read setup.ini

We need to make sure the packagedb is empty if we step backwards to here.

v2:
Also clear solver stored in SolverSolution, which holds a pool pointer

6 years agoRemove the function filemanip.cc:base()
Ken Brown [Fri, 27 Oct 2017 18:47:21 +0000 (14:47 -0400)]
Remove the function filemanip.cc:base()

This was called only on plain filenames, not full pathnames, so it was not
needed.  Moreover, it wasn't correctly handling filenames containing colons.

6 years agoAvoid clobbering installed.db when no setup.ini is found
Ken Brown [Sat, 28 Oct 2017 17:46:19 +0000 (13:46 -0400)]
Avoid clobbering installed.db when no setup.ini is found

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.
Move the calls to packagedb::read and other packagedb functions from
do_ini_thread to ChooserPage::OnInit.

This page took 0.069055 seconds and 5 git commands to generate.