summaryrefslogtreecommitdiff
path: root/src/select.c
AgeCommit message (Collapse)AuthorFilesLines
2019-10-12dpkg: Do not clear selections for unknown packagesGuillem Jover1-1/+1
We should not clear the selections for packages that are not already installed in the system, as they will end up disappearing on the next operation anyway. Closes: #927752
2019-01-22libdpkg: Rename pkg_db symbols to pkg_hashGuillem Jover1-5/+5
These are handling a package hash, and db seems to imply some kind of on-disk storage. Rename the pkgiterator too to pkg_hash_iter to make it consistent.
2018-08-30libdpkg: Move db-fsys code from src to lib/dpkgGuillem Jover1-1/+1
This will prepare the ground for external programs to start using libdpkg to access the dpkg fsys database via a proper API, instead of messing with the on-disk layout in so many improper ways.
2018-05-04libdpkg: Move control database code into db-ctrl modulesGuillem Jover1-1/+1
This continues the work to generalize and make these interfaces available to other users beside dpkg itself.
2018-02-19dpkg: Increment the line number on --set-selections on unknown packagesGuillem Jover1-0/+1
When the package is not known, we do an early skip to the next loop iteration, but forgot to increment the line number, which means that these will be off. Closes: #888983 Reported-by: Heinz Repp <heinz.repp@arcor.de>
2016-10-30dpkg: Give more information on --set-selections warningsGuillem Jover1-2/+3
Mention that the package cannot be found on the status nor available database, and that to the FAQ. Closes: #842230
2016-10-30dpkg: Shutdown the modstatdb in --get-selectionsGuillem Jover1-0/+2
Otherwise we'll crash in commandfd.
2016-02-27libdpkg, dpkg: Rename iterators from ‘it’ to ‘iter’Guillem Jover1-4/+4
2015-10-18Update Ian Jackson's email addressGuillem Jover1-1/+1
2015-04-18debian: Update my copyright yearsGuillem Jover1-1/+1
2015-03-31Expand EOF and eof into "end of file" in error messagesGuillem Jover1-2/+4
2015-01-28Switch code to use the new C locale character type functionsGuillem Jover1-6/+10
2014-10-12dpkg: Do not write the database when changing selections with --dry-runGuillem Jover1-2/+15
Closes: #764673
2014-06-02libdpkg: Uppercase and namespace pkgstatus enum valuesGuillem Jover1-1/+2
2014-06-02libdpkg: Uppercase and namespace pkgwant enum valuesGuillem Jover1-2/+3
2014-05-28libdpkg: Uppercase and reword pkg_spec_flags enum valuesGuillem Jover1-1/+1
2014-05-19libdpkg, dpkg: Use new status to names mapping functionsGuillem Jover1-2/+2
This gets rid of the need to export the statusinfos and wantinfos variables from libdpkg.
2013-12-07Use https:// URLs instead of http:// when possibleGuillem Jover1-1/+1
2013-06-24dpkg: Clarify that --set-selections needs an up-to-date available dbGuillem Jover1-0/+6
Document this in the man page, and warn whenever we find unknown packages during the --set-selections processing. Closes: #703092
2012-06-30Switch to new notice() output functionGuillem Jover1-1/+1
This switches all ad-hoc stderr printing for error notices to the notice() function.
2012-03-19dpkg: Only allow setting selections for known packagesGuillem Jover1-0/+6
2012-03-19dpkg: Upgrade the database automatically to the new multi-arch layoutGuillem Jover1-0/+3
The upgrade is scheduled by explicit calls to pkg_infodb_upgrade() if the current database format version is less than the latest supported format or if the previous upgrade was interrupted. The upgrade goes as follows: - link all old files to their new names. - set <admindir>/info/format-new to 1. - remove all old files. - rename <admindir>/info/format-new to <admindir>/info/format. In case of abrupt interruption, the presence of <admindir>/info/format-new means the upgrade is not yet completed and it needs to be retried. In case of clean interruption with rollback, that file is removed after the old layout has been restored. Based-on-patch-by: Raphaël Hertzog <hertzog@debian.org> Patch-sponsored-by: Linaro Limited Designed-by: Guillem Jover <guillem@debian.org> Signed-off-by: Guillem Jover <guillem@debian.org>
2012-03-14dpkg: Update output commands to print package specifiersRaphaël Hertzog1-3/+4
This affects --audit, --yet-to-unpack and --get-selections. Sponsored-by: Linaro Limited [guillem@debian.org: - Adapt to new pkg_name API. - Only arch-qualify when unambiguous. ] Signed-off-by: Guillem Jover <guillem@debian.org>
2012-03-14dpkg: Update commands and options to accept package specifiersGuillem Jover1-5/+17
This affects --ignore-depends, --configure, --remove, --purge, --triggers-only, --get-selections and --set-selections. Based-on-patch-by: Raphaël Hertzog <hertzog@debian.org> Patch-sponsored-by: Linaro Limited Signed-off-by: Guillem Jover <guillem@debian.org>
2012-03-13libdpkg: Change pkg_sorter_by_name() to pkg_sorter_by_nonambig_name_arch()Guillem Jover1-1/+1
The reworked function takes into account the architecture while comparing the packages, if that would make the package name output ambiguous. Based-on-patch-by: Raphaël Hertzog <hertzog@debian.org> Patch-sponsored-by: Linaro Limited Signed-off-by: Guillem Jover <guillem@debian.org>
2012-03-13libdpkg: Move pkg_sorter_by_name() from pkg module to pkg-showGuillem Jover1-0/+1
The function is being used for showing purposes.
2012-02-18Use new package status setters instead of direct assignmentsGuillem Jover1-2/+3
This does not apply for package constructors.
2011-12-08libdpkg: Remove unused end pointer argument from pkg_name_is_illegal()Guillem Jover1-1/+1
2011-11-14Replace all pkg_db_iter_next() calls with pkg_db_iter_next_pkg()Raphaël Hertzog1-1/+1
Sponsored-by: Linaro Limited Signed-off-by: Guillem Jover <guillem@debian.org>
2011-10-27Switch from pkginfo->name to pkginfo->set->nameGuillem Jover1-3/+9
Remove now unused struct pkginfo name member.
2011-07-07libdpkg: Rename myopt module to optionsGuillem Jover1-1/+1
2011-04-02Make all command line action functions return intGuillem Jover1-3/+14
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-14Do not pass admindir to database initialization functionsGuillem Jover1-3/+3
Use dpkg_db_get_dir() and dpkg_db_get_path() to globally retrieve the database directory instead of passing it around.
2011-03-14libdpkg: Rename modstatdb_init() to modstatdb_open()Guillem Jover1-3/+3
We'll need to reuse the modstatdb_init() function name for further refactoring.
2011-03-14Do not write the available file unnecessarilyGuillem Jover1-1/+1
Some times we need to write back the status file, but not the available file. Add a new flag to handle those cases. Based-on-patch-by: Michel Lespinasse <walken@zoy.org>
2011-03-14Do not read the available file unnecessarilyGuillem Jover1-2/+2
For commands that only make use of information from the status file, there's no need to make them read and parse the available file. This change does not alter the current behaviour, and commands that were previously updating the available file will continue doing so. Removing further access to it is pending a decision on how to treat globally the available file, which needs interaction with the package manager frontend developers. Closes: #397121 Based-on-patch-by: Michel Lespinasse <walken@zoy.org>
2011-03-14Switch the logic from msdbrw_noavail to msdbrw_availableGuillem Jover1-3/+3
2011-03-02Rename namevalue variables to nv and nv_headGuillem Jover1-4/+4
2011-03-02Use varbuf_end_str() instead of ad-hoc varbuf_add_char() callsGuillem Jover1-2/+2
This allows the strings to be terminated, thus printable or accessed through the standard C string functions, and at the same time appendable.
2011-03-02dpkg: Move varbuf related calls close together in setselections()Guillem Jover1-4/+8
It's easier to read if the varbuf calls affecting the same variable are close together, rather than dispersed around in the code.
2011-01-16libdpkg: Rename varbufaddc() to varbuf_add_char()Guillem Jover1-4/+4
Make the varbuf API a bit more consistent.
2011-01-16libdpkg: Rename varbufreset() to varbuf_reset()Guillem Jover1-2/+2
Make the varbuf API a bit more consistent.
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-19Use new namevalue_find_by_name function instead of ad-hoc codeGuillem Jover1-2/+4
2010-11-19libdpkg: Rename illegal_packagename to pkg_name_is_illegalGuillem Jover1-1/+1
2010-11-19libdpkg: Namespace package database functions with pkg_db_ prefixGuillem Jover1-4/+4
2010-01-28libdpkg: Rename varbuffree to varbuf_destroyGuillem Jover1-2/+2
The convention is for functions named free to deallocate the contents and the given pointer, while this one only deallocates the contents, so we rename it to make this distinction clear.
2010-01-28libdpkg: Rename pkg_array_free to pkg_array_destroyGuillem Jover1-1/+1
The convention is for functions named _free to deallocate the contents and the given pointer, while this one only deallocates the contents, so we rename it to make this distinction clear.
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.