X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fpoolize.py;h=ef41d7421198835f78c516d5ed09d230f2910bc4;hb=c99238db49e49f53712fcd992c85f03c9c503715;hp=6b4752e1ad5747e570735a3f73f94feee109168f;hpb=2c639c40c65966711c82d46a6f4ee8739e819aad;p=dak.git diff --git a/dak/poolize.py b/dak/poolize.py old mode 100644 new mode 100755 index 6b4752e1..ef41d742 --- a/dak/poolize.py +++ b/dak/poolize.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Poolify (move packages from "legacy" type locations to pool locations) +""" Poolify (move packages from "legacy" type locations to pool locations) """ # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006 James Troup # This program is free software; you can redistribute it and/or modify @@ -29,7 +29,7 @@ import os, pg, re, stat, sys import apt_pkg, apt_inst import daklib.database import daklib.utils -from daklib.regexes import re_isadeb +from daklib.regexes import re_isadeb, re_extract_src_version, re_no_epoch, re_issource ################################################################################ @@ -83,17 +83,17 @@ def poolize (q, limit, verbose, no_action): package = control.Find("Package", "") source = control.Find("Source", package) if source.find("(") != -1: - m = daklib.utils.re_extract_src_version.match(source) + m = re_extract_src_version.match(source) 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)) - version = daklib.utils.re_no_epoch.sub('', version) + version = re_no_epoch.sub('', version) destination_filename = "%s_%s_%s.deb" % (package, version, architecture) else: - m = daklib.utils.re_issource.match(base_filename) + m = re_issource.match(base_filename) if m: source = m.group(1) else: