summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-get-download
Commit message (Collapse)AuthorAgeFilesLines
* deal better with acquiring the same URI multiple timesDavid Kalnischkies2015-06-151-1/+1
| | | | | | | | | | | | | | | This is an unlikely event for indexes and co, but it can happen quiet easily e.g. for changelogs where you want to get the changelogs for multiple binary package(version)s which happen to all be built from a single source. The interesting part is that the Acquire system actually detected this already and set the item requesting the URI again to StatDone - expect that this is hardly sufficient: an Item must be Complete=true as well to be considered truely done and that is only the tip of the ::Done handling iceberg. So instead of this StatDone hack we allow QItems to be owned by multiple items and notify all owners about everything now, so that for the point of each item they got it downloaded just for them.
* chown finished partial files earlierDavid Kalnischkies2014-10-231-1/+11
| | | | | | | | | | | | | | | | | partial files are chowned by the Item baseclass to let the methods work with them. Now, this baseclass is also responsible for chowning the files back to root instead of having various deeper levels do this. The consequence is that all overloaded Failed() methods now call the Item::Failed base as their first step. The same is done for Done(). The effect is that even in partial files usually don't belong to _apt anymore, helping sneakernets and reducing possibilities of a bad method modifying files not belonging to them. The change is supported by the framework not only supporting being run as root, but with proper permission management, too, so that privilege dropping can be tested with them.
* autorun permission tests for all apt-get update callsDavid Kalnischkies2014-10-201-5/+0
| | | | | | | | Adds some infrastructure to run tests automatically for certain commands. The first command being 'apt-get update' (and 'apt update') which check for correct permission and owner of the files in lists/. Git-Dch: Ignore
* testcases runable as rootDavid Kalnischkies2014-10-151-2/+11
| | | | | | | Running the testcases is usually not a good idea, but it can be handy to check if the privilege dropping works. Git-Dch: Ignore
* use _apt:root only for partial directoriesDavid Kalnischkies2014-10-071-0/+16
| | | | | | | | | | | | | | | | Using a different user for calling methods is intended to protect us from methods running amok (via remotely exploited bugs) by limiting what can be done by them. By using root:root for the final directories and just have the files in partial writeable by the methods we enhance this in sofar as a method can't modify already verified data in its parent directory anymore. As a side effect, this also clears most of the problems you could have if the final directories are shared without user-sharing or if these directories disappear as they are now again root owned and only the partial directories contain _apt owned files (usually none if apt isn't running) and the directory itself is autocreated with the right permissions.
* allow fetcher setup without directory creationDavid Kalnischkies2014-09-271-2/+25
| | | | | | | | | | | apt-get download and changelog as well as apt-helper reuse the acquire system for their own proposes without requiring the directories the fetcher wants to create, which is a problem if you run them as non-root and the directories do not exist as it greets you with: E: Archives directory /var/cache/apt/archives/partial is missing. - Acquire (13: Permission denied) Closes: 762898
* remove duplicated apt-get download apt apt testMichael Vogt2014-02-131-4/+0
|
* Merge remote-tracking branch 'mvo/debian/sid' into debian/sidMichael Vogt2014-02-121-0/+5
|\ | | | | | | | | Conflicts: test/integration/test-apt-get-download
| * Use a APT::VersionSet instead of a VersionListMichael Vogt2014-02-121-0/+5
| | | | | | | | | | | | | | Use a APT::VersionSet instead of a APT::VersionList in DoDownload() to ensure that there is only one version in the set even if the user passes multiple identical name/versions on the commandline (Bug#738103)
* | use VersionSet in download to handle repeatsDavid Kalnischkies2014-02-101-4/+9
|/ | | | Closes: 738103
* fix apt-get download truncation (closes: #736962)Michael Vogt2014-01-291-0/+7
|
* improve stdout/stderr usage correctness in test frameworkDavid Kalnischkies2014-01-171-1/+2
| | | | | | | | Also adds a friendly note about how many tests were run/passed so that the end of the testrun isn't all that negative by just showing fails. (It now tells us that we have 111 tests at the moment!) Git-Dch: Ignore
* use pkgAcqArchive in 'download' for proper errorsDavid Kalnischkies2013-10-031-1/+2
| | | | | | | 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.
* merge patches from daniel to fix merge artifact and test failureMichael Vogt2013-03-251-1/+1
|
* * cmdline/apt-get.cc:David Kalnischkies2012-06-181-0/+4
| | | | - print a friendly message in 'download' if a package can't be downloaded (Closes: #677887)
* run apt-get download in quiet mode as it messes with output otherwiseDavid Kalnischkies2011-10-111-6/+5
|
* implement --print-uris for download commandDavid Kalnischkies2011-02-071-0/+29