clyde icon indicating copy to clipboard operation
clyde copied to clipboard

Clyde should initialize transaction only when required

Open sebnow opened this issue 12 years ago • 0 comments

Clyde initializes a transaction at the very beginning of sync_aur_trans, which is a lot earlier than the AUR packages are actually available. The packages are downloaded at a much later date, built, and only then installed. This means there is a long duration during which database operations can not be made.

The process looks like this:

  1. initialize transaction
  2. install binary packages/dependencies
  3. find AUR packages
  4. for each AUR package; download package, build package, install package.
  5. release transaction

I think the process should look more like this:

  1. download AUR packages
  2. download AUR package sources
  3. initialize transaction,
  4. install dependencies
  5. build and install AUR packages
  6. release transaction

The AUR building step might still take a while, but it would be difficult/impossible to separate building and installing AUR packages due to build-time dependencies.

This would mean the database is not locked until required. The download step can take hours for large packages (e.g. games with lots of game data), especially with many dependencies.

Perhaps AUR dependencies can be checked prior to downloading the sources to prevent unnecessary bandwidth being used. Not sure if this already happens or not.

sebnow avatar Jul 17 '11 08:07 sebnow