diff options
| author | ruki <[email protected]> | 2019-03-14 23:57:38 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-03-14 17:45:49 +0800 |
| commit | 9036abe2d5d282bd19c9f6bdd2acee9ac03051fc (patch) | |
| tree | 9de2c370b841128b754bd2590e4d0a82173bbe7f /xmake/actions/require/impl/package.lua | |
| parent | 1885d14af400ea5658dc89431fc1353184e40643 (diff) | |
fix uninstall and remove unlink for package
Diffstat (limited to 'xmake/actions/require/impl/package.lua')
| -rw-r--r-- | xmake/actions/require/impl/package.lua | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/xmake/actions/require/impl/package.lua b/xmake/actions/require/impl/package.lua index dbed2aee8..06fa89a1e 100644 --- a/xmake/actions/require/impl/package.lua +++ b/xmake/actions/require/impl/package.lua @@ -601,48 +601,14 @@ function uninstall_packages(requires, opt) -- remove all packages local packages = {} for _, instance in ipairs(load_packages(requires, opt)) do - if os.isfile(instance:prefixfile()) then - - -- uninstall package from the prefix directory - action.prefix.uninstall(instance) - - -- remove ok + if os.isfile(instance:manifest_file()) then table.insert(packages, instance) end - - -- remove the installed files os.tryrm(instance:installdir()) end return packages end --- only unlink packages from the prefix directory -function unlink_packages(requires, opt) - - -- init options - opt = opt or {} - - -- do not remove dependent packages - opt.nodeps = true - - -- clear the detect cache - detectcache.clear() - - -- unlink all packages - local packages = {} - for _, instance in ipairs(load_packages(requires, opt)) do - if os.isfile(instance:prefixfile()) then - - -- uninstall package from the prefix directory - action.prefix.uninstall(instance) - - -- remove ok - table.insert(packages, instance) - end - end - return packages -end - -- search packages function search_packages(names) |
