[pacman-dev] Fix -Sy and -Sp operations.

Xavier shiningxc at gmail.com
Thu Oct 4 11:04:56 EDT 2007


When the -Sy operation failed, the lock wasn't removed because
alpm_trans_release wasn't called. This is fixed now.

Also, after my last change in commit 52e7e6d74733f7a431376a9e528c4fe4d3732068 ,
Sp didn't do anything anymore.
That's because needs_transaction returned false for -Sp, so the sync transaction
wasn't run. However, the current implementation of -Sp requires a sync transaction.

Also, since a transaction creates the lock file at the beginning, and releases it
at the end, this mean that -Sp requires root access anyway..

I think I understand now why Aaron found that the current -Sp implementation is hackish :)

Signed-off-by: Chantry Xavier <shiningxc at gmail.com>
---
 src/pacman/sync.c |    3 ++-
 src/pacman/util.c |    3 +--
 2 files changed, 3 insertions(+), 3 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: f43667a6c277c533ac7e7fed98394478091f3d9b.diff
Type: text/x-patch
Size: 1150 bytes
Desc: not available
URL: <http://archlinux.org/pipermail/pacman-dev/attachments/20071004/97a0147d/attachment.bin>


More information about the pacman-dev mailing list