summaryrefslogtreecommitdiff
path: root/dpkg-split
AgeCommit message (Collapse)AuthorFilesLines
2012-03-27Mark enum and struct member comments as doxygen descriptionsGuillem Jover1-2/+2
2012-02-01Move copyright information from --version output to file comment headersGuillem Jover1-2/+2
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.
2011-09-18libdpkg: Refactor path basename code into new path_basename functionGuillem Jover1-5/+3
This function is an equivalent of the GNU basename, but this one will work consistently on any system regardless of libc used.
2011-09-18dpkg-split: Do not include trailing slash in PARTSDIRGuillem Jover3-16/+5
2011-09-09libdpkg: Rename fd_null_copy() to fd_skip()Guillem Jover1-1/+1
2011-07-07libdpkg: Rename myopt module to optionsGuillem Jover5-5/+5
2011-07-07Use new dpkg_set_progname and dpkg_get_progname instead of thisnameGuillem Jover1-1/+1
The current implementation demanded libdpkg users to define thisname themselves, which is not really a nice interface to offer to programs. Closes: #631757
2011-07-07libdpkg: Do not require programs to define printforhelpGuillem Jover1-2/+2
Instead define it in myopt.c and initialize it through a new argument to myopt().
2011-04-29Clarify exit status in dpkg-split and start-stop-daemon --help outputGuillem Jover1-3/+8
2011-04-23dpkg-split: Generate filenames following current conventions on --joinGuillem Jover6-5/+21
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.
2011-04-15dpkg-split: Correctly set the last part split sizeGuillem Jover1-4/+6
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.
2011-04-15dpkg-split: Fix --auto to not fail when opening the new depot fileGuillem Jover1-1/+1
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.
2011-04-02Rename struct cmdinfo member arg_func to action and call it directlyGuillem Jover1-3/+2
This avoids a temporary variable, given that now the function is strongly prototyped.
2011-04-02Use new action_func typedef instead of ad-hoc function castsGuillem Jover2-5/+8
2011-04-02Make all command line action functions return intGuillem Jover6-12/+34
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.
2011-03-14dpkg-split: fix a gcc warningRaphaël Hertzog1-2/+2
The refactoring made in commit 86cbf575b13d049504402f72d221fa1538c2e53b was supposed to add the cast for the argument matching the %jx specifier (and not %s).
2011-03-14dpkg-split: Fix typoSven Joachim1-1/+1
2011-03-14Use off_t and %jd or %jx to handle file sizes and offsetsGuillem Jover5-26/+29
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.
2011-03-14dpkg-split: Make decompose_filename() and setpartsize() use strtoimax()Guillem Jover2-2/+4
This will allow parsing large numbers, required for large file support.
2011-03-14dpkg-split: Replace unsignedlong() with parse_intmax()Guillem Jover1-8/+12
2011-03-14dpkg-split: Use a constant expression to declare an arrayGuillem Jover1-1/+1
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.
2011-03-14Inline rerr() into its only current call siteGuillem Jover3-6/+4
2011-03-14dpkg-split: Do not slurp into memory the whole package partsGuillem Jover2-47/+34
Use buffered I/O when reassembling split packages. This will make possible to handle parts > 2 GiB on 32 bit systems.
2011-03-02Use varbuf_end_str() instead of ad-hoc varbuf_add_char() callsGuillem Jover1-1/+1
This allows the strings to be terminated, thus printable or accessed through the standard C string functions, and at the same time appendable.
2011-02-11libdpkg: Rename cmdinfo arg membersGuillem Jover1-1/+1
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).
2011-01-16build: Do not set MKSPLITSCRIPT CPP macroGuillem Jover1-1/+1
Not needed anymore since the rewrite in C of mksplit. Missed in commit f2115151c19ff37b305296c23225807b0832086b.
2011-01-16Use m_asprintf() instead varbuf_printf() for one-off stringsGuillem Jover1-6/+5
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.
2011-01-16Use m_asprintf() instead of nfmalloc() and string operationsGuillem Jover1-5/+6
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.
2011-01-16libdpkg: Rename varbufprintf() to varbuf_printf()Guillem Jover1-10/+10
Make the varbuf API a bit more consistent.
2011-01-16libdpkg: Rename varbufaddc() to varbuf_add_char()Guillem Jover1-1/+1
Make the varbuf API a bit more consistent.
2011-01-16libdpkg: Rename varbufreset() to varbuf_reset()Guillem Jover1-4/+4
Make the varbuf API a bit more consistent.
2011-01-08dpkg-split: Reduce scope of variablesGuillem Jover2-16/+24
2011-01-08Remove unneeded <errno.h> includeGuillem Jover1-1/+0
2011-01-08dpkg-split: Do not slurp the entire part into memory when splittingGuillem Jover1-12/+9
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.
2011-01-08dpkg-split: Do not pass partsize to mksplit() and compute it internallyGuillem Jover1-5/+5
2011-01-08dpkg-split: Mark strings for translationGuillem Jover1-4/+6
Use plural support for one of them.
2011-01-08dpkg-split: Use number of parts to track split processGuillem Jover1-5/+1
Use the currently available variables instead of the additional useless startat.
2011-01-08dpkg-split: Reduce variable scope in do_split()Guillem Jover1-2/+3
2011-01-08Use dpkg_ar_member_get_size() instead of duplicated codeGuillem Jover1-18/+2
2011-01-06Merge commit '1.15.8.8'Raphaël Hertzog1-1/+1
2011-01-06dpkg-split: Truncate the output file when splitting a packageGuillem Jover1-1/+1
Use creat() instead of open() with the missing O_TRUNC. Regression introduced in f2115151c19ff37b305296c23225807b0832086b.
2010-11-19Cleanup white spacesGuillem Jover4-14/+13
Remove trailing spaces. Remove blank lines not separating different code blocks. Remove blank lines at the end of the file.
2010-11-19Cleanup and improve source code commentsGuillem Jover3-21/+27
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. */
2010-11-19Use push_error_context() instead of ad-hoc codeGuillem Jover1-2/+1
2010-11-19Move action and obsolete related functionality to the myopt moduleGuillem Jover2-14/+0
Reduce repeated code, and localize it where it belongs.
2010-11-19Use ACTION macros instead of ad-hoc action function handlingGuillem Jover2-21/+11
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().
2010-11-02Unify execution error stringsGuillem Jover1-3/+4
2010-11-02Clarify several archive member stringsGuillem Jover1-12/+13
This will make translators and users life easier, as the new strings are less ambiguous, and try to avoid second meanings.
2010-08-26Add gettext messages for plural formsGuillem Jover1-1/+3
Some of the singular forms are not currently used, but we keep them for consistency, and to avoid confusing translators. Closes: #594218
2010-07-11dpkg-split: Namespace global option variables to not shadow local onesGuillem Jover5-33/+41