[debexpo-devel] issue 81: Repeated uploads fails without notification of uploader

Serafeim Zanikolas serzan at hellug.gr
Mon Feb 16 21:27:00 CET 2009


On Mon, Feb 16, 2009 at 03:10:57PM +0900, Paul Wise wrote [edited]:
> On Mon, Feb 16, 2009 at 8:25 AM, Serafeim Zanikolas <serzan at hellug.gr> wrote:
> 
> > wrt ticket #81, I would suggest that all relevant pre-existing files and
> > packageFile objects in the database are removed before processing the new
> > upload.
> 
> So, perhaps rename the old files, put the new ones in place, update
> the database (with a transaction) and then delete the old files?

Sounds sensible. I'll have to do the same with the corresponding packageFile
objects in the database:

- "copy" them to a temporary packageFiles table
- remove them from the packageFiles table
- import new files and corresponding packageFile objects and
- if successful, remove old packageFiles from temp table
  else "move" old packageFiles from temp table back to the packageFiles table

I don't really like it but the alternative of extending the key of
packageFiles with upload ids (and therefore being able to distinguish
packageFiles referring to the same files from different uploads, eliminating
the need for a temporary packageFiles table) would be more instrusive.

And of course, all that done in a way that makes sure that files and
packageFile objects never get out of sync (mental note: add that in the list
of consistency checks to be done by a batch utility).

-S


More information about the debexpo-devel mailing list