FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 11-24-2011, 05:59 PM
Dave Reisner
 
Default sync: avoid checking file conflicts with --dbonly

Scratches my own itch from FS#25667

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
---
lib/libalpm/sync.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 3817ec8..534499a 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -1160,7 +1160,7 @@ int _alpm_sync_commit(alpm_handle_t *handle, alpm_list_t **data)
trans->state = STATE_COMMITING;

/* fileconflict check */
- if(!(trans->flags & ALPM_TRANS_FLAG_FORCE)) {
+ if(!(trans->flags & (ALPM_TRANS_FLAG_FORCE|ALPM_TRANS_FLAG_DBONLY))) {
EVENT(handle, ALPM_EVENT_FILECONFLICTS_START, NULL, NULL);

_alpm_log(handle, ALPM_LOG_DEBUG, "looking for file conflicts
");
--
1.7.7.4
 
Old 12-12-2011, 05:44 PM
Dan McGee
 
Default sync: avoid checking file conflicts with --dbonly

On Fri, Nov 25, 2011 at 10:19 AM, Thomas Bächler <thomas@archlinux.org> wrote:
> Am 25.11.2011 16:47, schrieb Dave Reisner:
>> Well, ideally, on -S --dbonly if there's a file conflict, the packages
>> will also have a conflicts= (which will still be honored). Yes, this is
>> all extremely hackish and shouldn't be used. Never the less, if you're
>> performing an operation on the DB only, it really should be on the DB
>> only.
>
> Ideally, pacman would ignore file conflicts in the file system only if
> the files do not belong to any package. If the conflicting files belong
> to an installed package, it should still abort and require -f.

Taking another quick look at this old patch.

Given that --dbonly is probably used by 0.1% of our users, if that,
I'm inclined to just apply the original patch. Yes, you could hose
your database, but if you're even using dbonly, you are in a sense
doing that anyway.

I feel like --dbonly is an option from years ago that has lost its
original usefulness (I'm not even sure what that was, to be honest).
If it is only to fake having a package installed, wouldn't it be
easier to have some sort of fake provision allowance in pacman.conf or
something?

FakeInstalled = python-random-module-from-pip=4.2.1 cpan-module=234

-Dan
 

Thread Tools




All times are GMT. The time now is 12:59 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org