summaryrefslogtreecommitdiff
path: root/cmdline
Commit message (Collapse)AuthorAgeFilesLines
* use pkgAcqArchive in 'download' for proper errorsDavid Kalnischkies2013-10-031-45/+35
| | | | | | | With a bit of trickery we can reuse the usual infrastructure we have in place to acquire deb files for the 'download' operation as well, which gains us authentification check & display, error messages, correct filenames and "downloads" from the root-owned archives.
* put fetch errors in 'source' on our errorstackDavid Kalnischkies2013-10-031-22/+6
| | | | | | | | | refactor the fetching process so that it looks more like the others we have in the hope that we can reuse code in the future. This is a soft interface change as 'source' previously printed errors directly on stderr, while it will now push it onto our usual error stack.
* fix vim-style foldmarkerDavid Kalnischkies2013-09-031-6/+2
| | | | Git-Dch: Ignore
* allow pkg manipulation in the upgrade/dist-upgrade commandline, e.g. apt-get ↵Michael Vogt2013-08-271-3/+4
| | | | dist-upgrade 2vcard- 4g8+
* do chdir("/") after chroot()Michael Vogt2013-08-221-2/+2
|
* Merge remote-tracking branch 'mvo/feature/apt-binary2' into debian/sidMichael Vogt2013-08-177-2098/+260
|\ | | | | | | | | Conflicts: cmdline/apt-get.cc
| * squash merge of the feature/apt-binary branch without the changes from ↵Michael Vogt2013-08-127-2095/+260
| | | | | | | | experimental
* | merge patch from Daniel Hartwig to Show a error message if {,dist-}upgrade ↵Michael Vogt2013-08-151-0/+6
|/ | | | | | is used with additional arguments (closes: #705510)
* let apt-key del work better with softlink and single key keyringsDavid Kalnischkies2013-08-121-3/+56
| | | | | | | Having fragement files means there is a good chance that there is one key per keyring, so deal with that as well as with setups in which keyrings are linked into trusted.gpg.d as we can't just modify those files (they might be in /usr for example).
* make the keyring locations in apt-key configurableDavid Kalnischkies2013-08-121-1/+5
| | | | Might come in handy for more than just a simple testcase.
* do not double-slash paths in apt-keyDavid Kalnischkies2013-08-121-1/+6
| | | | Closes: 665411
* use a tmpfile for trustdb.gpg in apt-keyDavid Kalnischkies2013-08-121-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | for some "interesting" reason gpg decides that it needs to update its trustdb.gpg file in a --list-keys command even if right before gpg is asked to --check-trustdb. That wouldn't be as bad if it wouldn't modify the keyring being listed at that moment as well, which generates not only warnings which are not a problem for us, but as the keyring modified can be in /usr it modified files which aren't allowed to be modified. The suggested solution in the bugreport is running --check-trustdb unconditionally in an 'apt-key update' call, but this command will not be used in the future and this could still potentially bite us in net-update or adv calls. All of this just to keep a file around, which we do not need… The commit therefore switches to the use of a temporary created trusted.gpg file for everyone and asks gpg to not try to update the trustdb after its intial creation, which seems to avoid the problem altogether. It is using your also faked secring btw as calling the check-trustdb without a keyring is a lot slower … Closes: #687611 Thanks: Andreas Beckmann for the initial patch!
* always use our own trustdb.gpg in apt-keyDavid Kalnischkies2013-08-121-6/+14
| | | | | | | | | | | | APT doesn't care for the trustdb.gpg, but gnupg requires one even for the simplest commands, so we either use the one root has available in /etc or if we don't have access to it (as only root can read that file) we create a temporary directory to store a trustdb.gpg in it. We can't create just a temporary file as gpg requires the given trustdb.gpg file to be valid (if it exists), so we would have to remove the file before calling gnupg which would allow mktemp (and co) to hand exactly this filename out to another program (unlikely, but still).
* add a not documented apt-key --fakeroot optionDavid Kalnischkies2013-08-121-32/+41
| | | | | | | | Usually, most apt-key commands require root, so the script is checking for being run as root, but in your tests we use a non-root location, so we don't need to be root and therefore need an option to skip the check. Git-Dch: Ignore
* improve error messageMichael Vogt2013-08-121-1/+2
|
* fix -Wall errorsMichael Vogt2013-08-081-1/+2
|
* unset LANGUAGE for showing [Y/n] answer hintsDavid Kalnischkies2013-08-011-3/+32
| | | | | | | | | | | | | | | | | | | | | nl_langinfo is used to acquire the YESEXPR of the language used, but it will return the one from LC_MESSAGES, which might be different from the language chosen for display of the question (based on LANGUAGE) so this commit removes the [Y/n] help text from the questions itself and moves it to the prompt creation in which the usage of LC_MESSAGES is forced for it, so that the helptext shown actually represents the characters accepted as input for the question. There is still room for problems of course starting with an untranslated "[Y/n]" but a translated YESEXPR or the problem that the question is asked in a completely different language which might have a conflicting definition of [Y/n] input or the user simple ignores the helptext and assumes that an answer matching the question language is accepted, but the mayority of users will never have this problem to begin with, so we should be fine (or at least a bit finer than before). Closes nothing really, but should at least help a bit with bugs like deb:194614, deb:471102, lp:1205578, and countless others.
* Merge remote-tracking branch 'mvo/bugfix/coverity' into debian/sidMichael Vogt2013-07-282-6/+8
|\
| * fix some coverity chroot() releated warningsMichael Vogt2013-07-261-2/+2
| |
| * fix potential GetLock() fd leakMichael Vogt2013-07-251-4/+6
| |
* | use FileFd::Write instead of fwrite for errorsDavid Kalnischkies2013-07-261-3/+4
| | | | | | | | | | | | | | Using the static FileFd::Write method gives us error messages for free so we use it here to avoid failing silently (with a fail silent error). Git-Dch: Ignore
* | fix 'apt-cache search' crash with missing descriptionDavid Kalnischkies2013-07-181-11/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Beside the earlier fixed 'apt-cache show', 'showpkg' and 'search' deal with descriptions. 'showpkg' was fixed by fixing the cache generation for 'show', but 'search' still segfaulted. On the upside, it doesn't segfault any longer, on the downside, if a package has no description at all (aka: not in the Packages file and not in a Translation-* file) the package can't be found with 'search', even if we search only by name. That is a shortcoming in the code, but fixing it means rewriting it completely for dubious gain at best. So this commit just skips packages without a description and is done. Closes: 647590
* | skip all Description fields in apt-cache, not just firstDavid Kalnischkies2013-07-181-17/+35
|/ | | | | | | | | | | | | | | | Given a Packages file like: […] Description: foo bar baz moo moo moo Multi-Arch: foreign Description-md5: 97e204a9f4ad8c681dbd54ec7c505251 […] We have to display the Multi-Arch flag field as well as the fields after the Description-md5, but not this field itself, as we already have one printed alongside the Description we display. Closes: 717254
* fix format string errorMichael Vogt2013-07-021-2/+2
|
* "mount path"->"mount point" and also make the warning a error when no CD-ROM ↵Michael Vogt2013-06-261-5/+5
| | | | is found
* Improve the apt-cdrom output when no CD-ROM can be auto-detectedMichael Vogt2013-06-221-6/+19
| | | | (closes: #712433)
* try defaults if auto-detection failed in apt-cdromDavid Kalnischkies2013-06-201-9/+4
| | | | | | | | | | | | The default is to ask udev for location and mountpoints of CD-ROMs, but the old way of specifying the mountpoint is still available and is tried now in case udev doesn't find any CD-ROM. It probably fails, too, but we get a bunch of error messages this way and the user can get an idea of how to make his setup work even if udev can't be convienced to return something useful. Closes: #712433
* handle missing "Description" in apt-cache showDavid Kalnischkies2013-06-201-15/+32
| | | | | | | | | | | | do not blindly assume that all packages stanzas have a "Description:" field in 'apt-cache show' as well as in the cache creation itself. We instead assume now that if the stanza has a Description, it will not be the first field as we look out for "\nDescription" to take care of MD5sum as well as (maybe ignored) translated Descriptions embedded in the package stanza. Closes: #712435
* fix support for multiple patterns in apt-cache searchDavid Kalnischkies2013-06-091-28/+51
| | | | | | | Patterns can appear in the name as well as in the description, they don't have to match all in the name/description only. Closes: 691453
* initialize the whole search array with zeroDavid Kalnischkies2013-06-091-1/+1
| | | | Git-Dch: Ignore
* deprecate InstallProtect as a cpu-eating no-opDavid Kalnischkies2013-06-091-3/+1
| | | | | | | | | | | | In the past packages were flagged "Protected" so that install/ remove markings where issued before the ProblemResolver. Nowadays, the marking methods check if they are allowed to modify the marking of a package instead, so that markings set by FromUser calls are not overwritten anymore by automatic calls which elimates the need for InstallProtect which just eats CPU now. The method itself is left untouched for now in case frontend needs it still for some wierd usecase, but they should be eliminated.
* remove -ldl from cdrom and -lutil from apt-get linkageDavid Kalnischkies2013-06-091-1/+1
| | | | | | | | | | Building src:apt shows: dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/apt/usr/lib/apt/methods/cdrom was not linked against libdl.so.2 (it uses none of the library's symbols) dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/apt/usr/bin/apt-get was not linked against libutil.so.1 (it uses none of the library's symbols)
* cmdline/apt-key: Accept nonexistent --keyring file with adv as wellJohan Kiviniemi2013-05-221-1/+1
|
* cmdline/apt-key: Create new keyrings with mode 0644 instead of 0600Johan Kiviniemi2013-05-221-0/+19
|
* merged bundle from davidMichael Vogt2013-04-081-2/+2
|\
| * various simple changes to fix cppcheck warningsDavid Kalnischkies2013-03-101-2/+2
| |
* | merge patch from Daniel HartwigMichael Vogt2013-03-251-1/+1
|/
* ensure sha512 is really used when available (thanks to Tyler Hicks )Michael Vogt2013-01-141-1/+1
|
* * cmdline/apt-get.cc:David Kalnischkies2012-11-091-3/+3
| | | | - do not call Mark{Install,Delete} from the autoremove code with the FromUser bit set to avoid modifying the auto-installed bit
* adds a comment for Translators to the 'do as I say' prompt toDavid Kalnischkies2012-10-201-1/+3
| | | | prevent problems like #691024 in new translations
* * cmdline/apt-cache.cc:David Kalnischkies2012-09-261-3/+7
| | | | | | - print versioned dependency relations in (r)depends if the option APT::Cache::ShowVersion is true (default: false) as discussed in #218995 to help debian-cd fixing #687949. Thanks to Sam Lidder for initial patch and Steve McIntyre for nagging and testing!
* disable the display of the error messages for DoInstall if DoBuildDepDavid Kalnischkies2012-08-061-1/+1
| | | | is calling the helper (enabled by enforcing failure reporting)
* ensure that the right architecture is used for cross-dependencies inDavid Kalnischkies2012-08-051-11/+22
| | | | cases we have to choose a provider by defaulting on host-arch instead of build-arch
* improve the check for purely virtuals as provided packages aren'tDavid Kalnischkies2012-08-041-1/+1
| | | | purely virtual and shouldn't error out cause of that
* * cmdline/apt-get.cc:David Kalnischkies2012-08-041-2/+2
| | | | | - error out on (unsatisfiable) build-deps on purly virtual packages instead of ignoring these dependencies; thanks to Johannes Schauer for the detailed report! (Closes: #683786)
* * cmdline/apt-mark.cc:David Kalnischkies2012-07-041-2/+14
| | | | | | - arch:all packages are treated as arch:native packages, but dpkg expects pkg:all for selections, so use the arch of the installed version instead of the package structure if possible. Thanks to Stepan Golosunov for the report! (Closes: #680041)
* fix two simple spelling issues found by Christian Perrier,David Kalnischkies2012-06-272-6/+4
| | | | | updating all po's, but as it is a simple transformation no re-call and instead deal with them on merge
* * cmdline/apt-get.cc:David Kalnischkies2012-06-181-2/+14
| | | | - print a friendly message in 'download' if a package can't be downloaded (Closes: #677887)
* merged from donkultMichael Vogt2012-06-111-24/+51
|\
| * check build-dep candidate if install is forbiddenDavid Kalnischkies2012-06-111-19/+39
| |