Package: evolvotron
Version: 0.6.1-1+b1
Severity: minor
Tags: patch
The auxiliary command-line tool evolvotron_mutate only works for
generation of new formulas (parameter -g); it doesn't mutate the formula:
$ evolvotron_mutate -g > success.xml
$ evolvotron_mutate < success.xml > fail.xml
evolvotron_render: Error: Function not loaded due to errors:
The attached patch fixes this issue. Note that I notified upstream
(sorry, did that before reading that it's better to leave that up to the
package maintainers) and the patch is already applied to the repository,
but upstream says there are no short term plans to release a 0.6.2.
The patch also fixes a minor typo in the error message (the program name
was reported as evolvotron_render instead of evolvotron_mutate).
--- evolvotron_mutate.cpp~ 2009-06-27 00:56:53.000000000 +0200
+++ evolvotron_mutate.cpp 2012-04-13 09:07:20.000000000 +0200
@@ -65,14 +65,14 @@
const boost::shared_ptr<const MutatableImage> imagefn_in(MutatableImage::load_function(mutation_parameters.function_registry(),std::cin,report));
- if (imagefn_in)
+ if (imagefn_in.get()==0)
{
- std::cerr << "evolvotron_render: Error: Function not loaded due to errors:\n" << report;
+ std::cerr << "evolvotron_mutate: Error: Function not loaded due to errors:\n" << report;
exit(1);
}
else if (!report.empty())
{
- std::cerr << "evolvotron_render: Warning: Function loaded with warnings:\n" << report;
+ std::cerr << "evolvotron_mutate: Warning: Function loaded with warnings:\n" << report;
}
imagefn_out=imagefn_in->mutated(mutation_parameters);