Bug 56232 - ecosconfig finds the wrong solution. Inverted
Summary: ecosconfig finds the wrong solution. Inverted
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: eCos
Classification: Retired
Component: ecosconfig
Version: 1.5.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bart Veer
QA Contact: Bart Veer
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-11-14 13:23 UTC by Andrew Lunn
Modified: 2007-04-18 16:38 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-12-06 17:04:32 UTC
Embargoed:


Attachments (Terms of Use)
ecos.ecc which makes it go wrong (536.07 KB, text/plain)
2001-11-14 13:25 UTC, Andrew Lunn
no flags Details
Patch for host/tools/configtool/standalone/common/cdl_exec.cxx (2.43 KB, patch)
2001-12-06 14:17 UTC, Bart Veer
no flags Details | Diff

Description Andrew Lunn 2001-11-14 13:23:41 UTC
Description of Problem:

If you use the -v flag to ecosconfig it will show possible solutions to
conflicts. Its getting the solutions wrong. It suggests turning an option
off, when it should turn it on.

eg...

~>ecosconfig -v resolve
C CYGPKG_OPENSSL, "requires" constraint not satisfied:  (CYGPKG_OPENSSL_SHA
&& C
YGPKG_OPENSSL_SHA1) ||
                      CYGPKG_OPENSSL_MD5 ||
                      (CYGPKG_OPENSSL_MDC2 && CYGPKG_OPENSSL_DES) ||
                      (CYGPKG_OPENSSL_MD2)
  Possible solution:
    CYGPKG_OPENSSL_MD5 -> 0
C CYGPKG_OPENSSL, "requires" constraint not satisfied: CYGPKG_OPENSSL_BUFFER
  Possible solution:
    CYGPKG_OPENSSL_BUFFER -> 0

~>ecosconfig --version
ecosconfig 1.5.2 (Oct 31 2001 10:42:53)
Copyright (c) 2001 Red Hat, Inc.

The correct solution for both of these is -> 1, not 0.

Attached is the ecos.ecc file. Sorry, its huge!

Comment 1 Andrew Lunn 2001-11-14 13:25:47 UTC
Created attachment 37502 [details]
ecos.ecc which makes it go wrong

Comment 2 Bart Veer 2001-12-06 14:17:12 UTC
Created attachment 39867 [details]
Patch for host/tools/configtool/standalone/common/cdl_exec.cxx

Comment 3 Bart Veer 2001-12-06 14:21:59 UTC
The analysis was not quite correct. The code that reported possible
solutions was ignoring the different flavors of CDL options. It
would report the right thing for options with the data flavor,
but not for bool or booldata options. A patch has been attached
and should show up in anoncvs for the next update.


Comment 4 Jonathan Larmour 2001-12-06 16:24:11 UTC
Andrew, feel free to close this when you're happy...
anoncvs will be updated tomorrow if that helps.
Bart, did you build a new ecosconfig binary you could just give Andrew?



Comment 5 Andrew Lunn 2001-12-06 16:39:41 UTC
It not gets the correct answer when check is used.

Should resolve use this answer? When i use the resolve command it just reports
the conflict. If -v is used it reports the solution. But it will not use the
solution. Is the code which uses the solution broken in the same way as the code
that printed the solution?

Comment 6 Bart Veer 2001-12-06 17:04:26 UTC
"ecosconfig resolve" will never overwrite a user setting - the same applies
for all of the configuration technology. In this example the solutions cannot
be applied automatically because both CYGPKG_OPENSSL_BUFFER and
CYGPKG_OPENSSL_MD5 have user values. So it is the user that must apply
the changes.

It would be possible to add a flag to "ecosconfig resolve" giving it
permission to override user values, but I am somewhat reluctant to
give batch tools that much power. Interactive tools such as the GUI
are more suited for such situations.


Note You need to log in before you can comment on or make changes to this bug.