From: Ansgar Burchardt Date: Sun, 4 Nov 2012 14:52:14 +0000 (+0100) Subject: dak/dakdb/update75.py: handle "/" in component names. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=368f71cb16139abf72d1c351b1fe64c5470365cf;p=dak dak/dakdb/update75.py: handle "/" in component names. --- diff --git a/dak/dakdb/update75.py b/dak/dakdb/update75.py index e6684337..d152d649 100644 --- a/dak/dakdb/update75.py +++ b/dak/dakdb/update75.py @@ -54,7 +54,7 @@ def _track_files_per_archive(cnf, c): FROM files f JOIN location l ON f.location = l.id""", (archive_id,)) - c.execute("""UPDATE files f SET filename = substring(f.filename FROM '/(.*)') + c.execute("""UPDATE files f SET filename = substring(f.filename FROM c.name || '/(.*)') FROM location l, component c WHERE f.location = l.id AND l.component = c.id AND f.filename LIKE c.name || '/%'""")