X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=schema%2Fsyncinfo.sql;h=1a76c263c9716a7cd92cde8c95d7cf5acebce9cd;hb=HEAD;hp=6739cce2a731ec28c51418da9e253a5fd803334b;hpb=4e2e7c3d2780fdca649cb084523750f27afa5542;p=zpackage diff --git a/schema/syncinfo.sql b/schema/syncinfo.sql index 6739cce..1a76c26 100644 --- a/schema/syncinfo.sql +++ b/schema/syncinfo.sql @@ -75,13 +75,17 @@ PC.status not in ('installed','removing','updating') ) */ --- every path in updating and removing is either remove or no-op --- not true, could be an update, but should be handled above - union select case -when PFI.filetype is PFC.filetype +when PFI.filetype is not 'l' + and PFI.filetype is PFC.filetype + and PFI.mode is PFC.mode and PFI.username is PFC.username + and PFI.groupname is PFC.groupname and PFI.hash is PFC.hash + then 'noop' +when PFI.filetype is 'l' + and PFI.target is PFC.target + and PFI.filetype is PFC.filetype and PFI.mode is PFC.mode and PFI.username is PFC.username and PFI.groupname is PFC.groupname and PFI.hash is PFC.hash then 'noop' @@ -114,7 +118,6 @@ where P.status = 'installing' --and PFC.path is not null - -- every path in updating and removing is either remove or no-op -- not true, could be an update, but should be handled above union @@ -144,6 +147,7 @@ not exists (select path from where PFI.path = PFR.path ) +and path not in (select path from preserve) -- paths in 'installed' or 'updated' are no-ops