Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
T
tails
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
Tails
tails
Commits
e91536a9
Commit
e91536a9
authored
May 09, 2012
by
Tails developers
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bugfix/boot-profile_vs_live-rofs' into devel
parents
341c267b
443405b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
config/chroot_local-includes/usr/local/sbin/boot-profile
config/chroot_local-includes/usr/local/sbin/boot-profile
+9
-0
No files found.
config/chroot_local-includes/usr/local/sbin/boot-profile
View file @
e91536a9
...
...
@@ -11,6 +11,9 @@ import os.path
# Ignore files matching this regular expression
IGNORE_RE
=
"^/(tmp|sys|proc|dev|live/cow)"
# Remove the following prefix (except the last /) from all paths
IGNORE_PREFIX
=
"/live/rofs/filesystem.squashfs/"
class
ProfileProcessor
(
ProcessEvent
):
def
__init__
(
self
,
profile_path
):
self
.
priority
=
32767
...
...
@@ -24,11 +27,15 @@ class ProfileProcessor(ProcessEvent):
# Skip path with white spaces: mksquashfs -sort does not
# handle them! fscanf(fd, "%s %d", ...)
return
if
path
.
startswith
(
IGNORE_PREFIX
):
path
=
path
[
len
(
IGNORE_PREFIX
)
-
1
:]
if
not
self
.
files
.
has_key
(
path
):
self
.
files
[
path
]
=
self
.
priority
self
.
priority
-=
1
def
ignore_file
(
self
,
path
):
if
path
.
startswith
(
IGNORE_PREFIX
):
path
=
path
[
len
(
IGNORE_PREFIX
)
-
1
:]
self
.
ignored_files
[
path
]
=
None
def
process_IN_OPEN
(
self
,
event
):
...
...
@@ -45,6 +52,8 @@ class ProfileProcessor(ProcessEvent):
self
.
ignore_file
(
event
.
pathname
)
def
is_excluded
(
self
,
path
):
if
path
.
startswith
(
IGNORE_PREFIX
):
path
=
path
[
len
(
IGNORE_PREFIX
)
-
1
:]
return
self
.
ignore_re
.
match
(
path
)
def
end_profiling
(
self
):
...
...
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