summaryrefslogtreecommitdiff
path: root/dpkg-split/queue.c
AgeCommit message (Collapse)AuthorFilesLines
2013-12-07Use https:// URLs instead of http:// when possibleGuillem Jover1-1/+1
2013-12-07dpkg-split: Get rid of global partqueue queue variableGuillem Jover1-9/+17
Change scandepot() to return the queue, and discard_parts() to take it as argument.
2013-12-07dpkg-split: Rename discard symbolsGuillem Jover1-6/+13
Use underscores to split symbol names, and rename discardsome() to discard_parts().
2013-12-07dpkg-split: Make scandepot() staticGuillem Jover1-1/+3
2013-04-14Avoid assignments in C conditionalsGuillem Jover1-1/+2
2012-06-30libdpkg: Switch buffer I/O code to use struct dpkg_errorGuillem Jover1-1/+4
As a side effect this mkes the messages more clear as the caller has more context to describe the error conditions. Closes: #621763
2012-05-23Check parsed integers for out of range errorsGuillem Jover1-3/+5
Verify that the numbers are not out of the range; i.e. that no negative values are allowed if not appropriate, and that no overflows occur. Closes: #580038
2012-04-09Switch deb format version handling to use the new deb-version moduleGuillem Jover1-1/+5
This simplifies the parsing and checking and avoids having to treat the format versions as floats, which can cause parse errors depending on the locale (this only affected the old deb format).
2012-04-01Use cmp() == 0 instead of !cmp()Guillem Jover1-1/+1
2011-09-18dpkg-split: Do not include trailing slash in PARTSDIRGuillem Jover1-5/+4
2011-07-07libdpkg: Rename myopt module to optionsGuillem Jover1-1/+1
2011-04-23dpkg-split: Generate filenames following current conventions on --joinGuillem Jover1-0/+1
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: 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-02Make all command line action functions return intGuillem Jover1-4/+16
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 Jover1-4/+5
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 Jover1-1/+2
This will allow parsing large numbers, required for large file support.
2011-03-14dpkg-split: Do not slurp into memory the whole package partsGuillem Jover1-19/+17
Use buffered I/O when reassembling split packages. This will make possible to handle parts > 2 GiB on 32 bit systems.
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-08dpkg-split: Reduce scope of variablesGuillem Jover1-11/+17
2010-11-19Cleanup white spacesGuillem Jover1-1/+1
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 Jover1-13/+14
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-07-11dpkg-split: Namespace global option variables to not shadow local onesGuillem Jover1-12/+14
2010-05-19Use bool instead of int wherever appropriateGuillem Jover1-7/+19
2010-03-12Do an fsync on database directoriesGuillem Jover1-0/+2
After creating, renaming or unlinking database files sync its containing directory, to guarantee the new file entry is correctly listed in the directory. Closes: #567089 Base-on-patch-by: Jean-Baptiste Lallement <jeanbaptiste.lallement@gmail.com>
2010-03-06Do an fsync on files written to diskGuillem Jover1-0/+4
This guarantees the file contents will be there in case of abrupt program termination (due to crashes for example, or user intervention). This also guarantees the atomicity of rename(2) calls. Closes: #430958 Based-on-patch-by: Jean-Baptiste Lallement <jeanbaptiste.lallement@gmail.com>
2009-11-09dpkg-split: Fix a directory stream leakRaphael Geissert1-0/+1
2009-11-08Unify text in license headersGuillem Jover1-5/+5
Add a missing “of the License” after “version 2”. Move “but” and “GNU” at the end of line to the next line. This matches more closely the paragraph found in the license text for the GPL version 2.
2009-11-08Replace FSF address by pointing to the gnu.org URLGuillem Jover1-3/+2
Use the <http://www.gnu.org/licenses/> URL, instead of in most cases the outdated FSF address, which is way more stable, as the latter has changed several times in the past.
2009-10-26Sort order of header includesGuillem Jover1-7/+8
Place first <config.h> and <compat.h>, then all <sys/*.h> sorted by complexity, followed by the rest of the system headers, then <dpkg/*.h> and finally the local "*.h" ones. Move <dpkg/i18n.h> inclusion into libdpkg inclusion block, as the <gettext.h> compatibility header already takes care of including <locale.h> before <libintl.h> on environments were its probamatic. Removed duplicated inclusions.
2009-09-06Use m_output instead of fflush, ferror and werrGuillem Jover1-3/+3
2009-08-13Use MD5HASHLEN instead of literalsGuillem Jover1-5/+7
2009-07-15Disable default automake preprocessor include pathsGuillem Jover1-3/+4
Tell automake not to add “-I.” to the preprocessor flags, to avoid file collisions with system headers. Re-add the path where config.h is located. Namespace and use bracketed file inclusions for libdpkg headers, and use quoted inclusions for program headers.
2009-07-15libdpkg: Rename dpkg-i18n.h to i18n.hGuillem Jover1-1/+1
2009-06-19Use NUL character instead of 0Guillem Jover1-1/+2
2008-12-09Mark strings for translationGuillem Jover1-1/+1
2008-12-09Improve internerr output messages and print the invalid valueGuillem Jover1-1/+2
2008-09-14libdpkg: Move myopt from standard_startup to each program mainGuillem Jover1-0/+1
2008-09-14libcompat: Add new compat.h headerGuillem Jover1-0/+1
2008-09-14libdpkg: Move gettext related definitions to a new dpkg-i18n.hGuillem Jover1-0/+2
2008-06-30Switch to use UTF-8 copyright symbol and add missing onesGuillem Jover1-1/+1
Some 'Copyright <year>' entries didn't have a copyright symbol. Add it and switch the rest from '(C)' to '©', but we don't do this on program output which for now should remain pure ascii.
2008-05-24Coalesce similar badusage() strings for translationGuillem Jover1-1/+2
2008-01-16Use NULL instead of 0Guillem Jover1-1/+2
2008-01-07Fix signed vs unsigned value comparisonsGuillem Jover1-3/+3
Those were making some code to never be executed. This fixes most of the bugs introduced with commit ea93ed48c17445d01b67f3fa8a20a5a644a89e5b.
2005-03-11dpkg (1.13.1.0.1) experimental; urgency=lowScott James Remnant1-0/+275
* Bin-MU; recompile against Debian unstable, to make dselect actually installable. -- Scott James Remnant <scott@netsplit.com> Fri, 11 Mar 2005 09:00:14 +0000