public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-portage-dev] PATCH: [dispatch-conf] Don't use result when config merging fails (#99418)
@ 2005-07-18 15:00 Jason Stubbs
  0 siblings, 0 replies; only message in thread
From: Jason Stubbs @ 2005-07-18 15:00 UTC (permalink / raw
  To: gentoo-portage-dev


[-- Attachment #1.1: Type: text/plain, Size: 297 bytes --]

http://bugs.gentoo.org/show_bug.cgi?id=98727

Author: Jason Stubbs

If an interactive merge fails for any reason, dispatch-conf will use
the file created anyway. This patch causes the resulting file to
be ignored if the interactive merge program does not exit cleanly.

-- 
Jason Stubbs

[-- Attachment #1.2: 99418_merge_retcode_ignored.patch --]
[-- Type: text/x-diff, Size: 743 bytes --]

--- /usr/sbin/dispatch-conf	2005-07-09 13:28:01.258426808 +0900
+++ dispatch-conf	2005-07-18 21:17:22.209904000 +0900
@@ -193,7 +193,10 @@
                 elif c == 'm':
                     merged = SCRATCH_DIR+"/"+os.path.basename(conf['current'])
                     print
-                    os.system (self.options['merge'] % (merged, conf ['current'], newconf))
+                    ret = os.system (self.options['merge'] % (merged, conf ['current'], newconf))
+                    if ret:
+                        print "Failure running 'merge' command"
+                        continue
                     shutil.copyfile(merged, mrgconf)
                     os.remove(merged)
                     mystat = os.lstat(conf['new'])

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-07-18 15:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-18 15:00 [gentoo-portage-dev] PATCH: [dispatch-conf] Don't use result when config merging fails (#99418) Jason Stubbs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox