Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 305393 | Differences between
and this patch

Collapse All | Expand All

(-)bin/dispatch-conf (+16 lines)
Lines 42-47 Link Here
42
DIFF_CONTENTS        = "diff -Nu '%s' '%s'"
42
DIFF_CONTENTS        = "diff -Nu '%s' '%s'"
43
DIFF_CVS_INTERP      = "diff -Nu '%s' '%s' | grep '^[+-][^+-]' | grep -v '# .Header:.*'"
43
DIFF_CVS_INTERP      = "diff -Nu '%s' '%s' | grep '^[+-][^+-]' | grep -v '# .Header:.*'"
44
DIFF_WSCOMMENTS      = "diff -Nu '%s' '%s' | grep '^[+-][^+-]' | grep -v '^[-+]#' | grep -v '^[-+][:space:]*$'"
44
DIFF_WSCOMMENTS      = "diff -Nu '%s' '%s' | grep '^[+-][^+-]' | grep -v '^[-+]#' | grep -v '^[-+][:space:]*$'"
45
diffutils_2_9 = False
45
46
46
# We need a secure scratch dir and python does silly verbose errors on the use of tempnam
47
# We need a secure scratch dir and python does silly verbose errors on the use of tempnam
47
oldmask = os.umask(0o077)
48
oldmask = os.umask(0o077)
Lines 117-122 Link Here
117
                        "use-rcs=yes in config; fatal', file=sys.stderr)
118
                        "use-rcs=yes in config; fatal', file=sys.stderr)
118
                    return False
119
                    return False
119
120
121
        merge_cmd = self.options.get("merge", "").split()
122
        global diffutils_2_9
123
        if merge_cmd and merge_cmd[0] == 'sdiff':
124
            vardb = portage.db['/']['vartree'].dbapi
125
            diffutils = vardb.match('sys-apps/diffutils')
126
            if diffutils:
127
                diffutils = diffutils[0]
128
                diffutils_split = portage.catpkgsplit(diffutils)[1:]
129
                if portage.vercmp(diffutils_split,
130
                    portage.pkgsplit('diffutils-2.9')) >= 0:
131
                    diffutils_2_9 = True
120
132
121
        # config file freezing support
133
        # config file freezing support
122
        frozen_files = set(self.options.get("frozen-files", "").split())
134
        frozen_files = set(self.options.get("frozen-files", "").split())
Lines 267-272 Link Here
267
                    merged = SCRATCH_DIR+"/"+os.path.basename(conf['current'])
279
                    merged = SCRATCH_DIR+"/"+os.path.basename(conf['current'])
268
                    print()
280
                    print()
269
                    ret = os.system (self.options['merge'] % (merged, conf ['current'], newconf))
281
                    ret = os.system (self.options['merge'] % (merged, conf ['current'], newconf))
282
                    ret = os.WEXITSTATUS(ret)
283
                    if diffutils_2_9:
284
                        if ret < 2:
285
                            ret = 0
270
                    if ret:
286
                    if ret:
271
                        print("Failure running 'merge' command")
287
                        print("Failure running 'merge' command")
272
                        continue
288
                        continue

Return to bug 305393