X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=claire.py;fp=claire.py;h=6c0219fa82014c603cf370ad6ff4fc6afcad3a35;hb=c846e77a848d60dd115f00faa0d9a854161d99eb;hp=70e42f37935f7568a1d9eb515b56d1e74f7f9da0;hpb=0bd91e382e0186ea42b7f5c29932437acbfdcef0;p=dak.git diff --git a/claire.py b/claire.py index 70e42f37..6c0219fa 100755 --- a/claire.py +++ b/claire.py @@ -2,7 +2,7 @@ # 'Fix' stable to make debian-cd and dpkg -BORGiE users happy # Copyright (C) 2000, 2001, 2002 James Troup -# $Id: claire.py,v 1.17 2002-06-08 00:15:57 troup Exp $ +# $Id: claire.py,v 1.18 2002-10-16 02:47:32 troup Exp $ # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -26,8 +26,8 @@ ################################################################################ -import os, pg, re, string, sys -import utils, db_access +import os, pg, re, sys; +import utils, db_access; import apt_pkg; ################################################################################ @@ -53,10 +53,10 @@ Create compatibility symlinks from legacy locations to the pool. # Relativize an absolute symlink from 'src' -> 'dest' relative to 'root'. # Returns fixed 'src' def clean_symlink (src, dest, root): - src = string.replace(src, root, '', 1); - dest = string.replace(dest, root, '', 1); + src = src.replace(root, '', 1); + dest = dest.replace(root, '', 1); dest = os.path.dirname(dest); - new_src = '../' * len(string.split(dest, '/')); + new_src = '../' * len(dest.split('/')); return new_src + src; ################################################################################ @@ -67,11 +67,11 @@ def fix_component_section (component, section): # FIXME: ugly hacks to work around override brain damage section = re_strip_section_prefix.sub('', section); - section = string.replace(string.lower(section), 'non-us', ''); + section = section.lower().replace('non-us', ''); if section == "main" or section == "contrib" or section == "non-free": section = ''; if section != '': - section = section + '/'; + section += '/'; return (component, section);