]> cygwin.com Git - cygwin-apps/setup.git/log
cygwin-apps/setup.git
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.

6 years agoDon't override a Skip selection
Ken Brown [Fri, 20 Oct 2017 10:59:54 +0000 (06:59 -0400)]
Don't override a Skip selection

Introduce SolverTasks::taskSkip, and generate it when the user chooses
to Skip a package that the solver wants to install.  Implement it by
sending a SOLVER_LOCK command on the package name.

6 years agoFix the functionality of taskKeep
Ken Brown [Thu, 19 Oct 2017 18:44:45 +0000 (14:44 -0400)]
Fix the functionality of taskKeep

A taskKeep is generated whenever the user wants to keep an installed
version that's different from the default_version, where the latter is
whatever the solver has chosen.  We need to make sure that
default_version is set appropriately wherever it is needed.

6 years agoExtend the SolvableVersion member functions to the empty package
Ken Brown [Tue, 17 Oct 2017 12:12:48 +0000 (08:12 -0400)]
Extend the SolvableVersion member functions to the empty package

Currently some of these functions cause crashes when the package is
empty because the libsolv function pool_id2solvable unconditionally
dereferences its first argument ('pool').

6 years agoTake command line package/category install/uninstall into account
Jon Turney [Mon, 9 Oct 2017 17:10:52 +0000 (18:10 +0100)]
Take command line package/category install/uninstall into account

Rather than overwriting the packagedb changes made from processing command
line options in ChooserPage::OnInit(), use the 'initial' flag to
changeTrust() in createListview() to take them into consideration.

--upgrade-also and --force-current are now handled directly.

6 years agoChange UI to add 'Sync' choice and change 'Test' to checkbox
Jon Turney [Mon, 9 Oct 2017 14:37:06 +0000 (15:37 +0100)]
Change UI to add 'Sync' choice and change 'Test' to checkbox

Set the initial update mode in UI correctly:
- 'Sync', if --force-current option is used
- 'Keep', if packages are selected on command line without --upgrade-also
- 'Current', otherwise

Add mapping of 'Sync' to SolverSolution::updateForce to mapping of UI
update mode to solver update mode.

6 years agoAdd distupgrade support to solver
Jon Turney [Mon, 9 Oct 2017 14:05:22 +0000 (15:05 +0100)]
Add distupgrade support to solver

Also, ignore change transactions (these are usually vendorchange as we
forget the vendor for installed packages)

Also, don't put unknown type transactions into the transaction list

6 years agoNon-existent source packages aren't accessible for installation
Jon Turney [Sat, 30 Sep 2017 22:23:29 +0000 (23:23 +0100)]
Non-existent source packages aren't accessible for installation

Prevent the src checkbox appearing for source packages which don't exist

6 years agoUse solver for initial pick list when upgrading
Jon Turney [Fri, 29 Sep 2017 13:46:46 +0000 (14:46 +0100)]
Use solver for initial pick list when upgrading

Use the solver to determine initial pick list for Curr or Test, rather than
directly picking packages. Thus the solver's initial solution in the pending
view should be the first thing the user sees.

Note: Keep is magical, and the package db pick list gets reset by
ChooserPage::keepClicked(), rather than going through changeTrust().

We don't unify these two paths, because the trust level passed to
changeTrust() gets recorded in PickView::defTrust and used by the line
picker in some mysterious way, and seems to only be expected to be
TRUST_CURR or TRUST_TEST.  There's probably a subtle bug here, in that the
line picker might behave differently depending on if Curr or Test was
selected before Keep.

Drop passing upgrade flag to solver run after the user has made their
selections: the picker selection now reflects what the user is asking for.

6 years agoHandle 'Source:' lines in setup.ini
Jon Turney [Fri, 26 May 2017 13:30:40 +0000 (14:30 +0100)]
Handle 'Source:' lines in setup.ini

This is somewhat awkward:

Storing the source package by Id rather than by name is looking a bit like a
premature optimization, but being to able to refer to source packages by Id
is very handy.

If the src pkg isn't seen until after the pkg, we don't know what it's Id
will be.  So we have to go back and fixup the Ids after we've seen all
packages.

6 years agoAllow user to refuse the default problem solutions
Ken Brown [Sat, 16 Sep 2017 15:39:40 +0000 (11:39 -0400)]
Allow user to refuse the default problem solutions

Add new method SolverSolution::db2trans to change the solver's
transaction list to reflect the package database.  Use it if the user
refuses the default problem solutions.  Reinstate warning that this
could cause breakage.

Remove PrereqPage::OnMessageCmd, which is no longer needed (and which
disallows clicking Next if the "Accept default problem solutions" box
is unchecked).

v2:
Tweak MessageBox text

6 years agoAdd a ficitious "base" package that requires all Base packages
Ken Brown [Sat, 16 Sep 2017 15:28:37 +0000 (11:28 -0400)]
Add a ficitious "base" package that requires all Base packages

Modify the solver's problem report so that it refers to "Base
packages" rather than the "base" package.

6 years agoAdd new member function SolverSolution::trans2db
Ken Brown [Fri, 8 Sep 2017 15:16:24 +0000 (11:16 -0400)]
Add new member function SolverSolution::trans2db

This resets the package database to reflect the solver's transaction
list.  Call this if the user clicks Back on the Prerequisite page, to
allow reviewing and making changes before accepting the solver's
solution.

v2:
Drop text about seeing default solutions.  They aren't applied as we want
the user to choose there own solution.

6 years agoFactor out SolverTasks::setTasks()
Ken Brown [Sat, 16 Sep 2017 14:50:37 +0000 (10:50 -0400)]
Factor out SolverTasks::setTasks()

Move the code from prereq.cc that makes a solver task list from packagedb
state into a new function SolverTasks::setTasks.

6 years agoFix 'SolverTasks::taskList' typedef
Ken Brown [Mon, 4 Sep 2017 20:44:31 +0000 (16:44 -0400)]
Fix 'SolverTasks::taskList' typedef

Remove the '&'.  This was causing source installs to all refer to the
same package, due to the call to q.add(pkg->desired.sourcePackage(),
SolverTasks::taskInstall) in PrereqChecker::isMet.

6 years agoDownload only the packages being installed
Ken Brown [Sat, 2 Sep 2017 18:27:52 +0000 (14:27 -0400)]
Download only the packages being installed

6 years agoDon't create an "_installed_test_" repo
Ken Brown [Wed, 6 Sep 2017 14:44:27 +0000 (10:44 -0400)]
Don't create an "_installed_test_" repo

This prevents libsolv from knowing that an installed test release is
installed, since pool->installed is "_installed".

6 years agoAllow the installation of test packages without setting "Test" globally
Ken Brown [Wed, 6 Sep 2017 02:22:23 +0000 (22:22 -0400)]
Allow the installation of test packages without setting "Test" globally

Instead of disabling test repos when "Test" is not selected, just give
them lower priority than ordinary repos.

v2:
Give test repos normal, rather than high priority, when selected so we don't
prefer a test version over a higher non-test version.

6 years agoAsk solver to check dependencies of installed packages
Ken Brown [Sat, 16 Sep 2017 14:06:26 +0000 (10:06 -0400)]
Ask solver to check dependencies of installed packages

6 years agoImprove the reading of installed.db
Ken Brown [Sat, 2 Sep 2017 16:37:29 +0000 (12:37 -0400)]
Improve the reading of installed.db

When creating a packageversion for a package listed in installed.db,
use the information for the installed version rather than the
"current" version.  Add a new function packagedb::findBinaryVersion to
help with this.

Get as much information about an installed information as possible
from the prior reading of setup.ini.

Improve detection of installed test releases.  An installed test
release might not appear in setup.ini because it is no longer
available (e.g., it might have been replaced by a newer test release).
Detect this by comparing its version to the current version.

6 years agoAdd a PackageSpecification() constructor which takes a package name and version
Jon Turney [Fri, 26 May 2017 13:30:40 +0000 (14:30 +0100)]
Add a PackageSpecification() constructor which takes a package name and version

6 years agoAdd SolvableVersion::obsoletes()
Ken Brown [Sat, 16 Sep 2017 11:19:55 +0000 (07:19 -0400)]
Add SolvableVersion::obsoletes()

v2: Add SolvableVersion::obsoletes(), factor out key-to-deplist code from
SolvableVersion::depends() as SolvableVersion::deplist()

6 years agoFix setup.ini parsing
Ken Brown [Sat, 2 Sep 2017 15:57:25 +0000 (11:57 -0400)]
Fix setup.ini parsing

The IniDBBuilderPackage::process function wasn't fully resetting the
addPackageData for a new version of a package.  This caused SHA512
failures among other things.

6 years agoDon't override a Keep selection
Ken Brown [Wed, 30 Aug 2017 21:36:13 +0000 (17:36 -0400)]
Don't override a Keep selection

(Lock kept packages which would otherwise get upgraded)

6 years agoAdd obsoletes: support
Jon Turney [Mon, 22 May 2017 17:04:02 +0000 (18:04 +0100)]
Add obsoletes: support

Note that we need separate depends and obsoletes nodelists

v2:
Reset "obsoletes" between packages. Also add a debugging statement. (kbrown)

6 years agoDownload/checksum/install/uninstall what transaction wants
Jon Turney [Fri, 19 May 2017 10:26:07 +0000 (11:26 +0100)]
Download/checksum/install/uninstall what transaction wants

Some of this goes rather around the houses to avoid lots of churm: In lots
of cases, we're looking up packagemeta for a given packageversion just so we
can use the pacakgemeta to access the name, which we could do via
packageversion just as easily.

We do actually need packagmeta for a couple of things: To note the package
as installed/uninstalled, and to note postinstalls scripts.

If IncludeSource is on source packages installs will have been added to the
task list in post-processing, so we don't need to handle that specially
anymore.

Source packages to be installed are kept in a separate queue as they are
installed differently to binary packages (root is /usr/src, install isn't
recorded, etc.)

v2:
Avoid use of packagemeta in install.cc, when all we use is the package name
(kbrown)

6 years agoUse solver to check for problems and produce a list of package transactions
Jon Turney [Sat, 29 Apr 2017 14:43:52 +0000 (15:43 +0100)]
Use solver to check for problems and produce a list of package transactions

Convert chooser UI selections into a SolverTaskList

Apply SolverSolution to that task list (with choice of keep, upgrade,
upgrade with test, IncludeSource) to produce a vector of SolverTransactions.
Store a solution object in packagedb

The transaction list returned by the solver is postprocessed to add
reinstall and IncludeSource actions

Very crudely present solver problems in the PrereqChecker page UI, as text.
Change tickbox to say "accept default solutions" and don't allow to preceed
unless those solutions are accepted (ideally we would have a UI to choose
solutions).  Remove warning about missing dependencies.

Also pass initial trust state to PrereqChecker

v2:
Fix comment typo (kbrown)
Tweak comment in OnActivate() (kbrown)

v3:
Drop stray \n at end of report() output (kbrown)

6 years agoDrop in SolvableVersion as a replacement for packageversion
Jon Turney [Sat, 29 Apr 2017 14:39:46 +0000 (15:39 +0100)]
Drop in SolvableVersion as a replacement for packageversion

6 years agoRemove packageversion class
Jon Turney [Fri, 28 Apr 2017 16:39:26 +0000 (17:39 +0100)]
Remove packageversion class

Remove packageversion, _packageversion, defaultversion classes

6 years agoRemove cygpackage class
Jon Turney [Fri, 28 Apr 2017 14:26:05 +0000 (15:26 +0100)]
Remove cygpackage class

v2:
Fix typo in bootstrap.sh (kbrown)

6 years agoChange to using a libsolv pool for storing package information
Jon Turney [Fri, 7 Apr 2017 20:52:17 +0000 (21:52 +0100)]
Change to using a libsolv pool for storing package information

Add class SolverVersion, a wrapper around a Solvable Id. The interface is
similar to class packageversion, the name change is just to make sure I've
got everything.

Place test packages into separate repos.

Expressing that curr: packages are preferred to prev: ones when that is not
the version number ordering should be done with epoch numbers.

Wire up various bits of data in packageversion to Solvable attributes,
including sourcepackage, stability, archive (packagesource) and depends.

Store sourcePackage() by the id rather than name, for much faster lookup.

SolverVersions for the same package can be ordered and compared by evr.

Factor out packagedb:addBinary() and also use it in IniDBBuilder, rather
that inlining the process of adding a package there. Add an analagous
packagedb:addSource() to do the same thing for source packages.

Change to reading installed.db after setup.ini's have been read, so we can
supplement the installed.db packages with information from setup.ini.

Make packagemeta::add_version() check for successful insertion of version.
Record the version at a stability level. The last version wins in setting
curr/test.

Use a Solver object inside packagedb

v2:
Link with libregex rather than libgnurx

Use -lregex rather than -lgnurx, as the Fedora mingw{32,63}-libgnurx
cross-packages only contain the library under that name.

(The Cygwin mingw63-{i686,x86_64}-libgnurx cross-packages have both names).

Check for libregex at configure time
(Done properly this should use PKG_CHECK_MODULES, rather than checking
for the header...)

Update build instructions

6 years agoStore package stability in class packageversion
Jon Turney [Mon, 24 Apr 2017 19:17:36 +0000 (20:17 +0100)]
Store package stability in class packageversion

6 years agoFactor out reading installed.db
Jon Turney [Sat, 20 May 2017 15:17:44 +0000 (16:17 +0100)]
Factor out reading installed.db

Rather that doing implicitly the first time a packagedb is constructed, do
it explicitly at a certain point in time that is early enough.

6 years agoOpaque how PackageDepends is stored
Jon Turney [Fri, 5 May 2017 11:36:42 +0000 (12:36 +0100)]
Opaque how PackageDepends is stored

We want to be more opaque about how the PackageDepends for a packageversion
is stored, so rather than exposing a pointer to a PackageDepends object
inside class packageversion, access it by value.

This also makes us be more explicit about set/get of package depends()

Fix some iterations to deal with depends() returning a value rather than a
pointer.

Also adjust dumpPackageDepends() appropriately

6 years agoMake any MessageBox shown by the GuiParseFeedback class modal to the progress page
Jon Turney [Sat, 20 Jan 2018 19:58:49 +0000 (19:58 +0000)]
Make any MessageBox shown by the GuiParseFeedback class modal to the progress page

6 years agoQuery the user if a corrupt local file is found
Ken Brown [Tue, 9 Jan 2018 17:04:20 +0000 (12:04 -0500)]
Query the user if a corrupt local file is found

Also reorganize package validation.

Move the size-validation code in download.cc and the hash-validation
code in install.cc into new member functions of the packagesource
class.  Add a bool member 'validated' to the class to make sure that
the checking is done only once.

Change download.cc:check_for_cached() so that it offers to delete a
corrupt package file instead of throwing an exception.  The latter
previously caused a fatal error when check_for_cached() was called
from do_download_thread and download_one.  Now we get a fatal error
only if the user chooses not to delete the file.

Also make check_for_cached() check the hash of the file in addition to
the size.  Similarly, check the hash in addition to the size after
downloading a file.

6 years agoImprove help text release_2.884
Jon Turney [Sun, 7 Jan 2018 19:46:26 +0000 (19:46 +0000)]
Improve help text

Various clarifications to option descriptions
Consistently start option descriptions with a capital letter
Add an extra line to mention download & install/download/install modes

6 years agoFix 'Keep' button marking all installed packages as 'reinstall' not 'keep'
Jon Turney [Sun, 7 Jan 2018 20:10:27 +0000 (20:10 +0000)]
Fix 'Keep' button marking all installed packages as 'reinstall' not 'keep'

Regressed by commit 4209699 'Hoist pick() up to packagemeta'

6 years agoThrow exceptions instead of exiting with error codes
Ken Brown [Tue, 19 Dec 2017 16:10:22 +0000 (11:10 -0500)]
Throw exceptions instead of exiting with error codes

There were two places in PickView.cc and one in choose.cc where setup
would silently die with an error code.  Change this so that setup now
throws exceptions.  The exceptions are caught by
TOPLEVEL_CATCH("DialogProc") in PropertyPage::DialogProc().

6 years agoUpdate displayed copyright to 2018
Jon Turney [Sun, 7 Jan 2018 19:08:36 +0000 (19:08 +0000)]
Update displayed copyright to 2018

6 years agoSplit WISHLIST out from README
Jon Turney [Mon, 11 Dec 2017 23:18:33 +0000 (23:18 +0000)]
Split WISHLIST out from README

Also remove old CHANGES file

6 years agoGive TOPLEVEL_CATCH an owner window
Ken Brown [Tue, 19 Dec 2017 00:46:36 +0000 (19:46 -0500)]
Give TOPLEVEL_CATCH an owner window

The fatal message box produced by TOPLEVEL_CATCH had a NULL owner
window.  This meant that the box could be hidden by whatever window
was previously being displayed, so that setup appeared to hang.  In
addition, the user could interact with the propsheet window while the
message box was displayed.

Fix this by giving TOPLEVEL_CATCH an "owner" parameter.  In all uses
but one (TOPLEVEL_CATCH("main")), there is a non-NULL owner available
that we can use.

6 years agoSimplify LocalDirPage::OnNext() release_2.883
Jon Turney [Sat, 4 Nov 2017 16:09:01 +0000 (16:09 +0000)]
Simplify LocalDirPage::OnNext()

Never go directly to IDD_CHOOSE from LocalDirPage::OnNext(), go to
IDD_INSTATUS with WM_APP_START_SETUP_INI_DOWNLOAD (if source ==
IDC_SOURCE_LOCALDIR), otherwise IDD_NET (which eventually leads there)

6 years agoMake do_ini() succeed if found_ini_list is empty
Jon Turney [Sat, 4 Nov 2017 15:37:58 +0000 (15:37 +0000)]
Make do_ini() succeed if found_ini_list is empty

Rather than count the number of .ini files read in do_{local,remote}_ini,
and assume success if greater than zero, actually track if an error occured.

This is a subtle change of behaviour if more than one .ini file is read:
previously all we needed was one to succeed, now we need them all to
succeed.

(Note that site_list should never be empty, and it's still an error if we
don't find an .ini file from a site, so the practical effect is to make
do_local_ini succeed with an empty found_ini_list)

6 years agoFix invalid iterator use in packagedb::removeEmptyCategories()
Jon Turney [Sun, 29 Oct 2017 17:20:51 +0000 (17:20 +0000)]
Fix invalid iterator use in packagedb::removeEmptyCategories()

6 years agoMake removeEmptyCategories() explicit, rather than a side effect of defaultTrust()
Jon Turney [Fri, 29 Sep 2017 13:18:44 +0000 (14:18 +0100)]
Make removeEmptyCategories() explicit, rather than a side effect of defaultTrust()

It's unclear that this can ever do anything.  The list of categories is
built as we see packages in those categories, so I don't know how we can
ever get an empty category.

6 years agoHoist scan() up from packageversion to packagemeta
Jon Turney [Wed, 26 Apr 2017 15:22:30 +0000 (16:22 +0100)]
Hoist scan() up from packageversion to packagemeta

6 years agoHoist uninstall up to Installer::uninstallOne()
Jon Turney [Tue, 25 Apr 2017 22:44:08 +0000 (23:44 +0100)]
Hoist uninstall up to Installer::uninstallOne()

This calls packagemeta, which applies to packageversion (which delegates
through packageversion_ to cygpackage) to return lines from the .lst.gz file
(pretending that we know it contains a file list for that specific version)
and to remove the .lst.gz file when done.

Move this all up into Installer::uninstallOne(), where it's all in the same
place as the operation it is reversing, Installer::installOne().

6 years agoHoist pick() up to packagemeta
Jon Turney [Wed, 26 Apr 2017 14:20:14 +0000 (15:20 +0100)]
Hoist pick() up to packagemeta

We are always writing packagemeta.desired.pick(bool, packagemeta).  This
kind of suggests something not quite right.

The pick flag means install/reinstall, so despite being stored per
packageversion, is only significant to download/install for the desired
version.

There's a slight wrinkle in that we want to also set/clear this flag for the
source packageversion.  We can't change this to point to packagemeta rather
than packageversion, as that may not be the same for all versions, so
instead just track this flag separately as srcpicked.

Note that there is still a complicated mapping between the state of desired
and pick and the action represented in the UI:

desired == empty, installed == desired : skip
desired == empty, installed != desired : uninstall
desired == installed, pick == true     : reinstall
desired == installed, pick == false    : keep
desired != installed, pick == true     : upgrade
desired != installed, pick == false    : invalid

v2:
Make explicit that when desired == empty, pick is false (previously this was
implict, as setting pick for defaultversion was ignored)

6 years agoHoist addScript() etc. up from packageversion to packagemeta
Jon Turney [Tue, 23 May 2017 21:19:15 +0000 (22:19 +0100)]
Hoist addScript() etc. up from packageversion to packagemeta

We're only interesting in storing scripts and later running them from the
desired version as we install it, so despite being stored per
packageversion, this is only significant for the desired version.

Hoist it up from packageversion to packagemeta.

6 years agoReset dependency list for each requires:/depends:
Jon Turney [Wed, 6 Dec 2017 19:37:38 +0000 (19:37 +0000)]
Reset dependency list for each requires:/depends:

Reset dependency list for each requires:/depends:, otherwise, they are
concatenated.

Also, drop useless dump of dependency list before we start reading it.

6 years agoFix response to enter in the chooser search textbox
Ken Brown [Tue, 5 Dec 2017 17:21:12 +0000 (12:21 -0500)]
Fix response to enter in the chooser search textbox

Make 'enter' after we've started typing into the search textbox cause the
search filter to immediately take effect.

We don't change the default control immediately on EN_SETFOCUS unless there
is already text in the search textbox, so pressing 'enter' with the focus on
the search textbox (the initial state of the dialog) without typing anything
into the search textbox moves to the next page, as previously.

Also improve a bit of debug output from ChooserPage::OnMessageCmd()

v2:
Explicitly add/remove the defpushbutton style from the "Next" button when
the default button changes

v3:
Refine behaviour so default control is changed on EN_SETFOCUS if some
search text is present.

6 years agoMake Enter in the user URL box cause ADD instead of NEXT
Ken Brown [Mon, 4 Dec 2017 15:53:55 +0000 (10:53 -0500)]
Make Enter in the user URL box cause ADD instead of NEXT

6 years agoFix a typo in filenames for upload target in Makefile
Jon Turney [Thu, 23 Nov 2017 17:52:12 +0000 (17:52 +0000)]
Fix a typo in filenames for upload target in Makefile

6 years agoRemove references to "last-extrakeys"
Ken Brown [Tue, 28 Nov 2017 13:54:37 +0000 (08:54 -0500)]
Remove references to "last-extrakeys"

Extra gpg keys used to be stored in a file /etc/setup/last-extrakeys.
These keys are now saved in the "extrakeys" user setting, but there
were still references to "last-extrakeys" in comments and in a help
string.

6 years agoChange the interpretation of '#' in setup.rc
Ken Brown [Tue, 28 Nov 2017 13:45:44 +0000 (08:45 -0500)]
Change the interpretation of '#' in setup.rc

'#' was treated as a comment character in all circumstances.  Since
saved gpg keys contain '#', this caused the "extrakeys" user setting
to get truncated.  Change this so that '#' only indicates a comment if
it's the first non-whitespace character in a line.

6 years agoFix the reading and writing of the "extrakeys" user setting
Ken Brown [Mon, 27 Nov 2017 18:14:15 +0000 (13:14 -0500)]
Fix the reading and writing of the "extrakeys" user setting

ExtraKeysSetting::keybuffer is terminated by LF rather than NUL.  So
we have to replace NUL by LF after calling
UserSettings::get("extrakeys") in the ExtraKeysSetting constructor.
Otherwise the last saved key is discarded.  Also, bufsize has to be
set appropriately before the call to count_keys(), or else all saved
keys are discarded.

Similarly, the final LF in keybuffer has to be replaced by NUL in the
ExtraKeysSetting destructor before the call to
UserSettings::set("extrakeys", keybuffer).  Otherwise we get garbage
at the end of the "extrakeys" setting in setup.rc.

6 years agosite.cc, site.h: code cleanup
Ken Brown [Fri, 24 Nov 2017 17:29:27 +0000 (12:29 -0500)]
site.cc, site.h: code cleanup

Remove site_list_type::init(), which was introduced to work around a
problem with gcc-2.95.

Add a bool member 'from_mirrors_lst' to the site_list_type class.  Use
it to distinguish mirrors listed in mirrors.lst from user-added sites.
This replaces the (undocumented) use of
site_list_type::servername.size() for this purpose.

When registerSavedSite is called on a URL that's already in
'all_site_list', add the version from 'all_site_list' to 'site_list'
rather than adding a temporary version that contains no information
other than the URL.

Similarly, if the user adds a site that was already in
'all_site_list', don't replace the existent version with the new one
(which contains only the URL).

6 years agoMake 'System Proxy Settings' the default, rather than 'Direct'
Jon Turney [Thu, 16 Nov 2017 15:50:44 +0000 (15:50 +0000)]
Make 'System Proxy Settings' the default, rather than 'Direct'

Make 'System Proxy Settings' the default, rather than 'Direct', and re-order
the network connection options so that option is first.

If you don't need a proxy, the system proxy setting should be for direct
connection, anyhow.

So, at the moment, this is just a button you're supposed to know you need to
press to make it work, when you are behind a proxy.

This setting is persisted (as 'net-method'), so this change only effects new
installations.

6 years agoRemove the ScanFindVisitor class
Ken Brown [Fri, 27 Oct 2017 18:47:23 +0000 (14:47 -0400)]
Remove the ScanFindVisitor class

This class was used for local installs in which the repository contains no
setup.ini file.

This seems of questionable usefulness, since it doesn't know anything about
dependencies

It also doesn't correctly handle filenames with colons.

There are now good instructions at
https://cygwin.com/package-server.html#overlay for creating a valid
repository, so we just remove the class instead of trying to fix it.

6 years agoDon't fatal() on unexpected early window messages
Jon Turney [Fri, 22 Sep 2017 20:56:27 +0000 (21:56 +0100)]
Don't fatal() on unexpected early window messages

There's no good reason for this to be immediately fatal, and we have at
least one report of this happening [1], so don't fatal(), just warn.

[1] https://cygwin.com/ml/cygwin/2017-07/msg00428.html

6 years agoAdd upload target to Makefile
Jon Turney [Wed, 5 Jul 2017 17:06:36 +0000 (18:06 +0100)]
Add upload target to Makefile

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