Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Nix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nora Puchreiner
Nix
Commits
99ed558a
Commit
99ed558a
authored
12 years ago
by
Eelco Dolstra
Browse files
Options
Downloads
Patches
Plain Diff
Correctly handle missing logs
parent
1943b60a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/nix-store/nix-store.cc
+3
-1
3 additions, 1 deletion
src/nix-store/nix-store.cc
with
3 additions
and
1 deletion
src/nix-store/nix-store.cc
+
3
−
1
View file @
99ed558a
...
@@ -460,7 +460,7 @@ static void opReadLog(Strings opFlags, Strings opArgs)
...
@@ -460,7 +460,7 @@ static void opReadLog(Strings opFlags, Strings opArgs)
foreach
(
Strings
::
iterator
,
i
,
opArgs
)
{
foreach
(
Strings
::
iterator
,
i
,
opArgs
)
{
Path
path
=
useDeriver
(
followLinksToStorePath
(
*
i
));
Path
path
=
useDeriver
(
followLinksToStorePath
(
*
i
));
for
(
int
j
=
0
;
j
<
2
;
j
++
)
{
for
(
int
j
=
0
;
j
<
=
2
;
j
++
)
{
if
(
j
==
2
)
throw
Error
(
format
(
"build log of derivation `%1%' is not available"
)
%
path
);
if
(
j
==
2
)
throw
Error
(
format
(
"build log of derivation `%1%' is not available"
)
%
path
);
string
baseName
=
baseNameOf
(
path
);
string
baseName
=
baseNameOf
(
path
);
...
@@ -474,6 +474,7 @@ static void opReadLog(Strings opFlags, Strings opArgs)
...
@@ -474,6 +474,7 @@ static void opReadLog(Strings opFlags, Strings opArgs)
/* !!! Make this run in O(1) memory. */
/* !!! Make this run in O(1) memory. */
string
log
=
readFile
(
logPath
);
string
log
=
readFile
(
logPath
);
writeFull
(
STDOUT_FILENO
,
(
const
unsigned
char
*
)
log
.
data
(),
log
.
size
());
writeFull
(
STDOUT_FILENO
,
(
const
unsigned
char
*
)
log
.
data
(),
log
.
size
());
break
;
}
}
else
if
(
pathExists
(
logBz2Path
))
{
else
if
(
pathExists
(
logBz2Path
))
{
...
@@ -492,6 +493,7 @@ static void opReadLog(Strings opFlags, Strings opArgs)
...
@@ -492,6 +493,7 @@ static void opReadLog(Strings opFlags, Strings opArgs)
writeFull
(
STDOUT_FILENO
,
buf
,
n
);
writeFull
(
STDOUT_FILENO
,
buf
,
n
);
}
while
(
err
!=
BZ_STREAM_END
);
}
while
(
err
!=
BZ_STREAM_END
);
BZ2_bzReadClose
(
&
err
,
bz
);
BZ2_bzReadClose
(
&
err
,
bz
);
break
;
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment