Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Having to keep this information twice is error-prone as it easily gets
out of sync. Having to translate it is bothersome. It's not consistent
across dpkg tools, some do print it some don't. It's currently not
accurate, as the output would need to include the holders for all files
that end up being part of the binary. And listing it in the --versions
output is visually annoying and the wrong place.
Just keep this where it belongs, at the file comment headers, above the
license information.
|
|
This function is an equivalent of the GNU basename, but this one will
work consistently on any system regardless of libc used.
|
|
|
|
|
|
|
|
The current implementation demanded libdpkg users to define thisname
themselves, which is not really a nice interface to offer to programs.
Closes: #631757
|
|
Instead define it in myopt.c and initialize it through a new argument to
myopt().
|
|
|
|
Keep the architecture in the debian-split member of the part file so
that we can reuse it when putting back together the joined binary
package. Use underscores to separate each filename part.
|
|
The partsize for each part should be the same, the code was wrongly
setting the partsize to the real size of the data being written.
Regression introduced in commit 506dd27b56a570e019e90974ea285fe4fd2f8bf8.
|
|
The code was wrongly checking for non-zero file descriptors returned
from creat(2), which was making it always fail.
Regression introduced in commit 102aef24e438b7aba9cf90ab9fc75d3c13c6c7cf.
|
|
This avoids a temporary variable, given that now the function is
strongly prototyped.
|
|
|
|
This will allow using type-safe function pointers instead of casting
them around. Replace all exit(3) calls with return statements. Remove
DPKG_ATTR_NORET from function declarations, all functions are expected
to return now.
|
|
The refactoring made in commit 86cbf575b13d049504402f72d221fa1538c2e53b
was supposed to add the cast for the argument matching
the %jx specifier (and not %s).
|
|
|
|
This allows to support large files on 32-bit systems were a ‘long int’
type might not be of at least 64-bits. For printing %jd or %jx is used,
and the value is cast to intmax_t.
|
|
This will allow parsing large numbers, required for large file support.
|
|
|
|
Although usually the compiler should replace strlen(literal) with a
built-in, it might not, and it's more predictable to use a constant
expression using sizeof() instead to avoid making it a variable
length array. This fixes a warning with latest gcc and -Wvla.
|
|
|
|
Use buffered I/O when reassembling split packages. This will make
possible to handle parts > 2 GiB on 32 bit systems.
|
|
This allows the strings to be terminated, thus printable or accessed
through the standard C string functions, and at the same time
appendable.
|
|
The current names are not descriptive enough, so rename parg to arg_ptr,
farg to arg_func, and finally arg to arg_int (which disambiguates what
kind of data it's holding).
|
|
Not needed anymore since the rewrite in C of mksplit.
Missed in commit f2115151c19ff37b305296c23225807b0832086b.
|
|
When the string is only created once, used several times and then
freed, there's no much point in using a varbuf instead of the simpler
m_asprintf(). The former needs more state and makes using the string
slightly more cumbersome. Using m_asprintf() should be slightly faster
too, but not significantly enough to justify this change by itself.
|
|
This avoid the need to know the resulting string length beforehand, and
makes sure it's always going to get the right size. It also makes the
code way clearer.
Usage of nfmalloc() here was not appropriate anyway, as the variables
are only of temporary use, so switching to normal allocation gives
a side-effect “bug” fix.
|
|
Make the varbuf API a bit more consistent.
|
|
Make the varbuf API a bit more consistent.
|
|
Make the varbuf API a bit more consistent.
|
|
|
|
|
|
The current code is slurping the entire part into memory, which works
fine when the partsize is small but might be unbearable when the
partsize is too big. Use fd_fd_copy() via dpkg_ar_member_put_file()
instead, which will guarantee small constant memory usage.
|
|
|
|
Use plural support for one of them.
|
|
Use the currently available variables instead of the additional useless
startat.
|
|
|
|
|
|
|
|
Use creat() instead of open() with the missing O_TRUNC.
Regression introduced in f2115151c19ff37b305296c23225807b0832086b.
|
|
Remove trailing spaces. Remove blank lines not separating different code
blocks. Remove blank lines at the end of the file.
|
|
Global review, which includes the following changes to try to increase
consistency, update and improve the source code comments:
- Spelling fixes.
- Use American English forms.
- Uppercase NULL, NUL and ASCII.
- Use “Note: ” instead of the slightly cryptic “NB: ” form.
- Write comments as proper sentences, including capitalizations and
ending dots.
- Move comments before the code, function or variable they refer to.
- Move general function comments outside the body.
- Convert function and variable description comments to doxygen.
- Use one space before dot, exclamation and question marks.
- Use ‘’ or “” instead of `' style quoting.
- Remove author names from comments, already visible from “git blame”.
- Mark strings for translators with “TRANSLATORS: ”.
- Remove useless or outdated comments.
- Fix comment indentation.
- Standardize comment format:
/* Short text comment. */
/* Long text,
* comment. */
/*
* Section text.
*/
|
|
|
|
Reduce repeated code, and localize it where it belongs.
|
|
This makes the code uniform with the rest of the code base, removes
the possibility of mismatched entries from cmdinfos and dofunctions
arrays, and reduces the scope of the action pointer to main().
|
|
|
|
This will make translators and users life easier, as the new strings
are less ambiguous, and try to avoid second meanings.
|
|
Some of the singular forms are not currently used, but we keep them for
consistency, and to avoid confusing translators.
Closes: #594218
|
|
|