Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
chromebrew
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
chromebrew
Commits
84db6f9a
Commit
84db6f9a
authored
8 years ago
by
lyxell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correctly handle packages marked as 'is_fake'
parent
dac2fd95
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
17 deletions
+20
-17
crew
crew
+20
-17
No files found.
crew
View file @
84db6f9a
...
...
@@ -334,28 +334,31 @@ def remove (pkgName)
return
end
Dir
.
chdir
CREW_CONFIG_PATH
do
#remove all files installed by the package
File
.
open
(
"meta/
#{
pkgName
}
.filelist"
).
each_line
do
|
line
|
begin
File
.
unlink
line
.
chomp
rescue
=>
exception
#swallow exception
#if the package is marked as 'is_fake', the file/directorylists doesn't exist
if
File
.
file?
(
"meta/
#{
pkgName
}
.filelist"
)
Dir
.
chdir
CREW_CONFIG_PATH
do
#remove all files installed by the package
File
.
open
(
"meta/
#{
pkgName
}
.filelist"
).
each_line
do
|
line
|
begin
File
.
unlink
line
.
chomp
rescue
=>
exception
#swallow exception
end
end
end
#remove all directories installed by the package
File
.
readlines
(
"meta/
#{
pkgName
}
.directorylist"
).
reverse
.
each
do
|
line
|
begin
Dir
.
rmdir
line
.
chomp
rescue
=>
exception
#swallow exception
#remove all directories installed by the package
File
.
readlines
(
"meta/
#{
pkgName
}
.directorylist"
).
reverse
.
each
do
|
line
|
begin
Dir
.
rmdir
line
.
chomp
rescue
=>
exception
#swallow exception
end
end
end
#remove the file and directory list
File
.
unlink
"meta/
#{
pkgName
}
.filelist"
File
.
unlink
"meta/
#{
pkgName
}
.directorylist"
#remove the file and directory list
File
.
unlink
"meta/
#{
pkgName
}
.filelist"
File
.
unlink
"meta/
#{
pkgName
}
.directorylist"
end
end
#remove from installed packages
...
...
This diff is collapsed.
Click to expand it.
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