package = control.Find("Package", "")
source = control.Find("Source", package)
if source.find("(") != -1:
package = control.Find("Package", "")
source = control.Find("Source", package)
if source.find("(") != -1:
source = m.group(1)
# If it's a binary, we need to also rename the file to include the architecture
version = control.Find("Version", "")
architecture = control.Find("Architecture", "")
if package == "" or version == "" or architecture == "":
daklib.utils.fubar("%s: couldn't determine required information to rename .deb file." % (legacy_filename))
source = m.group(1)
# If it's a binary, we need to also rename the file to include the architecture
version = control.Find("Version", "")
architecture = control.Find("Architecture", "")
if package == "" or version == "" or architecture == "":
daklib.utils.fubar("%s: couldn't determine required information to rename .deb file." % (legacy_filename))