summaryrefslogtreecommitdiff
path: root/apt-pkg
Commit message (Collapse)AuthorAgeFilesLines
* apt-pkg/contrib/gpgv.cc: APT::StringView -> std::string_viewнаб2024-11-121-7/+7
|
* apt-pkg/deb/deblistparser.h: APT::StringView -> std::string_viewнаб2024-11-121-6/+5
|
* apt-pkg/deb/deblistparser.cc: APT::StringView -> std::string_viewнаб2024-11-121-30/+31
|
* apt-pkg/deb/debsrcrecords.h: APT::StringView -> std::string_viewнаб2024-11-121-7/+7
|
* apt-pkg/deb/debsrcrecords.cc: APT::StringView -> std::string_viewнаб2024-11-121-12/+12
|
* apt-pkg/pkgcachegen.cc, apt-pkg/pkgcachegen.h: APT::StringView -> ↵наб2024-11-124-123/+123
| | | | std::string_view
* apt-pkg/cachefilter-patterns.h, apt-pkg/cachefilter-patterns.cc: prepare for ↵наб2024-11-122-65/+66
| | | | APT::StringView -> std::string_view
* apt-pkg/acquire-item.cc: prepare for APT::StringView -> std::string_viewнаб2024-11-121-7/+7
|
* apt-pkg/deb/debrecords.cc: prepare for APT::StringView -> std::string_viewнаб2024-11-121-20/+20
|
* apt-pkg/deb/debmetaindex.cc: prepare for APT::StringView -> std::string_viewнаб2024-11-121-7/+7
|
* apt-pkg/tagfile.cc: prepare for APT::StringView -> std::string_viewнаб2024-11-121-1/+1
|
* apt-pkg/policy.cc: prepare for APT::StringView -> std::string_viewнаб2024-11-121-4/+3
|
* apt-pkg/contrib/configuration.cc: prepare for APT::StringView -> ↵наб2024-11-121-40/+39
| | | | std::string_view
* apt-pkg/indexcopy.cc: prepare for APT::StringView -> std::string_viewнаб2024-11-121-38/+38
|
* flCombine: try to reuse one of the strings when returningнаб2024-11-121-54/+54
|
* apt-pkg/edsp/edsplistparser.cc: APT::StringView -> std::string_viewнаб2024-11-126-13/+9
|
* apt-pkg/algorithms.cc, apt-pkg/cachefilter.h: drop unused #include ↵наб2024-11-122-2/+0
| | | | <apt-pkg/string_view.h>
* apt-pkg/edsp.cc: APT::StringView -> std::string_viewнаб2024-11-121-9/+8
|
* APT::StringView: add operator std::string_view(), StringViewCompareFast() ↵наб2024-11-121-4/+13
| | | | for std::string_views, operator<<(ostream&), std::string_view constructor, operator==(std::string_view)
* ReportMirrorFailureToCentral: fix use-after-freeнаб2024-11-121-1/+2
|
* Merge branch 'more' into 'main'Julian Andres Klode2024-11-129-105/+114
|\ | | | | | | | | APT_BUFFER_SIZE pkgTagFile default size. std::vector(1024) -> std::array<1024>. dpkgpm buffers See merge request apt-team/apt!390
| * dpkgpm: fdopen() failing doesn't close the fdнаб2024-11-121-0/+3
| |
| * dpkgpm: append ":$printarchitecture" instead of ':'+${#printarchitecture} to ↵наб2024-11-121-1/+1
| | | | | | | | package name
| * dpkgpm: use getline() for Apport var/crash linesнаб2024-11-121-18/+11
| | | | | | | | | | Also remove useless condition: sscanf() already direct-matches non-whitespace bytes
| * dpkgpm: use std::array<unsigned char, APT_BUFFER_SIZE> for I/O copy buffersнаб2024-11-121-7/+7
| |
| * dpkgpm: use sysconf(_SC_GETPW_R_SIZE_MAX)-sized + growing buffer for ↵наб2024-11-121-2/+7
| | | | | | | | getpwuid_r() instead of 255
| * pkgDPkgPMPrivate::dpkgbuf: char[1024] -> array<char, APT_BUFFER_SIZE>наб2024-11-121-8/+8
| |
| * dpkgpm: lift out CopyIndented() and make_unique_*() for FILEs; use getline() ↵наб2024-11-123-60/+55
| | | | | | | | for reading lines instead of 1k buffer
| * Turn unique_ptr<decltype(fclose and free)> into real deleter types (warnings ↵наб2024-11-125-13/+25
| | | | | | | | now, UB in C++20)
| * Bump pkgTagFile default Size from 32k to APT_BUFFER_SIZEнаб2024-11-111-4/+4
| |
| * Replace constant-size never-reallicated getservbyport_r() std::vector buffer ↵наб2024-11-111-1/+2
| | | | | | | | with std::array
* | FileFd::Open: don't needlessly copy filename in three-arg constructorнаб2024-11-111-2/+2
|/
* Turn std::unique_ptr<char[]/std::array<char>>(APT_BUFFER_SIZE) buffers into ↵наб2024-11-112-9/+8
| | | | std::array<char, APT_BUFFER_SIZE>
* Turn char[APT_BUFFER_SIZE] buffers into std::array<char, APT_BUFFER_SIZE>наб2024-11-112-26/+26
|
* Merge branch 'keep-more' into 'main'Julian Andres Klode2024-11-111-2/+4
|\ | | | | | | | | Fix keeping back removals of obsolete packages See merge request apt-team/apt!373
| * Return an error if ResolveByKeep() is unsuccessfulJulian Andres Klode2024-11-111-0/+3
| | | | | | | | | | | | | | | | In case of held packages or packages that otherwise can't be kept back, we should return an error and not require the client to check the broken_count after calling us. LP: #2078720
| * Fix keeping back removals of obsolete packagesJulian Andres Klode2024-11-111-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ResolveByKeepInternal() inadvertently considered packages that were marked for removals as not being possible to keep back, but that's not true, all they need is to have a currently installed version. The test case is a bit awkward to construct because our upgrade code doesn't get into a place where this happens that we know off. Or maybe it does with phased upgrades, but here we simplify this by using a helper binary that dumps state, marks for removal, and then calls ResolveByKeep and checks the removal is undone. LP: #2078720
* | Merge branch 'solver3-undo-one'Julian Andres Klode2024-11-112-240/+269
|\ \ | | | | | | | | | | | | | | | This is an initial set of refactorings to get closer to MiniSAT as we try to clean up our understanding of the code. Propagation still happens in-line, recursively, instead of using a propagation queue.
| * | solver3: Refactor Install(Ver) to PropagateInstall(Ver)Julian Andres Klode2024-11-022-32/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first part of changing from Install() to Enqueue() for installs, affecting only the versions. For packages, we still have to resolve the group changing: When propagating cleanly, we don't have the information as to which group the package was part of, hence we are no longer able to queue the version selection of upgrades before obsolete packages, for example, which needs solving.
| * | solver3: Check whether installable versions are allowedJulian Andres Klode2024-11-021-7/+10
| | | | | | | | | | | | | | | | | | | | | We only checked if they were still installable, but not if they were allowed. We should removed the allowed version handling altogether presumably - we should just mark non-allowed versions as rejected early on.
| * | solver3: A version selected for install already is allowed.Julian Andres Klode2024-11-021-1/+1
| | |
| * | Add a FIXME around the heap compactionJulian Andres Klode2024-11-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our work heap is currently cleaned from deeper levels by removing the entries from the heap and then remaking the heap which is very inefficient. We should mark the items as erased instead, and only do the remove & make_heap dance if we have a lot of erased entries in there. Possibly we maybe should use a structure that actually allows removing entries, that is, an std::set, but that warrants more investigation on performance aspects.
| * | solver3: Rename the 'dirty' bit to 'erased'Julian Andres Klode2024-11-022-8/+8
| | | | | | | | | | | | This captures the meaning better
| * | solver3: Remove the Reject() function, propagate in Enqueue() insteadJulian Andres Klode2024-11-022-56/+40
| | | | | | | | | | | | | | | Long term we should have a propagate queue, this is the minimal change to keep the behavior identical, a first step on the road.
| * | solver3: Move needsRescore from Reject to Enqueue()Julian Andres Klode2024-11-021-4/+3
| | |
| * | solver3: Remove obsolete checksJulian Andres Klode2024-11-021-44/+5
| | | | | | | | | | | | | | | These checks are no longer needed since Enqueue() ensures the correctness for us.
| * | solver3: Introduce new Assume() and Enqueue() helpers and use themJulian Andres Klode2024-11-022-23/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are taken roughly from the MiniSAT paper. We still have a bit to go in actually encoding all clauses so the reasons are still variables, and Assume() isn't fully working yet. Adjust the existing Install()/Reject() code to use these functions, we already see additional lines in the log that we failed to log before, and this ensures more consistency. This is sort of still the wrong direction: Install()/Reject() do the propagation too; but that is tbd.
| * | solver3: Rename Reason to VarJulian Andres Klode2024-11-022-60/+60
| | |
| * | solver3: Track all assignments and undo them individuallyJulian Andres Klode2024-11-022-72/+116
| |/ | | | | | | | | | | | | Adopt MiniSAT's strategy for dealing with assignments and choices, having a single step undoOne() function to undo one and record them all on the queue; this should likely speed up backtracking since we no longer need to rescan everything.
* | Remove ftp, rsh, ssh methods (disabled since 1.8)Julian Andres Klode2024-11-071-2/+0
| | | | | | | | | | | | | | | | | | These methods have been unsupported and disabled since 1.8, remove them for the 3.0 cleanup. Please migrate to http instead. If you need ad-hoc access to a remote repository, you can run `python3 -m http.server` on that machine and use SSH port forwarding to run http over ssh.