Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
70e37907
Commit
70e37907
authored
Aug 23, 2011
by
Hans Leidekker
Committed by
Alexandre Julliard
Aug 23, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Remove local patch packages when the product is removed.
parent
621b0405
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
22 deletions
+41
-22
action.c
dlls/msi/action.c
+5
-0
msipriv.h
dlls/msi/msipriv.h
+3
-0
package.c
dlls/msi/package.c
+12
-12
patch.c
dlls/msi/patch.c
+21
-10
No files found.
dlls/msi/action.c
View file @
70e37907
...
...
@@ -4938,6 +4938,11 @@ static UINT msi_unpublish_product( MSIPACKAGE *package, const WCHAR *remove )
LIST_FOR_EACH_ENTRY
(
patch
,
&
package
->
patches
,
MSIPATCHINFO
,
entry
)
{
MSIREG_DeleteUserDataPatchKey
(
patch
->
patchcode
,
package
->
Context
);
if
(
!
strcmpW
(
package
->
ProductCode
,
patch
->
products
))
{
TRACE
(
"removing local patch package %s
\n
"
,
debugstr_w
(
patch
->
localfile
));
patch
->
delete_on_close
=
TRUE
;
}
/* FIXME: remove local patch package if this is the last product */
}
TRACE
(
"removing local package %s
\n
"
,
debugstr_w
(
package
->
localfile
));
...
...
dlls/msi/msipriv.h
View file @
70e37907
...
...
@@ -170,10 +170,12 @@ typedef struct tagMSIPATCHINFO
{
struct
list
entry
;
LPWSTR
patchcode
;
LPWSTR
products
;
LPWSTR
transforms
;
LPWSTR
filename
;
LPWSTR
localfile
;
MSIPATCHSTATE
state
;
BOOL
delete_on_close
;
}
MSIPATCHINFO
;
typedef
struct
tagMSIBINARY
...
...
@@ -770,6 +772,7 @@ extern UINT msi_apply_transforms( MSIPACKAGE *package ) DECLSPEC_HIDDEN;
extern
UINT
msi_check_patch_applicable
(
MSIPACKAGE
*
package
,
MSISUMMARYINFO
*
si
)
DECLSPEC_HIDDEN
;
extern
UINT
msi_apply_patches
(
MSIPACKAGE
*
package
)
DECLSPEC_HIDDEN
;
extern
UINT
msi_apply_registered_patch
(
MSIPACKAGE
*
package
,
LPCWSTR
patch_code
)
DECLSPEC_HIDDEN
;
extern
void
msi_free_patchinfo
(
MSIPATCHINFO
*
patch
)
DECLSPEC_HIDDEN
;
/* action internals */
extern
UINT
MSI_InstallPackage
(
MSIPACKAGE
*
,
LPCWSTR
,
LPCWSTR
)
DECLSPEC_HIDDEN
;
...
...
dlls/msi/package.c
View file @
70e37907
...
...
@@ -293,18 +293,6 @@ static void free_package_structures( MSIPACKAGE *package )
msi_free
(
package
->
script
);
}
LIST_FOR_EACH_SAFE
(
item
,
cursor
,
&
package
->
patches
)
{
MSIPATCHINFO
*
patch
=
LIST_ENTRY
(
item
,
MSIPATCHINFO
,
entry
);
list_remove
(
&
patch
->
entry
);
msi_free
(
patch
->
patchcode
);
msi_free
(
patch
->
transforms
);
msi_free
(
patch
->
localfile
);
msi_free
(
patch
->
filename
);
msi_free
(
patch
);
}
LIST_FOR_EACH_SAFE
(
item
,
cursor
,
&
package
->
binaries
)
{
MSIBINARY
*
binary
=
LIST_ENTRY
(
item
,
MSIBINARY
,
entry
);
...
...
@@ -329,6 +317,18 @@ static void free_package_structures( MSIPACKAGE *package )
msi_free
(
cab
);
}
LIST_FOR_EACH_SAFE
(
item
,
cursor
,
&
package
->
patches
)
{
MSIPATCHINFO
*
patch
=
LIST_ENTRY
(
item
,
MSIPATCHINFO
,
entry
);
list_remove
(
&
patch
->
entry
);
if
(
patch
->
delete_on_close
&&
!
DeleteFileW
(
patch
->
localfile
))
{
ERR
(
"failed to delete %s (%u)
\n
"
,
debugstr_w
(
patch
->
localfile
),
GetLastError
());
}
msi_free_patchinfo
(
patch
);
}
msi_free
(
package
->
BaseURL
);
msi_free
(
package
->
PackagePath
);
msi_free
(
package
->
ProductCode
);
...
...
dlls/msi/patch.c
View file @
70e37907
...
...
@@ -184,10 +184,16 @@ static UINT msi_parse_patch_summary( MSISUMMARYINFO *si, MSIPATCHINFO **patch )
p
[
1
]
=
0
;
}
TRACE
(
"patch code %s
\n
"
,
debugstr_w
(
pi
->
patchcode
));
if
(
!
(
pi
->
products
=
msi_suminfo_dup_string
(
si
,
PID_TEMPLATE
)))
{
msi_free
(
pi
->
patchcode
);
msi_free
(
pi
);
return
ERROR_OUTOFMEMORY
;
}
if
(
!
(
pi
->
transforms
=
msi_suminfo_dup_string
(
si
,
PID_LASTAUTHOR
)))
{
msi_free
(
pi
->
patchcode
);
msi_free
(
pi
->
products
);
msi_free
(
pi
);
return
ERROR_OUTOFMEMORY
;
}
...
...
@@ -597,6 +603,16 @@ static UINT msi_apply_patch_db( MSIPACKAGE *package, MSIDATABASE *patch_db, MSIP
return
ERROR_SUCCESS
;
}
void
msi_free_patchinfo
(
MSIPATCHINFO
*
patch
)
{
msi_free
(
patch
->
patchcode
);
msi_free
(
patch
->
products
);
msi_free
(
patch
->
transforms
);
msi_free
(
patch
->
filename
);
msi_free
(
patch
->
localfile
);
msi_free
(
patch
);
}
static
UINT
msi_apply_patch_package
(
MSIPACKAGE
*
package
,
const
WCHAR
*
file
)
{
static
const
WCHAR
dotmsp
[]
=
{
'.'
,
'm'
,
's'
,
'p'
,
0
};
...
...
@@ -646,11 +662,8 @@ done:
msiobj_release
(
&
patch_db
->
hdr
);
if
(
patch
&&
r
!=
ERROR_SUCCESS
)
{
msi_free
(
patch
->
patchcode
);
msi_free
(
patch
->
transforms
);
msi_free
(
patch
->
filename
);
msi_free
(
patch
->
localfile
);
msi_free
(
patch
);
DeleteFileW
(
patch
->
localfile
);
msi_free_patchinfo
(
patch
);
}
return
r
;
}
...
...
@@ -756,6 +769,7 @@ UINT msi_apply_registered_patch( MSIPACKAGE *package, LPCWSTR patch_code )
if
(
!
patch_info
->
localfile
)
{
msiobj_release
(
&
patch_db
->
hdr
);
msi_free_patchinfo
(
patch_info
);
return
ERROR_OUTOFMEMORY
;
}
r
=
msi_apply_patch_db
(
package
,
patch_db
,
patch_info
);
...
...
@@ -763,10 +777,7 @@ UINT msi_apply_registered_patch( MSIPACKAGE *package, LPCWSTR patch_code )
if
(
r
!=
ERROR_SUCCESS
)
{
ERR
(
"failed to apply patch %u
\n
"
,
r
);
msi_free
(
patch_info
->
patchcode
);
msi_free
(
patch_info
->
transforms
);
msi_free
(
patch_info
->
localfile
);
msi_free
(
patch_info
);
msi_free_patchinfo
(
patch_info
);
}
return
r
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment