]> pd.if.org Git - zpackage/blobdiff - schema/syncinfo.sql
remove stray debug fprintf
[zpackage] / schema / syncinfo.sql
index 6739cce2a731ec28c51418da9e253a5fd803334b..1a76c263c9716a7cd92cde8c95d7cf5acebce9cd 100644 (file)
@@ -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