rely on dh to auto-generate the dbgsym packages
authorRalf Jung <post@ralfj.de>
Thu, 31 Dec 2015 12:21:23 +0000 (13:21 +0100)
committerRalf Jung <post@ralfj.de>
Thu, 31 Dec 2015 12:21:23 +0000 (13:21 +0100)
auto_debuild.py

index e2258c534a706720d5ce1fc2cc555222abfa6bac..208010984fcc4da949235725420e0f2609598595 100755 (executable)
@@ -207,7 +207,6 @@ def createDebianFiles(config):
        buildSystem = buildSystems[config.getstr('buildSystem')] # get the data immediately
        version = config.getstr('version') # version name excluding epoch (used for filenames)
        fullVersion = str(config.getint('epoch'))+':'+version if 'epoch' in config else version # version name including epoch
-       dbgPackage = config.getbool('dbgPackage', False)
        parallelJobs = config.getint('parallelJobs', multiprocessing.cpu_count()+1)
        packageArchitecture = config.getstr('architecture', 'any')
        withPython2 = config.getbool('withPython2', False)
@@ -276,18 +275,8 @@ def createDebianFiles(config):
                writeDependency(f, "Replaces", config.get('binaryReplaces', []) + config.get('binaryBreaksReplaces', []))
                print("Description:",sourceName,"(auto-debuild)", file=f)
                print(" Package auto-generated by auto-debuild.", file=f)
-               files.append(os.path.join(debDir, "%s_%s_%s.deb" % (binaryName, version, arch)))
-               # debug package
-               if dbgPackage:
-                       print(file=f)
-                       print("Package:",binaryName+"-dbg", file=f)
-                       print("Section: debug", file=f)
-                       print("Priority: extra", file=f)
-                       print("Architecture:",packageArchitecture, file=f)
-                       writeDependency(f, "Depends", ["${misc:Depends}", binaryName+" (= ${binary:Version})"])
-                       print("Description:",sourceName,"debug smbols (auto-debuild)", file=f)
-                       print(" Package containing debug symbols for "+sourceName+", auto-generated by auto-debuild.", file=f)
-                       files.append(os.path.join(debDir, "%s-dbg_%s_%s.deb" % (binaryName, version, arch)))
+               files.append(os.path.join(debDir, "{}_{}_{}.deb".format(binaryName, version, arch)))
+               files.append(os.path.join(debDir, "{}-dbgsym_{}_{}.deb".format(binaryName, version, arch)))
                # shim packages
                for shim in config.get('binaryShims', []):
                        print(file=f)
@@ -298,7 +287,7 @@ def createDebianFiles(config):
                        writeDependency(f, "Depends", ["${misc:Depends}", binaryName+" (= ${binary:Version})"])
                        print("Description:",sourceName,"shim for",shim,"(auto-debuild)", file=f)
                        print(" Package pretending to be "+shim+", auto-generated by auto-debuild.", file=f)
-                       files.append(os.path.join(debDir, "%s_%s_%s.deb" % (shim, version, arch)))
+                       files.append(os.path.join(debDir, "{}_{}_{}.deb".format(shim, version, arch)))
        # install file
        with open('debian/'+binaryName+'.install', 'w') as f:
                for line in config.get('binaryInstallFiles', []):
@@ -342,10 +331,6 @@ def createDebianFiles(config):
                buildSystem.ruleMaker(r, config)
                # global rules
                r.env["DEB_BUILD_OPTIONS"] = 'parallel='+str(parallelJobs)
-               if not dbgPackage:
-                       # disable debug information
-                       r.env["DEB_CFLAGS_APPEND"] = '-g0'
-                       r.env["DEB_CXXFLAGS_APPEND"] = '-g0'
                r.dh += ['--parallel']
                if withPython2:
                        r.dhWith.add('python2')
@@ -358,9 +343,6 @@ def createDebianFiles(config):
                # installation rule
                if 'binarySkipFiles' in config:
                        r.rules['auto_install'].append(safeCall('cd', 'debian/'+binaryName) + " && " + safeCall('rm', *config.get('binarySkipFiles')))
-               # debug packages
-               if dbgPackage:
-                       r.rules['strip'] = [safeCall('dh_strip', '--dbg-package='+binaryName+"-dbg")] # put debug files in appropriate package
                # make the doc folder of the other packages a symlink (dbg, shims)
                r.rules['installdocs'] = [safeCall('dh_installdocs', '--link-doc='+binaryName)]
                # wait after configuration?