projects
/
apt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix `OnCalendar=*-*-* 6,18:00` instead of `OnCalendar=*-*-* 6:00,18:00`
[apt.git]
/
apt-inst
/
extract.cc
diff --git
a/apt-inst/extract.cc
b/apt-inst/extract.cc
index 2c95fba92bbac000fc41ec3d4d25d8258e389f5f..5d42adf87821bb4b120fbc035622ce2aacb67c5d 100644
(file)
--- a/
apt-inst/extract.cc
+++ b/
apt-inst/extract.cc
@@
-10,7
+10,7
@@
object is unpacked to '.dpkg.new' then the original is hardlinked to
'.dpkg.tmp' and finally the new object is renamed to overwrite the old
one. From an external perspective the file never ceased to exist.
object is unpacked to '.dpkg.new' then the original is hardlinked to
'.dpkg.tmp' and finally the new object is renamed to overwrite the old
one. From an external perspective the file never ceased to exist.
- After the archive has been suc
essfully unpacked the .dpkg.tmp files
+ After the archive has been suc
cessfully unpacked the .dpkg.tmp files
are erased. A failure causes all the .dpkg.tmp files to be restored.
Decisions about unpacking go like this:
are erased. A failure causes all the .dpkg.tmp files to be restored.
Decisions about unpacking go like this:
@@
-22,7
+22,7
@@
[Note, this is reduced to only check if a file was expected to be
there]
- If the existing link/file is not a directory then it is replaced
[Note, this is reduced to only check if a file was expected to be
there]
- If the existing link/file is not a directory then it is replaced
-
ir
regardless
+ regardless
- If the existing link/directory is being replaced by a directory then
absolutely nothing happens.
- If the existing link/directory is being replaced by a link then
- If the existing link/directory is being replaced by a directory then
absolutely nothing happens.
- If the existing link/directory is being replaced by a link then
@@
-50,13
+50,20
@@
#include <apt-pkg/error.h>
#include <apt-pkg/debversion.h>
#include <apt-pkg/fileutl.h>
#include <apt-pkg/error.h>
#include <apt-pkg/debversion.h>
#include <apt-pkg/fileutl.h>
+#include <apt-pkg/dirstream.h>
+#include <apt-pkg/filelist.h>
+#include <apt-pkg/mmap.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
+#include <string.h>
+#include <string>
#include <sys/stat.h>
#include <stdio.h>
#include <sys/stat.h>
#include <stdio.h>
-#include <unistd.h>
#include <errno.h>
#include <dirent.h>
#include <iostream>
#include <errno.h>
#include <dirent.h>
#include <iostream>
+
#include <apti18n.h>
/*}}}*/
using namespace std;
#include <apti18n.h>
/*}}}*/
using namespace std;
@@
-79,7
+86,7
@@
pkgExtract::pkgExtract(pkgFLCache &FLCache,pkgCache::VerIterator Ver) :
// Extract::DoItem - Handle a single item from the stream /*{{{*/
// ---------------------------------------------------------------------
/* This performs the setup for the extraction.. */
// Extract::DoItem - Handle a single item from the stream /*{{{*/
// ---------------------------------------------------------------------
/* This performs the setup for the extraction.. */
-bool pkgExtract::DoItem(Item &Itm,
int &Fd
)
+bool pkgExtract::DoItem(Item &Itm,
int &/*Fd*/
)
{
/* Strip any leading/trailing /s from the filename, then copy it to the
temp buffer and re-apply the leading / We use a class variable
{
/* Strip any leading/trailing /s from the filename, then copy it to the
temp buffer and re-apply the leading / We use a class variable
@@
-253,7
+260,7
@@
bool pkgExtract::DoItem(Item &Itm,int &Fd)
// Extract::Finished - Sequence finished, erase the temp files /*{{{*/
// ---------------------------------------------------------------------
/* */
// Extract::Finished - Sequence finished, erase the temp files /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool pkgExtract::Finished()
+
APT_CONST
bool pkgExtract::Finished()
{
return true;
}
{
return true;
}
@@
-272,7
+279,7
@@
bool pkgExtract::Aborted()
map_ptrloc *Last = &FLPkg->Files;
/* Loop over all files, restore those that have been unpacked from their
map_ptrloc *Last = &FLPkg->Files;
/* Loop over all files, restore those that have been unpacked from their
- dpkg-tmp ent
ir
es */
+ dpkg-tmp ent
ri
es */
while (Files.end() == false)
{
// Locate the hash bucket for the node and locate its group head
while (Files.end() == false)
{
// Locate the hash bucket for the node and locate its group head
@@
-397,7
+404,7
@@
bool pkgExtract::HandleOverwrites(pkgFLCache::NodeIterator Nde,
// Now see if this package matches one in a replace depends
pkgCache::DepIterator Dep = Ver.DependsList();
bool Ok = false;
// Now see if this package matches one in a replace depends
pkgCache::DepIterator Dep = Ver.DependsList();
bool Ok = false;
- for (; Dep.end() == false;
Dep++
)
+ for (; Dep.end() == false;
++Dep
)
{
if (Dep->Type != pkgCache::Dep::Replaces)
continue;
{
if (Dep->Type != pkgCache::Dep::Replaces)
continue;