don't fail to waitAfterConfig if the build system adds no auto_configure rule
[auto-debuild.git] / auto_debuild.py
index ab899838d7ed793f2167340ea6c9f20c399cbac5..0be45a3e5071b4b18229a87bfae1f3c52f90be9a 100755 (executable)
@@ -177,6 +177,8 @@ def createDebianFiles(config):
                writeDependency(f, "Recommends", config.get('binaryRecommends', []))
                writeDependency(f, "Provides", config.get('binaryProvides', [sourceName]))
                writeDependency(f, "Conflicts", config.get('binaryConflicts', []))
+               writeDependency(f, "Breaks", config.get('binaryBreaks', []) + config.get('binaryBreaksReplaces', []))
+               writeDependency(f, "Replaces", config.get('binaryReplaces', []) + config.get('binaryBreaksReplaces', []))
                print >>f, "Description:",sourceName,"(auto-debuild)"
                print >>f, " Package auto-generated by auto-debuild."
                files.append(os.path.join(debDir, "%s_%s_%s.deb" % (binaryName, version, arch)))
@@ -246,6 +248,7 @@ def createDebianFiles(config):
                        r.rules['installdocs'] = [safeCall('dh_installdocs', '--link-doc='+binaryName)] # make the doc folder of the dbg package a symlink
                # wait after configuration?
                if config.get('waitAfterConfig', False):
+                       if not 'auto_configure' in r.rules: r.rules['auto_configure'] = ['dh_auto_configure'] # make sure there is an override
                        r.rules['auto_configure'].append("@"+safeCall('read', '-p', 'Configuration done. Hit "Enter" to build the package. ', 'DUMMY_VAR')) # if we run in dash, we need to tell it which variable to use for the result...
                # dump it to a file
                r.write(f)