Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dpkg
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
Dpkg Developers
dpkg
Commits
d26b9812
Commit
d26b9812
authored
Jun 13, 2012
by
Raphaël Hertzog
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dpkg::Source::Patch: let analyze() extract the patch header too
parent
5b9489da
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
scripts/Dpkg/Source/Patch.pm
scripts/Dpkg/Source/Patch.pm
+8
-1
No files found.
scripts/Dpkg/Source/Patch.pm
View file @
d26b9812
...
...
@@ -319,6 +319,7 @@ sub analyze {
my
%
filepatched
;
my
%
dirtocreate
;
my
@patchorder
;
my
$patch_header
=
'';
my
$diff_count
=
0
;
sub
getline
{
...
...
@@ -375,7 +376,12 @@ sub analyze {
while
(
defined
(
$_
)
||
not
eof
(
$self
))
{
my
(
%
path
,
%
fn
);
# skip comments leading up to patch (if any)
until
(
/^--- /
)
{
while
(
1
)
{
if
(
/^--- /
)
{
last
;
}
else
{
$patch_header
.=
"
$_
\n
";
}
last
HUNK
if
not
defined
(
$_
=
getline
(
$self
));
}
$diff_count
++
;
...
...
@@ -492,6 +498,7 @@ sub analyze {
*
$self
->
{'
analysis
'}{
$destdir
}{"
dirtocreate
"}
=
\%
dirtocreate
;
*
$self
->
{'
analysis
'}{
$destdir
}{"
filepatched
"}
=
\%
filepatched
;
*
$self
->
{'
analysis
'}{
$destdir
}{"
patchorder
"}
=
\
@patchorder
;
*
$self
->
{'
analysis
'}{
$destdir
}{"
patchheader
"}
=
$patch_header
;
return
*
$self
->
{'
analysis
'}{
$destdir
};
}
...
...
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