ccollins476ad closed pull request #138: newt - Don't abort if setting is 

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/newt/syscfg/syscfg.go b/newt/syscfg/syscfg.go
index 722d8f49..3de31bb2 100644
--- a/newt/syscfg/syscfg.go
+++ b/newt/syscfg/syscfg.go
@@ -330,12 +330,13 @@ func (cfg *Cfg) readDefsOnce(lpkg *pkg.LocalPackage,
                        if oldEntry, exists := cfg.Settings[k]; exists {
-                               // Setting already defined.  Allow this only if 
the setting is
-                               // injected, in which case the injected value 
takes precedence.
+                               // Setting already defined.  Warn the user and 
keep the
+                               // original definition.
                                point := mostRecentPoint(oldEntry)
                                if !point.IsInjected() {
-                                       // XXX: Better error message.
-                                       return util.FmtNewtError("setting %s 
redefined", k)
+                                       util.StatusMessage(util.VERBOSITY_QUIET,
+                                               "* Warning: setting %s 
redefined (pkg1=%s pkg2=%s)\n",
+                                               k, point.Source.Name(), 
                                entry.History = append(entry.History, 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

Reply via email to