| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Beside being a bit cleaner it hopefully also resolves oddball problems
I have with high levels of parallel jobs.
Git-Dch: Ignore
Reported-By: iwyu (include-what-you-use)
|
|
|
|
|
| |
Git-Dch: Ignore
Reported-By: gcc -Wuseless-cast
|
|
|
|
|
| |
Git-Dch: Ignore
Reported-By: gcc -Wcast-qual
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 6008b79adf1d7ea5607fab87a355d664c8725026 should have been guarded
by "Git-Dch: Ignore", but it wasn't and I only noticed it with the Close
message via deity thinking "hehe, I wonder if someone is gonna notice".
Looks like someone did: hats off to reddit user itisOmegakai!
Good to know that what I do isn't only monitored by goverments. :)
As there is another instance of basically the same code we just factor
out the code a bit and reuse, so its even cleaner and not only simpler.
Reported-By: scan-build
|
|
|
|
|
|
|
|
| |
Does the same as before, but is a bit simpler on the logic for humans as
well as compilers. scan-build complained about it at least with:
"Result of operation is garbage or undefined"
Reported-By: scan-build
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
apt-private/private-list.cc
doc/po/de.po
test/integration/framework
|
| |
| |
| |
| |
| |
| |
| |
| | |
The most "visible" change is from utime to utimensat/futimens
as the first one isn't part of POSIX anymore.
Reported-By: cppcheck
Git-Dch: Ignore
|
|\ \
| |/
|/|
| | |
debian/experimental-no-abi-break
|
| |
| |
| |
| |
| |
| |
| | |
run-parts doesn't allow this char in valid filenames, but we tend to
have files with this character in e.g. /var/lib/apt/lists/
Git-Dch: Ignore
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
| |
Calling truncate on /dev/null can happen by the download methods if they
are instructed to download a file to /dev/null (as testcases are only
interested in the status code, but do not support HEAD requests yet)
So just ignore truncate calls on the /dev/null file as it is always
empty anyway, so truncating to zero isn't a problem.
Git-Dch: Ignore
|
| |
|
| |
|
|
|
|
| |
APT::Keep-Fds hack and also add a new PackageManagerProgressFd::StartDpkg() progress state
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
FileFd currently supports no fileflags which would make sense to provide
via mkostemp, so we can just use mkstemp here which is a standard
function compared to glib extension mkostemp.
O_CREAT (Create) and O_TRUNC (Empty) are implied by O_EXCL, which is the
mode mkstemp uses by default. The file description is opened ReadWrite,
but that used to be the default for FileFd in the old times and not a
problem as the difference is needed by FileFd to decide in which way the
compressor pipeline needs to be created (if any).
Git-Dch: Ignore
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid the warning "the use of `mktemp' is dangerous,
better use `mkstemp' or `mkdtemp'". It is not strictly necessary to
change the usage from a security point of view here, but mktemp is
also removed from the standard since POSIX.1-2008.
The mkostemp call returns a file descriptor the logic for
TemporaryFileName has been changed accordingly to get the same results.
The file permissions are corrected by using fchmod() as the default for
FileFd is 666 while mkstemp creates files with 600 by default.
|
|
|
|
|
|
|
| |
The fix avoid the warning "comparison between signed and
unsigned integer expressions [-Wsign-compare]"· The index for the loop needs
to be unsigned for compare with globbuf.gl_pathc structure
member
|
|
|
|
|
|
|
| |
- add Glob() to fileutl.{cc,h}
Conflicts:
apt-pkg/contrib/fileutl.h
debian/changelog
|
|\ |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
| |
Testing for global PendingErrors in users of CopyFile is incorrect
in so far as unrelated errors will prevent us from copying perfectly
fine files and checking for the validity of the files is just better
in CopyFiles as it already checks if files are at least opened.
Add also a higher-level error message to the error stack if it fails.
|
|
|
|
|
|
|
|
|
| |
OpenInternDescriptor failures would cause additional errors to be
generated by double-closing an fd. Other errors (although these
are generated if the method is used incorrectly, so unlikely)
didn't close the fd aswell.
Closes: 704608
|
|
|
|
|
|
| |
Previously some errors would set the Fail flag while some didn't
without a clear reason as all errors leave a bad FileFd behind,
so we use a helper now to ensure that all errors set the flag.
|
| |
|
| |
|
|
|
|
| |
- remove _POSIX_SYNCHRONIZED_IO guard in FileFd::Sync() around fsync
as this guard is only needed for fdatasync and not defined on hurd
|
|
|
|
| |
- dup() given compressed fd in OpenDescriptor if AutoClose
is disabled as otherwise gzclose() and co will close it
|
|
|
|
| |
- ensure that we close compressed fds, wait for forks and such even if
the FileFd itself is set to not autoclose the given Fd
|
| |
|
| |
|
| |
|
|
|
|
| |
content as this causes some "interesting" hickups resulting in segfaults
as it seems (Closes: #554387, #670979)
|
|
|
| |
- check that the fd which are closed are valid
|
|
|
| |
- redirect stderr from compressors to /dev/null
|
| |
|
|
|
|
|
|
|
|
| |
- remove the libz-dev alternative from zlib1g-dev build-dependency
- do the same for bz2 builtin if available
* apt-pkg/contrib/fileutl.cc:
- use libz2 library for (de)compression instead of the bzip2 binary as
the first is a dependency of dpkg and the later just priority:optional
so we gain 'easier' access to bz2-compressed Translation files this way
|
| |
|
|
|
|
|
| |
compatible with users accessing it directly, but this prepares for a drop
of this strict requirement in the future
|
|
|
| |
- do not warn about the ignoring of directories (Closes: #662762)
|
|
|
| |
- clean up lost atomic cachefiles with 'clean' (Closes: #650513)
|
| |
|
|
|
|
|
|
|
|
|
| |
- store the offset in the internal fd before calculate size of
the zlib-handled file to jump back to this place again
It jumped back to the position of the content - which is wrong as
the internal fd is compressed and even reseting to the beginning of
the file doesn't work as zlib uses an internal buffer, so while we
might haven't read anything yet zlib might have done so already…
|
| |
|