summaryrefslogtreecommitdiff
path: root/cmdline
Commit message (Collapse)AuthorAgeFilesLines
...
| * cleanupMichael Vogt2015-08-181-3/+6
| |
| * Merge remote-tracking branch 'upstream/debian/experimental' into ↵Michael Vogt2015-08-188-337/+421
| |\ | | | | | | | | | feature/srv-records
| * \ Merge branch 'debian/experimental' into feature/srv-recordsMichael Vogt2015-08-1814-633/+814
| |\ \ | | | | | | | | | | | | | | | | | | | | Conflicts: cmdline/apt-helper.cc cmdline/makefile
| * | | add GetSrvRecord helper to apt-pkg/contrib/srvrec.{cc,h}Michael Vogt2014-05-202-1/+26
| | | |
* | | | Add support for "apt-cache showsrc --only-source srcpkgname"Michael Vogt2015-08-181-0/+4
| | | | | | | | | | | | | | | | | | | | Thanks: Steve Slangasek for the suggestion Closes: 695633
* | | | Provide "apt-get full-upgrade" to match "apt full-upgrade"Michael Vogt2015-08-181-0/+1
| |_|/ |/| |
* | | Show full package records in apt-cache search -fKusanagi Kouichi2015-08-161-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | This just changes the DoSearch code to use DisplayRecord to display the record when the full record is requested. Closes: #660851 [jak@debian.org: Wrote the commit message]
* | | When looking if Provides match, OR them with the normal patchesJulian Andres Klode2015-08-161-1/+1
| | | | | | | | | | | | | | | | | | | | | Simply overriding the value caused patterns that previously matched a real package name to not match anymore. Closes: #760868
* | | apt-get: allow non-root --print-uris build-depJulian Andres Klode2015-08-141-1/+3
| | | | | | | | | | | | Closes: #283400
* | | apt: Add autoremove and auto-remove commandsJulian Andres Klode2015-08-141-0/+3
| | |
* | | Make auto-remove and auto-clean aliases for the versions without -Julian Andres Klode2015-08-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Some people type them instead of autoremove and autoclean, so make them happy. Closes: #274159 Makes-Happy: Ansgar
* | | apt-cache: Show an error if stats gets any argumentsJulian Andres Klode2015-08-141-1/+6
| | | | | | | | | | | | Closes: #153161
* | | Merge branch 'debian/experimental' of https://github.com/DonKult/apt into ↵Julian Andres Klode2015-08-141-1/+1
|\ \ \ | | | | | | | | | | | | debian/experimental
| * | | Replace all "press enter" occurrences with "press [Enter]"Luca Bruno2015-08-121-1/+1
| | | | | | | | | | | | | | | | | | | | Thanks: Andre Felipe Machado for initial patch Closes: 414848
* | | | Deprecate SPtrArray<T> and convert everyone to unique_ptr<T[]>Julian Andres Klode2015-08-132-4/+4
| | | | | | | | | | | | | | | | More standardization
* | | | Mark SPtr as deprecated, and convert users to std::unique_ptrJulian Andres Klode2015-08-131-3/+3
| | | | | | | | | | | | | | | | Switch to std::unique_ptr, as this is safer than SPtr.
* | | | apt-cache: Improve translateability of the "with priority" thingJulian Andres Klode2015-08-121-2/+2
| | | | | | | | | | | | | | | | Gbp-Dch: ignore
* | | | apt-cache: Modify policy output to use per-version pinsJulian Andres Klode2015-08-121-13/+30
|/ / / | | | | | | | | | Also optionally enable old output by setting APT::Policy=0.
* | | apt-get: Do not include apt-pkg/indexrecords.hJulian Andres Klode2015-08-111-1/+0
| | | | | | | | | | | | | | | | | | It's gone. Gbp-Dch: ignore
* | | no value for MultiArch field is 'no', not 'none'David Kalnischkies2015-08-101-2/+2
| | | | | | | | | | | | Git-Dch: Ignore
* | | elimate duplicated code in pkgIndexFile subclassesDavid Kalnischkies2015-08-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Trade deduplication of code for a bunch of new virtuals, so it is actually visible how the different indexes behave cleaning up the interface at large in the process. Git-Dch: Ignore
* | | just-in-time creation for (implicit) ProvidesDavid Kalnischkies2015-08-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Expecting the worst is easy to code, but has its disadvantages e.g. by creating package structures which otherwise would have never existed. By creating the provides instead at the time a package structure is added we are well prepared for the introduction of partial architectures, massive amounts of M-A:foreign (and :allowed) and co as far as provides are concerned at least. We have something relatively similar for dependencies already. Many tests are added for both M-A states and the code cleaned to properly support implicit provides for foreign architectures and architectures we 'just' happen to parse. Git-Dch: Ignore
* | | hide implicit deps in apt-cache again by defaultDavid Kalnischkies2015-08-101-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before MultiArch implicits weren't a thing, so they were hidden by default by definition. Adding them for MultiArch solved many problems, but having no reliable way of detecting which dependency (and provides) is implicit or not causes problems everytime we want to output dependencies without confusing our observers with unneeded implementation details. The really notworthy point here is actually that we keep now a better record of how a dependency came to be so that we can later reason about it more easily, but that is hidden so deep down in the library internals that change is more the problems it solves than the change itself.
* | | remove the compatibility markers for 4.13 abiDavid Kalnischkies2015-08-102-36/+1
| | | | | | | | | | | | | | | | | | | | | | | | We aren't and we will not be really compatible again with the previous stable abi, so lets drop these markers (which never made it into a released version) for good as they have outlived their intend already. Git-Dch: Ignore
* | | split-up Dependency structDavid Kalnischkies2015-08-101-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having dependency data separated from the link between version/package and the dependency allows use to work on sharing the depdency data a bit as it turns out that many dependencies are in fact duplicates. How many are duplicates various heavily with the sources configured, but for a single Debian release the ballpark is 2 duplicates for each dependency already (e.g. libc6 counts 18410 dependencies, but only 45 unique). Add more releases and the duplicates count only rises to get ~6 for 3 releases. For each architecture a user has configured which given the shear number of dependencies amounts to MBs of duplication. We can cut down on this number, but pay a heavy price for it: In my many releases(3) + architectures(3) test we have a 10% (~ 0.5 sec) increase in cache creationtime, but also 10% less cachesize (~ 10 MB). Further work is needed to rip the whole benefits from this through, so this is just the start. Git-Dch: Ignore
* | | show or-groups in not-installed recommends and suggests listsDavid Kalnischkies2015-08-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Further abstracting our new ShowList allows to use it for containers of strings as well giving us the option to implement an or-groups display for the recommends and suggests lists which is a nice trick given that it also helps with migrating the last remaining other cases of old ShowList.
* | | headers are for declarations onlyDavid Kalnischkies2015-08-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Housekeeping. This used to be embedded in apt-get directly, then moved to into our (then new) private lib and now header and code get a proper separation. Git-Dch: Ignore
* | | rename 'apt-get files' to 'apt-get indextargets'David Kalnischkies2015-08-101-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | 'files' is a bit too generic as a name for a command usually only used programmatically (if at all) by developers, so instead of "wasting" this generic name for this we use "indextargets" which is actually the name of the datastructure the displayed data is stored in. Along with this rename the config options are renamed accordingly.
* | | add c++11 override marker to overridden methodsDavid Kalnischkies2015-08-103-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | C++11 adds the 'override' specifier to mark that a method is overriding a base class method and error out if not. We hide it in the APT_OVERRIDE macro to ensure that we keep compiling in pre-c++11 standards. Reported-By: clang-modernize -add-override -override-macros Git-Dch: Ignore
* | | merge keyrings with cat instead of gpg in apt-keyDavid Kalnischkies2015-08-101-42/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If all keyrings are simple keyrings we can merge the keyrings with cat rather than doing a detour over gpg --export | --import (see #790665), which means 'apt-key verify' can do without gpg and just use gpgv as before the merging change. We declare this gpgv usage explicit now in the dependencies. This isn't a new dependency as gnupg as well as debian-archive-keyring depend on and we used it before unconditionally, just that we didn't declare it. The handling of the merged keyring needs to be slightly different as our merged keyring can end up containing the same key multiple times, but at least currently gpg does remove only the first occurrence with --delete-keys, so we move the handling to a if one is gone, all are gone rather than an (implicit) quid pro quo or even no effect. Thanks: Daniel Kahn Gillmor for the suggestion
* | | support gpg 2.1.x in apt-keyDavid Kalnischkies2015-08-101-25/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The output of gpg slightly changes in 2.1 which breaks the testcase, but the real problem is that this branch introduces a new default keyring format (which is called keybox) and mixing it with simple keyrings (the previous default format) has various problems like failing in the keybox to keyring import (#790665) or [older] gpgv versions not being able to deal with keyboxes (and newer versions as well currently: https://bugs.gnupg.org/gnupg/issue2025). We fix this by being a bit more careful in who creates keyrings (aka: we do it or we take a simple keyring as base) to ensure we always have a keyring instead of a keybox. This way we can ensure that any version combination of gpv/gpgv2 and gnupg/gnupg2 without doing explicit version checks and use the same code for all of them. Closes: 781042
* | | enhance apt-key debugging optionsDavid Kalnischkies2015-08-101-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is sometimes handy to know how apt-key exactly called gpg, so adding a pair of options to be able to see this if wanted is added. Two are needed as some commands output is redirected to /dev/null, while sfor others stdout is piped into another gpg call so in both cases you wouldn't see all and hence you can choose. Git-Dch: Ignore
* | | implement Signed-By option for sources.listDavid Kalnischkies2015-08-101-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Limits which key(s) can be used to sign a repository. Not immensely useful from a security perspective all by itself, but if the user has additional measures in place to confine a repository (like pinning) an attacker who gets the key for such a repository is limited to its potential and can't use the key to sign its attacks for an other (maybe less limited) repository… (yes, this is as weak as it sounds, but having the capability might come in handy for implementing other stuff later).
* | | merge indexRecords into metaIndexDavid Kalnischkies2015-08-101-21/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | indexRecords was used to parse the Release file – mostly the hashes – while metaIndex deals with downloading the Release file, storing all indexes coming from this release and … parsing the Release file, but this time mostly for the other fields. That wasn't a problem in metaIndex as this was done in the type specific subclass, but indexRecords while allowing to override the parsing method did expect by default a specific format. APT isn't really supporting different types at the moment, but this is a violation of the abstraction we have everywhere else and, which is the actual reason for this merge: Options e.g. coming from the sources.list come to metaIndex naturally, which needs to wrap them up and bring them into indexRecords, so the acquire system is told about it as they don't get to see the metaIndex, but they don't really belong in indexRecords as this is just for storing data loaded from the Release file… the result is a complete mess. I am not saying it is a lot prettier after the merge, but at least adding new options is now slightly easier and there is just one place responsible for parsing the Release file. That can't hurt.
* | | support lang= and target= sources.list optionsDavid Kalnischkies2015-08-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We support arch= for a while, now we finally add lang= as well and as a first simple way of controlling which targets to acquire also target=. This asked for a redesign of the internal API of parsing and storing information about 'deb' and 'deb-src' lines. As this API isn't visible to the outside no damage done through. Beside being a nice cleanup (= it actually does more in less lines) it also provides us with a predictable order of architectures as provides in the configuration rather than based on string sorting-order, so that now the native architecture is parsed/displayed first. Observeable e.g. in apt-get output.
* | | fix memory leaks reported by -fsanitizeDavid Kalnischkies2015-08-102-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | Various small leaks here and there. Nothing particularily big, but still good to fix. Found by the sanitizers while running our testcases. Reported-By: gcc -fsanitize Git-Dch: Ignore
* | | cleanup Container.erase API to look more like std::containersDavid Kalnischkies2015-08-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | C++11 slightly changes the API again to const_iterator, but we are find with iterators in the C++03 style for now as long as they look and behave equally to the methods of the standard containers. Git-Dch: Ignore
* | | apply various style suggestions by cppcheckDavid Kalnischkies2015-08-101-1/+1
| | | | | | | | | | | | | | | | | | | | | Some of them modify the ABI, but given that we prepare a big one already, these few hardly count for much. Git-Dch: Ignore
* | | apt-cache: Change version pin output to use per-version pinsJulian Andres Klode2015-08-101-1/+1
| | |
* | | provide a public interface for acquiring changelogsDavid Kalnischkies2015-06-151-165/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provided is a specialized acquire item which given a version can figure out the correct URI to try by itself and if not provides an error message alongside with static methods to get just the URI it would try to download if it should just be displayed or similar such. The URI is constructed as follows: Release files can provide an URI template in the "Changelogs" field, otherwise we lookup a configuration item based on the "Label" or "Origin" of the Release file to get a (hopefully known) default value for now. This template should contain the string CHANGEPATH which is replaced with the information about the version we want the changelog for (e.g. main/a/apt/apt_1.1). This middleway was choosen as this path part was consistent over the three known implementations (+1 defunct), while the rest of the URI varies widely between them. The benefit of this construct is that it is now easy to get changelogs for Debian packages on Ubuntu and vice versa – even at the moment where the Changelogs field is present nowhere. Strictly better than what apt-get had before as it would even fail to get changelogs from security… Now it will notice that security identifies as Origin: Debian and pick this setting (assuming again that no Changelogs field exists). If on the other hand security would ship its changelogs in a different location we could set it via the Label option overruling Origin. Closes: 687147, 739854, 784027, 787190
* | | hide Translation-* in 'apt-cache policy' outputDavid Kalnischkies2015-06-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Translation-* files are internally handled as PackageFiles which isn't super nice, but giving them their own struct is a bit overkill so let it be for the moment. They always appeared in the policy output because of this through and now that they are properly linked to a ReleaseFile they even display all the pinning information on them, but they don't contain any packages which could be pinned… No problem, but useless and potentially confusing output. Adding a 'NoPackages' flag which can be set on those files and be used in applications seems like a simple way to fix this display issue.
* | | implement default apt-get file --release-info modeDavid Kalnischkies2015-06-151-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Selecting targets based on the Release they belong to isn't to unrealistic. In fact, it is assumed to be the most used case so it is made the default especially as this allows to bundle another thing we have to be careful with: Filenames and only showing targets we have acquired. Closes: 752702
* | | store Release files data in the CacheDavid Kalnischkies2015-06-121-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to read the Release file for each Packages file and store the data in the PackageFile struct even through potentially many Packages (and Translation-*) files could use the same data. The point of the exercise isn't the duplicated data through. Having the Release files as first-class citizens in the Cache allows us to properly track their state as well as allows us to use the information also for files which aren't in the cache, but where we know to which Release file they belong (Sources are an example for this). This modifies the pkgCache structs, especially the PackagesFile struct which depending on how libapt users access the data in these structs can mean huge breakage or no visible change. As a single data point: aptitude seems to be fine with this. Even if there is breakage it is trivial to fix in a backportable way while avoiding breakage for everyone would be a huge pain for us. Note that not all PackageFile structs have a corresponding ReleaseFile. In particular the dpkg/status file as well as *.deb files have not. As these have only a Archive property need, the Component property takes over this duty and the ReleaseFile remains zero. This is also the reason why it isn't needed nor particularily recommended to change from PackagesFile to ReleaseFile blindly. Sticking with the earlier is usually the better option.
* | | implement 'apt-get files' to access index targetsDavid Kalnischkies2015-06-111-0/+87
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | Downloading additional files is only half the job. We still need a way to allow external tools to know where the files are they requested for download given that we don't want them to choose their own location. 'apt-get files' is our answer to this showing by default in a deb822 format information about each IndexTarget with the potential to filter the records based on lines and an option to change the output format. The command serves also as an example on how to get to this information via libapt.
* | rewrite all TFRewrite instances to use the new pkgTagSection::WriteDavid Kalnischkies2015-05-112-16/+19
| | | | | | | | | | | | | | | | | | While it is mostly busywork to rewrite all instances it actually fixes bugs as the data storage used by the new method is std::string rather than a char*, the later mostly created by c_str() from a std::string which the caller has to ensure keeps in scope – something apt-ftparchive actually didn't ensure and relied on copy-on-write behavior instead which c++11 forbids and hence the new default gcc abi doesn't use it.
* | drop incorrect parameter implicitely converted to boolDavid Kalnischkies2015-05-111-2/+2
| | | | | | | | | | | | | | | | | | | | The helper expects to be told if it should generate messages, not where these messages should be printed – as it isn't printing such messages, but puts them in _error. apt-get uses in other methods a helper specialisation which does also print stuff to a stream through, so this is likely a copy&paste error. Git-Dch: Ignore
* | Merge branch 'debian/jessie' into debian/experimentalDavid Kalnischkies2015-04-191-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: apt-pkg/acquire-item.cc cmdline/apt-key.in methods/https.cc test/integration/test-apt-key test/integration/test-multiarch-foreign
| * | keyids in "apt-key del" should be case-insensitiveDavid Kalnischkies2015-04-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gnupg is case-insensitive about keyids, so back then apt-key called it directly any keyid was accepted, but now that we work more with the keyid ourself we regressed to require uppercase keyids by accident. This is also inconsistent with other apt-key commands which still use gnupg directly. A single case-insensitive grep and we are fine again. Closes: 781696
* | | add a simple unit test for acquire progressDavid Kalnischkies2015-04-102-4/+4
| | | | | | | | | | | | | | | | | | | | | This isn't testing much of the 'complex' parts, but its better than nothing for now. Git-Dch: Ignore
* | | stop displaying time of build in online helpJérémy Bobbio2015-03-1611-27/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of the “reproducible builds” effort [1], we have noticed that apt could not be built reproducibly. One issue is that it uses the __DATE__ and __TIME__ macros of the C preprocessor to display the time of build in the online help. We believe this information not to be really useful to users as they can always look at the package data and metadata to figure it out. The attached patch simply removes this information. All non-documentation packages can then be built reproducibly with our current experimental framework. [David: changed the string slightly to be untranslateable as well] Closes: 774342