summaryrefslogtreecommitdiff
path: root/apt-pkg/cdrom.cc
Commit message (Collapse)AuthorAgeFilesLines
* properly undo CD-ROM mount in all error casesJohn Ogness2014-04-261-25/+41
| | | | | | | | In bug #740673 various issues in the CD-ROM handling code were identified, while most the issues ended up being fixed in another way, the unmounting of the CD-ROM in error cases was not tackled so far. (The patch was modified by the commiter to apply)
* msgstr with elipses need three dotsDavid Kalnischkies2014-03-131-3/+3
| | | | | fixes some messages and their translation so that all of them have three dots for messages with an elipse. Many translations already had this.
* apt-cdrom ident shouldn't be interactiveDavid Kalnischkies2014-03-131-12/+15
| | | | | | | | | Commit 62dcbf84 changed the code of ident to look more like the code for add on my suggestion. This made ident interactive as it starts with a unmount, press enter, mount cycle. The first two are skipped now. This fixes d-i/apt-setup which is using it to get ID as well as label. Closes: 740673
* cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-131-16/+18
| | | | | | | | Beside being a bit cleaner it hopefully also resolves oddball problems I have with high levels of parallel jobs. Git-Dch: Ignore Reported-By: iwyu (include-what-you-use)
* warning: unused parameter ‘foo’ [-Wunused-parameter]David Kalnischkies2014-03-131-1/+1
| | | | | Reported-By: gcc -Wunused-parameter Git-Dch: Ignore
* warning: useless cast to type A [-Wuseless-cast]David Kalnischkies2014-03-131-4/+4
| | | | | Git-Dch: Ignore Reported-By: gcc -Wuseless-cast
* warning: extra ‘;’ [-Wpedantic]David Kalnischkies2014-03-131-3/+3
| | | | | Git-Dch: Ignore Reported-By: gcc -Wpedantic
* remove duplication in pkgCdrom::Add and ::IdentDavid Kalnischkies2014-02-121-90/+41
| | | | Git-Dch: Ignore
* apt-cdrom should succeed if any drive succeedsJohn Ogness2014-02-121-2/+24
| | | | | | | | | | | | | | | If there are multiple CD-ROM drives, `apt-cdrom add` will abort with an error if any of the drives do not contain a Debian CD which is against the documentation we have saying "a CD-ROM" and also scripts do not expect it this way. This patch modifies apt-cdrom to return success if any of the drives succeeded. If failures occur, apt-cdrom will still continue trying all the drives and report the last failure (if none of them succeeded). The 'ident' command was also changed to match the new 'add' behavior. Closes: 728153
* ensure state-dir exists before coyping cdrom filesDavid Kalnischkies2013-06-091-0/+8
| | | | | | We do the same in the acquire system which handles the 'normal' downloads, so do it here as well even though its unlikely anyone will ever notice (beside testcases of course …)
* * apt-pkg/cdrom.cc:David Kalnischkies2012-09-031-0/+25
| | | | | | | - copy only configured translation files from a CD-ROM and not all available translation files preventing new installs with d-i from being initialized with all translations (Closes: #678227) - handle Components in the reduction for the source.list as multi-arch CDs otherwise create duplicated source entries (e.g. "wheezy main main")
* * apt-pkg/cdrom.cc:David Kalnischkies2012-09-021-3/+6
| | | | - handle Components in the reduction for the source.list as multi-arch cds otherwise create duplicated source entries (e.g. "wheezy main main")
* * apt-pkg/cdrom.cc:David Kalnischkies2012-08-051-2/+2
| | | | - do not link() but rename() the cdroms.list to cdroms.list~ as a backup to ensure that apt-cdrom can be run multiple times (Closes: #676302)
* * apt-pkg/cdrom.cc:David Kalnischkies2012-06-091-1/+1
| | | | | - fix regression from 0.9.3 which dumped the main configuration _config instead of the cdrom settings (Cnf) as identified and tested by Milan Kupcevic, thanks! (Closes: #674100)
* * apt-pkg/cdrom.cc:David Kalnischkies2012-04-221-19/+2
| | | - use Dump() to generate the configuration output
* * apt-pkg/acquire-worker.cc:David Kalnischkies2012-03-201-2/+4
| | | | | | | | | | | - check return of write() as gcc recommends * apt-pkg/acquire.cc: - check return of write() as gcc recommends * apt-pkg/cdrom.cc: - check return of chdir() and link() as gcc recommends * apt-pkg/clean.cc: - check return of chdir() as gcc recommends * apt-pkg/contrib/netrc.cc: - check return of asprintf() as gcc recommends
* add a testcase for FindPackages() to better validate that cdrom should work.David Kalnischkies2011-12-111-8/+15
| | | | | | Unfortunately it's hard to do an automated integration test with cd, so we test this method in isolation which tries to find Indexes and dropping of duplications with DropRepeats()
* * apt-pkg/cdrom.cc:David Kalnischkies2011-12-111-2/+2
| | | - support InRelease files on cdrom
* use fileutl exists-functions instead of doing the stat'ing by handDavid Kalnischkies2011-12-111-6/+5
|
* strip the extension of the translation file before storing it in the listDavid Kalnischkies2011-12-111-0/+1
| | | | (regression from compression rewrite; found by Steve McIntyre, thanks!)
* use getCompressors() instead of getCompressorTypes() and use it everywhereDavid Kalnischkies2011-11-241-60/+65
| | | | to replace hardcoding of compressiontypes and compressors
* factored out the decompressor code in IndexCopy::CopyPackages() andSteve McIntyre2011-11-231-1/+1
| | | | TranslationsCopy::CopyTranslations() into a single common function
* * apt-pkg/cdrom.cc:Michael Vogt2011-11-221-29/+54
| | | - use aptconfiguration to get the supported compression types
* apt-pkg/cdrom.cc: Accept .bz2, .xz files in addition to .gz files (Closes: ↵Julian Andres Klode2011-11-211-4/+11
| | | | #649451)
* use forward declaration in headers if possible instead of includesDavid Kalnischkies2011-09-191-0/+2
|
* merge with debian/experimentalDavid Kalnischkies2011-09-131-22/+14
|\
| * merged from the debian-sid branchMichael Vogt2011-08-151-13/+13
| |\
| | * cppcheck complains about some possible speed improvements which could beDavid Kalnischkies2011-08-111-13/+13
| | | | | | | | | | | | | | | | | | done on the mirco-optimazation level, so lets fix them: (performance) Possible inefficient checking for emptiness. (performance) Prefer prefix ++/-- operators for non-primitive types.
| * | * apt-pkg/cdrom.{cc,h}:Michael Vogt2011-07-281-9/+1
| |/ | | | | - cleanup old ABI break avoidance hacks
* / reorder includes: add <config.h> if needed and include it at firstDavid Kalnischkies2011-09-131-2/+3
|/
* fix a bunch of cppcheck warnings/errors based on a patch byDavid Kalnischkies2011-04-161-34/+54
| | | Niels Thykier, thanks! (Closes: #622805)
* apt-pkg/cdrom.{cc,h}: add (ugly) workaround to ensure the ABI is not broken ↵Michael Vogt2011-03-101-1/+8
| | | | (also in this case its probably not needed because pkgUDevCDrom is not used outside libapt itself, still its better to be on the save side)
* * apt-pkg/contrib/cdromutl.{cc,h}, apt-pkg/cdrom.{cc,h}:Michael Vogt2011-03-101-1/+2
| | | | | | - deal with missing FSTAB_DIR when using libudev to discover cdrom - add experimental APT::cdrom::CdromOnly option (on by default). When this is set to false apt-cdrom will handle any removable deivce (like a usb-stick) as a "cdrom/dvd" source
* apt-pkg/contrib/cdromutl.{cc,h}: return string for mountpath; ↵Michael Vogt2011-03-091-3/+8
| | | | apt-pkg/cdrom.cc: use string
* apt-pkg/cdrom.{cc,h}: add ScanForRemovable helperMichael Vogt2011-03-091-7/+16
|
* apt-pkg/contrib/cdromutl.{cc,h}: add FindMountPointForDevice helper; ↵Michael Vogt2011-03-041-0/+7
| | | | apt-pkg/cdrom.cc: deal with missing FSTAB_DIR
* apt-pkg/cdrom.{cc,h}: add udev_enumerate_add_match_sysattr to the libudev classMichael Vogt2011-03-041-0/+1
|
* apt-pkg/cdrom.cc: fix another hardcoded /cdromMichael Vogt2011-02-011-1/+1
|
* * apt-pkg/cdrom.cc, apt-pkg/init.cc, methods/cdrom.cc:Michael Vogt2011-02-011-2/+2
| | | - use /media/cdrom as default mountoint (closes: #611569)
* * apt-pkg/cdrom.cc:Michael Vogt2010-08-021-1/+1
| | | - fix off-by-one error in DropBinaryArch
* * apt-pkg/cdrom.cc:Julian Andres Klode2010-07-271-1/+1
| | | | - Use link() instead of rename() for creating the CD database backup; otherwise there would be a short time without any database.
* merge MultiArch-ABI. We don't support MultiArch yet (as most other tools),David Kalnischkies2010-03-181-21/+13
|\ | | | | | | | | but we support the usage of the new ABI so libapt users can start to prepare for MultiArch (Closes: #536029)
| * [BREAK] merge MultiArch-ABI. We don't support MultiArch,David Kalnischkies2010-02-131-21/+13
| |\ | | | | | | | | | | | | | | | | | | | | | | | | but we support the usage of the new ABI so libapt users can start to prepare for MultiArch (Closes: #536029) MultiArch isn't ready for Primetime usage for now, but the branch has managed to be a NOP if used in SingleArch-mode so we can start to promote the use of the new MultiArchable API-extensions.
| | * merge Goswin Brederlow "support download of index files for different archs"David Kalnischkies2009-12-231-21/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | patch which includes the following big changes: - Declare the unused [vendor] field in sources.list as option field, e.g. deb [arch=amd64,i386 lang=en_GB have=fun] http://example.org - When fetching index files download them for all APT::Architectures (overrideable with the options field above) - Allow all architectures of APT::Architectures to be in the Cache - Add the architecture to status and progress informations - Add b= (Binary architecture) to policy This commit doesn't incude the "pin-hack" as the Group structure will take care of this (and does it already to some extend).
* | | * cmdline/apt-get.ccDavid Kalnischkies2010-03-121-1/+2
|/ / | | | | | | - fix memory leaks in error conditions in DoSource()
* / merge 1695..1701 from the lp:~mvo/apt/mvo branchMichael Vogt2010-01-271-3/+2
|/
* [ABI] merged the libudev-dlopen branch, this allows to passMichael Vogt2009-07-231-1/+85
|\ | | | | | | "apt-udev-auto" to Acquire::Cdrom::mount and the cdrom method will dynamically find/mount the cdrom device (if libhal is available)
| * methods/cdrom.cc: add AutoDetectAndMount methodMichael Vogt2009-07-231-3/+2
| |
| * methods/cdrom.cc: move the scan into the loop that waits for a CDMichael Vogt2009-07-221-1/+6
| |
| * apt-pkg/cdrom.cc: make cdrom.Mounted property reliableMichael Vogt2009-07-221-1/+2
| |