summaryrefslogtreecommitdiff
path: root/apt-pkg/deb
Commit message (Collapse)AuthorAgeFilesLines
* rework PTY magic to fix stair-stepping on kfreebsdDavid Kalnischkies2014-09-082-53/+107
| | | | | | | | | | | | A pty slave we have got from openpty can only be used for one dpkg child, if we give it to a second child on kfreebsd setting TIOCSCTTY fails causing the output to be stair-stepped from now on. By switching the code to creating a master and opening a new slave in the child for each child we can fix this glitch, so that at least the master remains stable. Closes: 759684
* fix progress report for upgrade and reinstallDavid Kalnischkies2014-09-081-38/+41
| | | | | | | | | | | APT treats upgrades like installs and dpkg is very similar in this, but prints still a slightly different processing message indicating that it is really an upgrade which we hadn't parsed so far, but this wasn't really visible as we quickly moved on to a 'known' state. More problematic was the reinstall case as apt hadn't recognized this for the package name detection, so that reinstalls had no progress since we introduced MultiArch.
* * apt-pkg/deb/dpkgpm.cc:Michael Vogt2014-09-021-6/+7
| | | | | | | - update string matching for dpkg I/O errors. (LP: #1363257) - properly parse the dpkg status line so that package name is properly set and an apport report is created. Thanks to Anders Kaseorg for the patch. (LP: #1353171)
* support versioned provides as implemented by dpkgDavid Kalnischkies2014-08-261-2/+2
| | | | | | | | | | | | | | | | | APT supported versioned provides for a long while in an attempt to get it working with rpm. While this support is old, we can be relatively sure that it works as versioned provides are used internally to make Multi-Arch:foreign work. Previous versions of apt will print a warning indicating that the versioned provides is ignored, so that something which "Provides: foo (= 2)" doesn't provide anything. Note that dpkg does allow only a equals-relation in the provides line as anything else is deemed too complex. apt doesn't support anything else either and such a support would require potentially big changes. Closes: 758153
* Fix debListParser to accept "no" as a value for the Multi-Arch fieldJulian Andres Klode2014-08-241-1/+1
| | | | | | Seems this was missed somehow. Closes: #759099
* handle moved mmap after UniqFindTagWrite callDavid Kalnischkies2014-07-071-2/+6
| | | | | | | | | | | | A call to UniqFindTagWrite can trigger the need for a bigger mmap, which is usually done by moving it, but with this move all pointers into it become invalid (and have to be remapped). The compiler calculates the pointer before the execution of the call though, so it tries to store the returned value at the old location, resulting in a segfault. We solve this by use of a temprorary variable as we did in the other instances of this problem before. Closes: #753941
* Fix warning about uninitialized variableMichael Vogt2014-05-281-1/+2
| | | | Reported-By: clang++ -Werror
* use free() instead of delete[] in debSrcRecordParser::~debSrcRecordParserMichael Vogt2014-05-271-1/+2
| | | | | The Buffer was allocated using strndup() so we need to free it using free() instead of delete[]
* Never parse Version/Architecture tags in a Translation-$lang fileMichael Vogt2014-05-152-1/+12
| | | | | | | | | | Version/Architecture information in a Translation-$lang file is not allowed, so don't try to parse it. This is a fix for a bugreport where a Translation-en file contained the content of the regular Packages file (probably due to local FS corruption). This lead to strange error messages on file download. Thanks to Thomas Reusch for the report.
* Only do openpty() if both stdin/stdout are terminalsMichael Vogt2014-04-301-5/+6
| | | | Closes: 746434
* reduce delta from ubuntuMichael Vogt2014-04-251-1/+1
|
* do not crash on SIGPIPE in pkgDPkgPM::RunScriptsWithPkgs()Michael Vogt2014-04-011-7/+18
| | | | | If a external command closes the PIPE unexpectedly, do not crash in pkgDPkgPM::RunScriptsWithPkgs but ignore the SIGPIPE.
* Add new Debug::RunScripts optionMichael Vogt2014-04-011-0/+4
| | | | | This debug option will display all scripts that are run by apts RunScripts and RunScriptsWithPkgs helpers.
* ensure proper teardown in dpkg error casesDavid Kalnischkies2014-03-221-17/+7
| | | | | | | | | | | | We have to properly close our pseudo terminals even in error cases before we call post-invoke scripts. This is done now by breaking from the dpkg calling loop instead of copying the handling, which did it in the wrong order before. This also ensures that our state file is written in error cases to record autobit and co as this was forgotten before. Closes: 738969
* mark optional (private) symbols as hiddenDavid Kalnischkies2014-03-211-1/+2
| | | | | | | | This methods should not be used by anyone expect the library itself as they are helpers for the specific class and therefore perfect candidates for hidding. Git-Dch: Ignore
* abstract version hash comparison a bitDavid Kalnischkies2014-03-132-0/+24
| | | | | | | | In #737085 we see that apt can be confused if informations about versions only differ slightly. This commit adds a way of at least adding a few more data points with the next abi break to help a bit with it. Git-Dch: Ignore
* factor out parsing of MultiArch flagDavid Kalnischkies2014-03-132-21/+29
| | | | Git-Dch: Ignore
* follow method attribute suggestions by gccDavid Kalnischkies2014-03-134-13/+13
| | | | | Git-Dch: Ignore Reported-By: gcc -Wsuggest-attribute={pure,const,noreturn}
* cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-1316-41/+139
| | | | | | | | 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-133-4/+4
| | | | | Reported-By: gcc -Wunused-parameter Git-Dch: Ignore
* warning: useless cast to type A [-Wuseless-cast]David Kalnischkies2014-03-131-1/+1
| | | | | Git-Dch: Ignore Reported-By: gcc -Wuseless-cast
* fix -Wmissing-field-initializers warningsDavid Kalnischkies2014-03-131-4/+4
| | | | | Reported-By: gcc Git-Dch: Ignore
* support DEB_BUILD_PROFILES and -P for build profilesDavid Kalnischkies2014-03-131-1/+1
| | | | | | | | | | Inspired by the rest of the patch in 661537, but abstract the parsing of various ways of setting the build profiles more so it can potentially be reused and all apt parts have the same behaviour. Especially config options, cmdline options and environment will not be combined as proposed as this isn't APTs usual behaviour and dpkg doesn't do it either, so one overrides the other as it normally does.
* implement BuildProfileSpec support as dpkg has in 1.17.2Johannes Schauer2014-03-133-9/+101
| | | | | | | | Build-dependencies are now able to include a <profile.foo …> specification limiting usage similar to already supported [arch …]. More details: https://wiki.debian.org/BuildProfileSpec Closes: 661537
* Fix typos in documentation (codespell)Michael Vogt2014-02-223-4/+4
|
* restart debSrcRecordParsers only if neededDavid Kalnischkies2014-01-301-3/+3
| | | | | | | | | | The offset variable in DebSrcRecordParser was not initialized which we now do and based on it do not trigger a restart if the parser was not used yet avoiding a needless rescan of the section. Detected while working on the previous commit e62aa1dd. Both commits act as a "fix" for the bug shown in the testcase of the commit – this one here would only hide it through.
* Merge remote-tracking branch 'donkult/debian/sid' into debian/sidMichael Vogt2014-01-261-6/+3
|\ | | | | | | | | | | | | Conflicts: apt-private/private-list.cc doc/po/de.po test/integration/framework
| * correct some style/performance/warnings from cppcheckDavid Kalnischkies2014-01-161-6/+3
| | | | | | | | | | | | | | | | The most "visible" change is from utime to utimensat/futimens as the first one isn't part of POSIX anymore. Reported-By: cppcheck Git-Dch: Ignore
* | do not ignore ioctl(TIOCSCTTY) errorsMichael Vogt2014-01-181-9/+19
|/ | | | | Show a proper error message when a ioctl() in dpkgpm.cc fails. Also simply StartPtyMagic() a bit.
* Merge branch 'debian/sid' into bugfix/bts731738-fancy-progessMichael Vogt2013-12-281-3/+7
|\ | | | | | | | | Conflicts: apt-pkg/install-progress.cc
| * Fix conffile prompt regression (LP: #1260297)Michael Vogt2013-12-121-3/+7
| | | | | | | | | | This fixes a regression in the conffile prompt for the progress-fd and adds a testcase to ensure this does not regress again.
* | first proof-of-concept for a fix for #731738Michael Vogt2013-12-221-1/+1
|/
* Handle SIGWINCH in APT::Progress-Fancy=1Michael Vogt2013-12-061-1/+0
|
* * enable release based selection for deb-src (closes: 731102)Michael Vogt2013-12-052-1/+23
|
* merge ubuntus apport reporting changes to reduce diffDavid Kalnischkies2013-11-301-5/+54
| | | | | apport reporting is still disabled by default, but it is available in Debian/experimental at the moment and a diff is not a good idea anyway.
* fix apport report writing (LP: #1254499)Michael Vogt2013-11-291-1/+1
|
* reset terminal on error (closes: #730795)Michael Vogt2013-11-291-0/+1
|
* fix regression that APT::Keep-Fds is not honored (closes: #730490)Michael Vogt2013-11-281-0/+2
|
* add new pid_t ExecFork(std::set<int> KeepFDs) to get rid of the super ugly ↵Michael Vogt2013-10-311-12/+14
| | | | APT::Keep-Fds hack and also add a new PackageManagerProgressFd::StartDpkg() progress state
* move pty magic into its own functionsMichael Vogt2013-10-312-88/+97
|\
| * move pty stuff into its own functionMichael Vogt2013-10-312-79/+97
| |
| * use std::string instead of char* in pkgDPkgPM::ProcessDpkgStatusLine()Michael Vogt2013-10-181-24/+24
| |
| * reshuffle the pkgDPkgPM::ProcessDpkgStatusLine() some more to make it more ↵Michael Vogt2013-10-181-77/+91
| | | | | | | | robust
| * reshuffle dpkgpm.cc code a bit moreMichael Vogt2013-10-181-28/+40
| |
| * add APT::String::Strip(), start cleanup of ProcessDpkgStatusLineMichael Vogt2013-10-181-5/+28
| |
* | fix some more ABI issues, abicheck is happy nowMichael Vogt2013-10-311-0/+9
| |
* | restore ABI and prepare next ABI via #if (APT_PKG_MAJOR >= 4 && ↵Michael Vogt2013-10-312-0/+24
| | | | | | | | APT_PKG_MINOR >= 13)
* | extract getDpkgExecutable() and DPkgPM::BuildPackagesProgressMap() out of ↵Michael Vogt2013-10-252-62/+77
| | | | | | | | the monster long pkgDPkgPM::Go()
* | make the main loop a while() instead of a for() as I find this (much) easier ↵Michael Vogt2013-10-241-2/+3
| | | | | | | | to read this way)
* | fix failing ./test/integration/test-disappearing-packages (thanks Donkult!)Michael Vogt2013-10-221-4/+4
| |