1 // -*- mode: cpp; mode: fold -*-
3 // $Id: dpkgpm.cc,v 1.28 2004/01/27 02:25:01 mdz Exp $
4 /* ######################################################################
6 DPKG Package Manager - Provide an interface to dpkg
8 ##################################################################### */
11 #include <apt-pkg/dpkgpm.h>
12 #include <apt-pkg/error.h>
13 #include <apt-pkg/configuration.h>
14 #include <apt-pkg/depcache.h>
15 #include <apt-pkg/strutl.h>
21 #include <sys/select.h>
22 #include <sys/types.h>
32 #include <sys/ioctl.h>
43 // DPkgPM::pkgDPkgPM - Constructor /*{{{*/
44 // ---------------------------------------------------------------------
46 pkgDPkgPM::pkgDPkgPM(pkgDepCache
*Cache
)
47 : pkgPackageManager(Cache
), dpkgbuf_pos(0), PackagesDone(0),
48 PackagesTotal(0), term_out(NULL
)
52 // DPkgPM::pkgDPkgPM - Destructor /*{{{*/
53 // ---------------------------------------------------------------------
55 pkgDPkgPM::~pkgDPkgPM()
59 // DPkgPM::Install - Install a package /*{{{*/
60 // ---------------------------------------------------------------------
61 /* Add an install operation to the sequence list */
62 bool pkgDPkgPM::Install(PkgIterator Pkg
,string File
)
64 if (File
.empty() == true || Pkg
.end() == true)
65 return _error
->Error("Internal Error, No file name for %s",Pkg
.Name());
67 List
.push_back(Item(Item::Install
,Pkg
,File
));
71 // DPkgPM::Configure - Configure a package /*{{{*/
72 // ---------------------------------------------------------------------
73 /* Add a configure operation to the sequence list */
74 bool pkgDPkgPM::Configure(PkgIterator Pkg
)
76 if (Pkg
.end() == true)
79 List
.push_back(Item(Item::Configure
,Pkg
));
83 // DPkgPM::Remove - Remove a package /*{{{*/
84 // ---------------------------------------------------------------------
85 /* Add a remove operation to the sequence list */
86 bool pkgDPkgPM::Remove(PkgIterator Pkg
,bool Purge
)
88 if (Pkg
.end() == true)
92 List
.push_back(Item(Item::Purge
,Pkg
));
94 List
.push_back(Item(Item::Remove
,Pkg
));
98 // DPkgPM::RunScripts - Run a set of scripts /*{{{*/
99 // ---------------------------------------------------------------------
100 /* This looks for a list of script sto run from the configuration file,
101 each one is run with system from a forked child. */
102 bool pkgDPkgPM::RunScripts(const char *Cnf
)
104 Configuration::Item
const *Opts
= _config
->Tree(Cnf
);
105 if (Opts
== 0 || Opts
->Child
== 0)
109 // Fork for running the system calls
110 pid_t Child
= ExecFork();
115 if (chdir("/tmp/") != 0)
118 unsigned int Count
= 1;
119 for (; Opts
!= 0; Opts
= Opts
->Next
, Count
++)
121 if (Opts
->Value
.empty() == true)
124 if (system(Opts
->Value
.c_str()) != 0)
130 // Wait for the child
132 while (waitpid(Child
,&Status
,0) != Child
)
136 return _error
->Errno("waitpid","Couldn't wait for subprocess");
139 // Restore sig int/quit
140 signal(SIGQUIT
,SIG_DFL
);
141 signal(SIGINT
,SIG_DFL
);
143 // Check for an error code.
144 if (WIFEXITED(Status
) == 0 || WEXITSTATUS(Status
) != 0)
146 unsigned int Count
= WEXITSTATUS(Status
);
150 for (; Opts
!= 0 && Count
!= 1; Opts
= Opts
->Next
, Count
--);
151 _error
->Error("Problem executing scripts %s '%s'",Cnf
,Opts
->Value
.c_str());
154 return _error
->Error("Sub-process returned an error code");
160 // DPkgPM::SendV2Pkgs - Send version 2 package info /*{{{*/
161 // ---------------------------------------------------------------------
162 /* This is part of the helper script communication interface, it sends
163 very complete information down to the other end of the pipe.*/
164 bool pkgDPkgPM::SendV2Pkgs(FILE *F
)
166 fprintf(F
,"VERSION 2\n");
168 /* Write out all of the configuration directives by walking the
169 configuration tree */
170 const Configuration::Item
*Top
= _config
->Tree(0);
173 if (Top
->Value
.empty() == false)
176 QuoteString(Top
->FullTag(),"=\"\n").c_str(),
177 QuoteString(Top
->Value
,"\n").c_str());
186 while (Top
!= 0 && Top
->Next
== 0)
193 // Write out the package actions in order.
194 for (vector
<Item
>::iterator I
= List
.begin(); I
!= List
.end(); I
++)
196 pkgDepCache::StateCache
&S
= Cache
[I
->Pkg
];
198 fprintf(F
,"%s ",I
->Pkg
.Name());
200 if (I
->Pkg
->CurrentVer
== 0)
203 fprintf(F
,"%s ",I
->Pkg
.CurrentVer().VerStr());
205 // Show the compare operator
207 if (S
.InstallVer
!= 0)
210 if (I
->Pkg
->CurrentVer
!= 0)
211 Comp
= S
.InstVerIter(Cache
).CompareVer(I
->Pkg
.CurrentVer());
218 fprintf(F
,"%s ",S
.InstVerIter(Cache
).VerStr());
223 // Show the filename/operation
224 if (I
->Op
== Item::Install
)
227 if (I
->File
[0] != '/')
228 fprintf(F
,"**ERROR**\n");
230 fprintf(F
,"%s\n",I
->File
.c_str());
232 if (I
->Op
== Item::Configure
)
233 fprintf(F
,"**CONFIGURE**\n");
234 if (I
->Op
== Item::Remove
||
235 I
->Op
== Item::Purge
)
236 fprintf(F
,"**REMOVE**\n");
244 // DPkgPM::RunScriptsWithPkgs - Run scripts with package names on stdin /*{{{*/
245 // ---------------------------------------------------------------------
246 /* This looks for a list of scripts to run from the configuration file
247 each one is run and is fed on standard input a list of all .deb files
248 that are due to be installed. */
249 bool pkgDPkgPM::RunScriptsWithPkgs(const char *Cnf
)
251 Configuration::Item
const *Opts
= _config
->Tree(Cnf
);
252 if (Opts
== 0 || Opts
->Child
== 0)
256 unsigned int Count
= 1;
257 for (; Opts
!= 0; Opts
= Opts
->Next
, Count
++)
259 if (Opts
->Value
.empty() == true)
262 // Determine the protocol version
263 string OptSec
= Opts
->Value
;
264 string::size_type Pos
;
265 if ((Pos
= OptSec
.find(' ')) == string::npos
|| Pos
== 0)
266 Pos
= OptSec
.length();
267 OptSec
= "DPkg::Tools::Options::" + string(Opts
->Value
.c_str(),Pos
);
269 unsigned int Version
= _config
->FindI(OptSec
+"::Version",1);
273 if (pipe(Pipes
) != 0)
274 return _error
->Errno("pipe","Failed to create IPC pipe to subprocess");
275 SetCloseExec(Pipes
[0],true);
276 SetCloseExec(Pipes
[1],true);
278 // Purified Fork for running the script
279 pid_t Process
= ExecFork();
283 dup2(Pipes
[0],STDIN_FILENO
);
284 SetCloseExec(STDOUT_FILENO
,false);
285 SetCloseExec(STDIN_FILENO
,false);
286 SetCloseExec(STDERR_FILENO
,false);
291 Args
[2] = Opts
->Value
.c_str();
293 execv(Args
[0],(char **)Args
);
297 FILE *F
= fdopen(Pipes
[1],"w");
299 return _error
->Errno("fdopen","Faild to open new FD");
301 // Feed it the filenames.
305 for (vector
<Item
>::iterator I
= List
.begin(); I
!= List
.end(); I
++)
307 // Only deal with packages to be installed from .deb
308 if (I
->Op
!= Item::Install
)
312 if (I
->File
[0] != '/')
315 /* Feed the filename of each package that is pending install
317 fprintf(F
,"%s\n",I
->File
.c_str());
326 Die
= !SendV2Pkgs(F
);
330 // Clean up the sub process
331 if (ExecWait(Process
,Opts
->Value
.c_str()) == false)
332 return _error
->Error("Failure running script %s",Opts
->Value
.c_str());
339 // DPkgPM::DoStdin - Read stdin and pass to slave pty /*{{{*/
340 // ---------------------------------------------------------------------
343 void pkgDPkgPM::DoStdin(int master
)
345 char input_buf
[256] = {0,};
346 int len
= read(0, input_buf
, sizeof(input_buf
));
347 write(master
, input_buf
, len
);
350 // DPkgPM::DoTerminalPty - Read the terminal pty and write log /*{{{*/
351 // ---------------------------------------------------------------------
353 * read the terminal pty and write log
355 void pkgDPkgPM::DoTerminalPty(int master
)
357 char term_buf
[1024] = {0,};
359 int len
=read(master
, term_buf
, sizeof(term_buf
));
362 write(1, term_buf
, len
);
364 fwrite(term_buf
, len
, sizeof(char), term_out
);
367 // DPkgPM::ProcessDpkgStatusBuf /*{{{*/
368 // ---------------------------------------------------------------------
371 void pkgDPkgPM::ProcessDpkgStatusLine(int OutStatusFd
, char *line
)
373 // the status we output
374 ostringstream status
;
376 if (_config
->FindB("Debug::pkgDPkgProgressReporting",false) == true)
377 std::clog
<< "got from dpkg '" << line
<< "'" << std::endl
;
380 /* dpkg sends strings like this:
381 'status: <pkg>: <pkg qstate>'
382 errors look like this:
383 'status: /var/cache/apt/archives/krecipes_0.8.1-0ubuntu1_i386.deb : error : trying to overwrite `/usr/share/doc/kde/HTML/en/krecipes/krectip.png', which is also in package krecipes-data
384 and conffile-prompt like this
385 'status: conffile-prompt: conffile : 'current-conffile' 'new-conffile' useredited distedited
389 // dpkg sends multiline error messages sometimes (see
390 // #374195 for a example. we should support this by
391 // either patching dpkg to not send multiline over the
392 // statusfd or by rewriting the code here to deal with
393 // it. for now we just ignore it and not crash
394 TokSplitString(':', line
, list
, sizeof(list
)/sizeof(list
[0]));
396 char *action
= _strstrip(list
[2]);
397 if( pkg
== NULL
|| action
== NULL
)
399 if (_config
->FindB("Debug::pkgDPkgProgressReporting",false) == true)
400 std::clog
<< "ignoring line: not enough ':'" << std::endl
;
404 if(strncmp(action
,"error",strlen("error")) == 0)
406 status
<< "pmerror:" << list
[1]
407 << ":" << (PackagesDone
/float(PackagesTotal
)*100.0)
411 write(OutStatusFd
, status
.str().c_str(), status
.str().size());
412 if (_config
->FindB("Debug::pkgDPkgProgressReporting",false) == true)
413 std::clog
<< "send: '" << status
.str() << "'" << endl
;
416 if(strncmp(action
,"conffile",strlen("conffile")) == 0)
418 status
<< "pmconffile:" << list
[1]
419 << ":" << (PackagesDone
/float(PackagesTotal
)*100.0)
423 write(OutStatusFd
, status
.str().c_str(), status
.str().size());
424 if (_config
->FindB("Debug::pkgDPkgProgressReporting",false) == true)
425 std::clog
<< "send: '" << status
.str() << "'" << endl
;
429 vector
<struct DpkgState
> &states
= PackageOps
[pkg
];
430 const char *next_action
= NULL
;
431 if(PackageOpsDone
[pkg
] < states
.size())
432 next_action
= states
[PackageOpsDone
[pkg
]].state
;
433 // check if the package moved to the next dpkg state
434 if(next_action
&& (strcmp(action
, next_action
) == 0))
436 // only read the translation if there is actually a next
438 const char *translation
= _(states
[PackageOpsDone
[pkg
]].str
);
440 snprintf(s
, sizeof(s
), translation
, pkg
);
442 // we moved from one dpkg state to a new one, report that
443 PackageOpsDone
[pkg
]++;
445 // build the status str
446 status
<< "pmstatus:" << pkg
447 << ":" << (PackagesDone
/float(PackagesTotal
)*100.0)
451 write(OutStatusFd
, status
.str().c_str(), status
.str().size());
452 if (_config
->FindB("Debug::pkgDPkgProgressReporting",false) == true)
453 std::clog
<< "send: '" << status
.str() << "'" << endl
;
455 if (_config
->FindB("Debug::pkgDPkgProgressReporting",false) == true)
456 std::clog
<< "(parsed from dpkg) pkg: " << pkg
457 << " action: " << action
<< endl
;
460 // DPkgPM::DoDpkgStatusFd /*{{{*/
461 // ---------------------------------------------------------------------
464 void pkgDPkgPM::DoDpkgStatusFd(int statusfd
, int OutStatusFd
)
469 len
=read(statusfd
, &dpkgbuf
[dpkgbuf_pos
], sizeof(dpkgbuf
)-dpkgbuf_pos
);
474 // process line by line if we have a buffer
476 while((q
=(char*)memchr(p
, '\n', dpkgbuf
+dpkgbuf_pos
-p
)) != NULL
)
479 ProcessDpkgStatusLine(OutStatusFd
, p
);
480 p
=q
+1; // continue with next line
483 // now move the unprocessed bits (after the final \n that is now a 0x0)
484 // to the start and update dpkgbuf_pos
485 p
= (char*)memrchr(dpkgbuf
, 0, dpkgbuf_pos
);
489 // we are interessted in the first char *after* 0x0
492 // move the unprocessed tail to the start and update pos
493 memmove(dpkgbuf
, p
, p
-dpkgbuf
);
494 dpkgbuf_pos
= dpkgbuf
+dpkgbuf_pos
-p
;
499 // DPkgPM::Go - Run the sequence /*{{{*/
500 // ---------------------------------------------------------------------
501 /* This globs the operations and calls dpkg
503 * If it is called with "OutStatusFd" set to a valid file descriptor
504 * apt will report the install progress over this fd. It maps the
505 * dpkg states a package goes through to human readable (and i10n-able)
506 * names and calculates a percentage for each step.
508 bool pkgDPkgPM::Go(int OutStatusFd
)
510 unsigned int MaxArgs
= _config
->FindI("Dpkg::MaxArgs",8*1024);
511 unsigned int MaxArgBytes
= _config
->FindI("Dpkg::MaxArgBytes",32*1024);
513 if (RunScripts("DPkg::Pre-Invoke") == false)
516 if (RunScriptsWithPkgs("DPkg::Pre-Install-Pkgs") == false)
519 // map the dpkg states to the operations that are performed
520 // (this is sorted in the same way as Item::Ops)
521 static const struct DpkgState DpkgStatesOpMap
[][7] = {
524 {"half-installed", N_("Preparing %s")},
525 {"unpacked", N_("Unpacking %s") },
528 // Configure operation
530 {"unpacked",N_("Preparing to configure %s") },
531 {"half-configured", N_("Configuring %s") },
532 {"triggers-awaited", N_("Processing triggers for %s") },
533 {"triggers-pending", N_("Processing triggers for %s") },
534 {"half-configured", N_("Configuring %s") },
535 { "installed", N_("Installed %s")},
540 {"half-configured", N_("Preparing for removal of %s")},
541 {"triggers-awaited", N_("Preparing for removal of %s")},
542 {"triggers-pending", N_("Preparing for removal of %s")},
543 {"half-installed", N_("Removing %s")},
544 {"config-files", N_("Removed %s")},
549 {"config-files", N_("Preparing to completely remove %s")},
550 {"not-installed", N_("Completely removed %s")},
555 // init the PackageOps map, go over the list of packages that
556 // that will be [installed|configured|removed|purged] and add
557 // them to the PackageOps map (the dpkg states it goes through)
558 // and the PackageOpsTranslations (human readable strings)
559 for (vector
<Item
>::iterator I
= List
.begin(); I
!= List
.end();I
++)
561 string name
= (*I
).Pkg
.Name();
562 PackageOpsDone
[name
] = 0;
563 for(int i
=0; (DpkgStatesOpMap
[(*I
).Op
][i
]).state
!= NULL
; i
++)
565 PackageOps
[name
].push_back(DpkgStatesOpMap
[(*I
).Op
][i
]);
571 string logdir
= _config
->FindDir("Dir::Log");
572 if(not FileExists(logdir
))
573 return _error
->Error(_("Directory '%s' missing"), logdir
.c_str());
574 string logfile_name
= flCombine(logdir
,
575 _config
->Find("Dir::Log::Terminal"));
576 if (!logfile_name
.empty())
578 term_out
= fopen(logfile_name
.c_str(),"a");
579 chmod(logfile_name
.c_str(), 0600);
580 // output current time
582 time_t t
= time(NULL
);
583 struct tm
*tmp
= localtime(&t
);
584 strftime(outstr
, sizeof(outstr
), "%F %T", tmp
);
585 fprintf(term_out
, "\nLog started: ");
586 fprintf(term_out
, outstr
);
587 fprintf(term_out
, "\n");
590 // this loop is runs once per operation
591 for (vector
<Item
>::iterator I
= List
.begin(); I
!= List
.end();)
593 vector
<Item
>::iterator J
= I
;
594 for (; J
!= List
.end() && J
->Op
== I
->Op
; J
++);
596 // Generate the argument list
597 const char *Args
[MaxArgs
+ 50];
598 if (J
- I
> (signed)MaxArgs
)
602 unsigned long Size
= 0;
603 string Tmp
= _config
->Find("Dir::Bin::dpkg","dpkg");
604 Args
[n
++] = Tmp
.c_str();
605 Size
+= strlen(Args
[n
-1]);
607 // Stick in any custom dpkg options
608 Configuration::Item
const *Opts
= _config
->Tree("DPkg::Options");
612 for (; Opts
!= 0; Opts
= Opts
->Next
)
614 if (Opts
->Value
.empty() == true)
616 Args
[n
++] = Opts
->Value
.c_str();
617 Size
+= Opts
->Value
.length();
621 char status_fd_buf
[20];
625 Args
[n
++] = "--status-fd";
626 Size
+= strlen(Args
[n
-1]);
627 snprintf(status_fd_buf
,sizeof(status_fd_buf
),"%i", fd
[1]);
628 Args
[n
++] = status_fd_buf
;
629 Size
+= strlen(Args
[n
-1]);
634 Args
[n
++] = "--force-depends";
635 Size
+= strlen(Args
[n
-1]);
636 Args
[n
++] = "--force-remove-essential";
637 Size
+= strlen(Args
[n
-1]);
638 Args
[n
++] = "--remove";
639 Size
+= strlen(Args
[n
-1]);
643 Args
[n
++] = "--force-depends";
644 Size
+= strlen(Args
[n
-1]);
645 Args
[n
++] = "--force-remove-essential";
646 Size
+= strlen(Args
[n
-1]);
647 Args
[n
++] = "--purge";
648 Size
+= strlen(Args
[n
-1]);
651 case Item::Configure
:
652 Args
[n
++] = "--configure";
653 Size
+= strlen(Args
[n
-1]);
657 Args
[n
++] = "--unpack";
658 Size
+= strlen(Args
[n
-1]);
659 Args
[n
++] = "--auto-deconfigure";
660 Size
+= strlen(Args
[n
-1]);
664 // Write in the file or package names
665 if (I
->Op
== Item::Install
)
667 for (;I
!= J
&& Size
< MaxArgBytes
; I
++)
669 if (I
->File
[0] != '/')
670 return _error
->Error("Internal Error, Pathname to install is not absolute '%s'",I
->File
.c_str());
671 Args
[n
++] = I
->File
.c_str();
672 Size
+= strlen(Args
[n
-1]);
677 for (;I
!= J
&& Size
< MaxArgBytes
; I
++)
679 Args
[n
++] = I
->Pkg
.Name();
680 Size
+= strlen(Args
[n
-1]);
686 if (_config
->FindB("Debug::pkgDPkgPM",false) == true)
688 for (unsigned int k
= 0; k
!= n
; k
++)
689 clog
<< Args
[k
] << ' ';
698 /* Mask off sig int/quit. We do this because dpkg also does when
699 it forks scripts. What happens is that when you hit ctrl-c it sends
700 it to all processes in the group. Since dpkg ignores the signal
701 it doesn't die but we do! So we must also ignore it */
702 sighandler_t old_SIGQUIT
= signal(SIGQUIT
,SIG_IGN
);
703 sighandler_t old_SIGINT
= signal(SIGINT
,SIG_IGN
);
710 // FIXME: setup sensible signal handling (*ick*)
712 ioctl(0, TIOCGWINSZ
, (char *)&win
);
713 if (openpty(&master
, &slave
, NULL
, &tt
, &win
) < 0)
715 const char *s
= _("Can not write log, openpty() "
716 "failed (/dev/pts not mounted?)\n");
717 fprintf(stderr
, "%s",s
);
718 fprintf(term_out
, "%s",s
);
724 rtt
.c_lflag
&= ~ECHO
;
725 tcsetattr(0, TCSAFLUSH
, &rtt
);
730 _config
->Set("APT::Keep-Fds::",fd
[1]);
736 if(slave
>= 0 && master
>= 0)
739 ioctl(slave
, TIOCSCTTY
, 0);
746 close(fd
[0]); // close the read end of the pipe
748 if (chdir(_config
->FindDir("DPkg::Run-Directory","/").c_str()) != 0)
751 if (_config
->FindB("DPkg::FlushSTDIN",true) == true && isatty(STDIN_FILENO
))
754 if ((Flags
= fcntl(STDIN_FILENO
,F_GETFL
,dummy
)) < 0)
757 // Discard everything in stdin before forking dpkg
758 if (fcntl(STDIN_FILENO
,F_SETFL
,Flags
| O_NONBLOCK
) < 0)
761 while (read(STDIN_FILENO
,&dummy
,1) == 1);
763 if (fcntl(STDIN_FILENO
,F_SETFL
,Flags
& (~(long)O_NONBLOCK
)) < 0)
768 /* No Job Control Stop Env is a magic dpkg var that prevents it
769 from using sigstop */
770 putenv("DPKG_NO_TSTP=yes");
771 execvp(Args
[0],(char **)Args
);
772 cerr
<< "Could not exec dpkg!" << endl
;
776 // clear the Keep-Fd again
777 _config
->Clear("APT::Keep-Fds",fd
[1]);
782 // we read from dpkg here
784 close(fd
[1]); // close the write end of the pipe
786 // the result of the waitpid call
795 while ((res
=waitpid(Child
,&Status
, WNOHANG
)) != Child
) {
797 // FIXME: move this to a function or something, looks ugly here
798 // error handling, waitpid returned -1
801 RunScripts("DPkg::Post-Invoke");
803 // Restore sig int/quit
804 signal(SIGQUIT
,old_SIGQUIT
);
805 signal(SIGINT
,old_SIGINT
);
806 return _error
->Errno("waitpid","Couldn't wait for subprocess");
809 // wait for input or output here
812 FD_SET(_dpkgin
, &rfds
);
814 FD_SET(master
, &rfds
);
817 select_ret
= select(max(master
, _dpkgin
)+1, &rfds
, NULL
, NULL
, &tv
);
818 if (select_ret
< 0) {
819 std::cerr
<< "Error in select()" << std::endl
;
821 } else if (select_ret
== 0)
824 if(master
>= 0 && FD_ISSET(master
, &rfds
))
825 DoTerminalPty(master
);
826 if(master
>= 0 && FD_ISSET(0, &rfds
))
828 if(FD_ISSET(_dpkgin
, &rfds
))
829 DoDpkgStatusFd(_dpkgin
, OutStatusFd
);
833 // Restore sig int/quit
834 signal(SIGQUIT
,old_SIGQUIT
);
835 signal(SIGINT
,old_SIGINT
);
837 if(master
>= 0 && slave
>= 0)
838 tcsetattr(0, TCSAFLUSH
, &tt
);
840 // Check for an error code.
841 if (WIFEXITED(Status
) == 0 || WEXITSTATUS(Status
) != 0)
843 // if it was set to "keep-dpkg-runing" then we won't return
844 // here but keep the loop going and just report it as a error
846 bool stopOnError
= _config
->FindB("Dpkg::StopOnError",true);
849 RunScripts("DPkg::Post-Invoke");
851 if (WIFSIGNALED(Status
) != 0 && WTERMSIG(Status
) == SIGSEGV
)
852 _error
->Error("Sub-process %s received a segmentation fault.",Args
[0]);
853 else if (WIFEXITED(Status
) != 0)
854 _error
->Error("Sub-process %s returned an error code (%u)",Args
[0],WEXITSTATUS(Status
));
856 _error
->Error("Sub-process %s exited unexpectedly",Args
[0]);
869 if (RunScripts("DPkg::Post-Invoke") == false)
874 // pkgDpkgPM::Reset - Dump the contents of the command list /*{{{*/
875 // ---------------------------------------------------------------------
877 void pkgDPkgPM::Reset()
879 List
.erase(List
.begin(),List
.end());