Commit 84db6f9a authored by lyxell's avatar lyxell

Correctly handle packages marked as 'is_fake'

parent dac2fd95
...@@ -334,28 +334,31 @@ def remove (pkgName) ...@@ -334,28 +334,31 @@ def remove (pkgName)
return return
end end
Dir.chdir CREW_CONFIG_PATH do #if the package is marked as 'is_fake', the file/directorylists doesn't exist
if File.file?("meta/#{pkgName}.filelist")
#remove all files installed by the package Dir.chdir CREW_CONFIG_PATH do
File.open("meta/#{pkgName}.filelist").each_line do |line|
begin #remove all files installed by the package
File.unlink line.chomp File.open("meta/#{pkgName}.filelist").each_line do |line|
rescue => exception #swallow exception begin
File.unlink line.chomp
rescue => exception #swallow exception
end
end end
end
#remove all directories installed by the package #remove all directories installed by the package
File.readlines("meta/#{pkgName}.directorylist").reverse.each do |line| File.readlines("meta/#{pkgName}.directorylist").reverse.each do |line|
begin begin
Dir.rmdir line.chomp Dir.rmdir line.chomp
rescue => exception #swallow exception rescue => exception #swallow exception
end
end end
end
#remove the file and directory list #remove the file and directory list
File.unlink "meta/#{pkgName}.filelist" File.unlink "meta/#{pkgName}.filelist"
File.unlink "meta/#{pkgName}.directorylist" File.unlink "meta/#{pkgName}.directorylist"
end
end end
#remove from installed packages #remove from installed packages
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment