Re: [SailfishDevel] [CardDAV] duplicate entries

2017-03-02 Thread Chris Adams
Hi Eli,

Probably the best way would be to look at the RemoveContactDetails trigger:
https://git.merproject.org/mer-core/qtcontacts-sqlite/blob/master/src/engine/contactsdatabase.cpp#L353

If you can determine which contactId entries are from carddav sync target 
contacts, then you can use the remove trigger logic to remove all of the 
associated carddav data.

(The out-of-band (OOB) table is slightly different but inspection should make 
it obvious which OOB entry relates to the carddav account.)

Best regards,
Chris.


From: Devel [devel-boun...@lists.sailfishos.org] on behalf of E.S. Rosenberg 
[es.rosenberg+sailfishos@gmail.com]
Sent: Friday, March 03, 2017 6:23 AM
To: Sailfish OS Developers
Subject: Re: [SailfishDevel] [CardDAV] duplicate entries

2017-02-20 20:32 GMT+02:00 E.S. Rosenberg 
>:


2017-02-20 12:54 GMT+02:00 E.S. Rosenberg 
>:
2017-02-20 12:32 GMT+02:00 E.S. Rosenberg 
>:
2017-02-20 3:41 GMT+02:00 Chris Adams 
>:
Hi Eli,
Hi Chris,

Sorry for top posting, but OWA doesn't quote properly.
No problem

Firstly, was_local contacts occur when a local (phone device) contact is 
aggregated into another contact which already had a local constituent.  We only 
allow one single local constituent per aggregate contact, so one of them gets 
demoted to was_local.  This can occur if you import from a .vcf or via 
Bluetooth, for example.
Is there somewhere I can read more on this subject?

If you can reproduce the duplication event and provide sync logs of that event 
(as per 
https://sailfishos.org/wiki/CalDAV_and_CardDAV_Community_Contributions#Sync_Logs)
 that would be helpful!
I'll try.

You should be able to delete the contacts from the database so long as you also 
delete any entries from the OOB table which relate to that CardDAV account.
So I actually deleted very aggressively yesterday (all carddav and all google) 
but did not modify oob, which resulted in 0 contacts being read, however even 
restoring the backed up contacts.db file does not fix this issue.
Any pointers what may be going wrong or where to look would be very welcome.
Thanks,
Eli

Tiny additional update:
>From digging through contacts.db it seems that it needs a lot more cleanup 
>then just the contacts table, tables with crazy counts:
addresses, birthdays, avatars, deletedcontacts (~4k entries), details (>100k), 
emailaddresses, guids (~25k), organizations (~16k), phonenumbers (~56k), 
relationships (~25k), urls.

Thanks,
Eli
It seems I made a mistake when restoring the backup I now again have all my 
contacts :)

Now my first step I think is going to be to cleanly remove all carddav sync 
data, any pointers on that will be much appreciated (I assume I need to somehow 
cascade the delete into all the linked tables), when that is done I'll turn 
carddav back on and see if I can again trigger such a sync situation with logs.

Thanks,
Eli

Hi Chris,
Is there any chance you can provide a schematic overview of the contacts.db 
file of the different relations etc.?
I really want to clean up but reverse engineering from column names is 
sub-ideal.
Thanks,
Eli


Best regards,
Chris.



From: Devel 
[devel-boun...@lists.sailfishos.org]
 on behalf of E.S. Rosenberg 
[es.rosenberg+sailfishos@gmail.com]
Sent: Monday, February 20, 2017 9:13 AM
To: Sailfish OS Developers
Subject: [SailfishDevel] [CardDAV] duplicate entries

Hi everyone,
Last week I noticed that my phone seems to have gone into similar behavior as I 
described a long time ago with google sync here:

Re: [SailfishDevel] [CardDAV] duplicate entries

2017-03-02 Thread E.S. Rosenberg
2017-02-20 20:32 GMT+02:00 E.S. Rosenberg <
es.rosenberg+sailfishos@gmail.com>:

>
>
> 2017-02-20 12:54 GMT+02:00 E.S. Rosenberg  gmail.com>:
>
>> 2017-02-20 12:32 GMT+02:00 E.S. Rosenberg > mail.com>:
>>
>>> 2017-02-20 3:41 GMT+02:00 Chris Adams :
>>>
 Hi Eli,

>>> Hi Chris,
>>>

 Sorry for top posting, but OWA doesn't quote properly.

>>> No problem
>>>

 Firstly, was_local contacts occur when a local (phone device) contact
 is aggregated into another contact which already had a local constituent.
 We only allow one single local constituent per aggregate contact, so one of
 them gets demoted to was_local.  This can occur if you import from a .vcf
 or via Bluetooth, for example.

>>> Is there somewhere I can read more on this subject?
>>>

 If you can reproduce the duplication event and provide sync logs of
 that event (as per https://sailfishos.org/wiki/Ca
 lDAV_and_CardDAV_Community_Contributions#Sync_Logs) that would be
 helpful!

>>> I'll try.
>>>

 You should be able to delete the contacts from the database so long as
 you also delete any entries from the OOB table which relate to that CardDAV
 account.

>>> So I actually deleted very aggressively yesterday (all carddav and all
>>> google) but did not modify oob, which resulted in 0 contacts being read,
>>> however even restoring the backed up contacts.db file does not fix this
>>> issue.
>>> Any pointers what may be going wrong or where to look would be very
>>> welcome.
>>> Thanks,
>>> Eli
>>>
>>
>> Tiny additional update:
>> From digging through contacts.db it seems that it needs a lot more
>> cleanup then just the contacts table, tables with crazy counts:
>> addresses, birthdays, avatars, deletedcontacts (~4k entries), details
>> (>100k), emailaddresses, guids (~25k), organizations (~16k), phonenumbers
>> (~56k), relationships (~25k), urls.
>>
>> Thanks,
>> Eli
>>
> It seems I made a mistake when restoring the backup I now again have all
> my contacts :)
>
> Now my first step I think is going to be to cleanly remove all carddav
> sync data, any pointers on that will be much appreciated (I assume I need
> to somehow cascade the delete into all the linked tables), when that is
> done I'll turn carddav back on and see if I can again trigger such a sync
> situation with logs.
>
> Thanks,
> Eli
>

Hi Chris,
Is there any chance you can provide a schematic overview of the contacts.db
file of the different relations etc.?
I really want to clean up but reverse engineering from column names is
sub-ideal.
Thanks,
Eli

>
>
 Best regards,
 Chris.


 --
 *From:* Devel [devel-boun...@lists.sailfishos.org] on behalf of E.S.
 Rosenberg [es.rosenberg+sailfishos@gmail.com]
 *Sent:* Monday, February 20, 2017 9:13 AM
 *To:* Sailfish OS Developers
 *Subject:* [SailfishDevel] [CardDAV] duplicate entries

 Hi everyone,
 Last week I noticed that my phone seems to have gone into similar
 behavior as I described a long time ago with google sync here:
 https://together.jolla.com/question/58416/fixing-the-contacts-db/
 

 I currenlty have 26k entries in contacts.db for 9xx contacts.

 I suspect that this may be linked to a stage where I was connected via
 a filtered provider that tried to MITM the connection and caused it to
 close with an authentication error, I'm going to clean it up the same way I
 described there and turn carddav back on but I am wondering if anyone else
 has experienced similar issues.

 Is anyone aware of any reason not to just delete everything with
 syncTarget == carddav (or != local)?

 Thanks,
 Eli

 Stats:
 987aggregate
 23128carddav
 1419google
 930local
 2sim
 65telepathy
 2voicemail
 3was_local

 What does 'was_local' mean?

 ___
 SailfishOS.org Devel mailing list
 To unsubscribe, please send a mail to devel-unsubscribe@lists.sailfi
 shos.org

>>>
>>>
>>
>
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

[SailfishDevel] Launching app when not fully closed yet in Lipstick

2017-03-02 Thread Dylan Van Assche via Devel
Hi,

I'm trying to figure out why my app won't launch just after it was closed in 
the UI by the user, if the user waits for a couple seconds then it's fine.
I launched it then for the terminal and the app is properly closed ( I can't 
execute any command until the app is fully closed) but that behaviour is not 
found in Lipstick.

Is there a way to 'wait' until my app is fully closed until the user can launch 
it again? This only happens in Lipstick and not in the terminal so I don't 
think it's related to my app.

Cheers,
Dylan___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] Devel post acknowledgement

2017-03-02 Thread Андрей Кожевников
I am pretty sure this is DEVEL mailing list, not user experience sharing
list. Please use together.jolla.com or forums for asking questions. Thanks.

2 мар. 2017 г. 0:16 пользователь "Jozef Macko" 
написал:

> Hello,
>
> How its possibly merge a duplicated contacts?
>
> __
>
>
>
> s pozdravom | best regards
>
> Jozef *Macko*
>
>
>
> +421 908 95 14 14 <+421%20905%20319%C2%A0399>
>
> j.macko...@gmail.com
>
> Dňa 1. 3. 2017, o 22:16, devel-boun...@lists.sailfishos.org napísal:
>
> Your message entitled
>
>Re: Devel Digest, Vol 34, Issue 15
>
> was successfully received by the Devel mailing list.
>
> List info page: https://lists.sailfishos.org/
> cgi-bin/mailman/listinfo/devel
> Your preferences: https://lists.sailfishos.org/
> cgi-bin/mailman/options/devel/j.macko.sk%40gmail.com
>
>
> ___
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to devel-unsubscribe@lists.
> sailfishos.org
>
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] Devel post acknowledgement

2017-03-02 Thread Riku
Hi, maybe this thread could be useful:

https://together.jolla.com/question/58416/fixing-the-contacts-db/

Regards, Riku

Jozef Macko kirjoitti keskiviikko 1. maaliskuuta 2017:
> Hello,
> 
> How its possibly merge a duplicated contacts?
> 
> __
>  
> s pozdravom | best regards
> Jozef Macko
>  
> +421 908 95 14 14
> j.macko...@gmail.com
> 
> Dňa 1. 3. 2017, o 22:16, devel-boun...@lists.sailfishos.org napísal:
> 
> > Your message entitled
> > 
> >Re: Devel Digest, Vol 34, Issue 15
> > 
> > was successfully received by the Devel mailing list.
> > 
> > List info page: https://lists.sailfishos.org/cgi-bin/mailman/listinfo/devel
> > Your preferences: 
> > https://lists.sailfishos.org/cgi-bin/mailman/options/devel/j.macko.sk%40gmail.com
>

-- 
Lähetetty Jollastani
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org