X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fdakdb%2Fupdate75.py;h=d152d6495a38eb411fcc4b48c51aed6336a2ae34;hb=fdbef587c29814f97c192de5a8b7e9f09cc45fa4;hp=e66843374fee87158d1f2363eb386de8c7d1df35;hpb=def19b9342c0db470b0454813d57bf2c2d6b5fb9;p=dak.git 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 || '/%'""")