Author: jgg
Date: 1999-11-16 03:16:34 GMT
3 more bugs
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: acquire-method.cc,v 1.21 1999/10/18 00:37:35 jgg Exp $
+// $Id: acquire-method.cc,v 1.22 1999/11/16 03:16:34 jgg Exp $
/* ######################################################################
Acquire Method
/* ######################################################################
Acquire Method
char S[1024];
if (Queue != 0)
{
char S[1024];
if (Queue != 0)
{
- snprintf(S,sizeof(S),"400 URI Failure\nURI: %s\n"
+ snprintf(S,sizeof(S)-50,"400 URI Failure\nURI: %s\n"
"Message: %s\n",Queue->Uri.c_str(),Err.c_str());
// Dequeue
"Message: %s\n",Queue->Uri.c_str(),Err.c_str());
// Dequeue
QueueBack = Queue;
}
else
QueueBack = Queue;
}
else
- snprintf(S,sizeof(S),"400 URI Failure\nURI: <UNKNOWN>\n"
+ snprintf(S,sizeof(S)-50,"400 URI Failure\nURI: <UNKNOWN>\n"
"Message: %s\n",Err.c_str());
// Set the transient flag
"Message: %s\n",Err.c_str());
// Set the transient flag
End += snprintf(S,sizeof(S),"200 URI Start\nURI: %s\n",Queue->Uri.c_str());
if (Res.Size != 0)
End += snprintf(S,sizeof(S),"200 URI Start\nURI: %s\n",Queue->Uri.c_str());
if (Res.Size != 0)
- End += snprintf(End,sizeof(S) - (End - S),"Size: %lu\n",Res.Size);
+ End += snprintf(End,sizeof(S)-4 - (End - S),"Size: %lu\n",Res.Size);
if (Res.LastModified != 0)
if (Res.LastModified != 0)
- End += snprintf(End,sizeof(S) - (End - S),"Last-Modified: %s\n",
+ End += snprintf(End,sizeof(S)-4 - (End - S),"Last-Modified: %s\n",
TimeRFC1123(Res.LastModified).c_str());
if (Res.ResumePoint != 0)
TimeRFC1123(Res.LastModified).c_str());
if (Res.ResumePoint != 0)
- End += snprintf(End,sizeof(S) - (End - S),"Resume-Point: %lu\n",
+ End += snprintf(End,sizeof(S)-4 - (End - S),"Resume-Point: %lu\n",
Res.ResumePoint);
strcat(End,"\n");
Res.ResumePoint);
strcat(End,"\n");
End += snprintf(S,sizeof(S),"201 URI Done\nURI: %s\n",Queue->Uri.c_str());
if (Res.Filename.empty() == false)
End += snprintf(S,sizeof(S),"201 URI Done\nURI: %s\n",Queue->Uri.c_str());
if (Res.Filename.empty() == false)
- End += snprintf(End,sizeof(S) - (End - S),"Filename: %s\n",Res.Filename.c_str());
+ End += snprintf(End,sizeof(S)-50 - (End - S),"Filename: %s\n",Res.Filename.c_str());
- End += snprintf(End,sizeof(S) - (End - S),"Size: %lu\n",Res.Size);
+ End += snprintf(End,sizeof(S)-50 - (End - S),"Size: %lu\n",Res.Size);
if (Res.LastModified != 0)
if (Res.LastModified != 0)
- End += snprintf(End,sizeof(S) - (End - S),"Last-Modified: %s\n",
+ End += snprintf(End,sizeof(S)-50 - (End - S),"Last-Modified: %s\n",
TimeRFC1123(Res.LastModified).c_str());
if (Res.MD5Sum.empty() == false)
TimeRFC1123(Res.LastModified).c_str());
if (Res.MD5Sum.empty() == false)
- End += snprintf(End,sizeof(S) - (End - S),"MD5-Hash: %s\n",Res.MD5Sum.c_str());
+ End += snprintf(End,sizeof(S)-50 - (End - S),"MD5-Hash: %s\n",Res.MD5Sum.c_str());
if (Res.ResumePoint != 0)
if (Res.ResumePoint != 0)
- End += snprintf(End,sizeof(S) - (End - S),"Resume-Point: %lu\n",
+ End += snprintf(End,sizeof(S)-50 - (End - S),"Resume-Point: %lu\n",
Res.ResumePoint);
if (Res.IMSHit == true)
Res.ResumePoint);
if (Res.IMSHit == true)
if (Alt != 0)
{
if (Alt->Filename.empty() == false)
if (Alt != 0)
{
if (Alt->Filename.empty() == false)
- End += snprintf(End,sizeof(S) - (End - S),"Alt-Filename: %s\n",Alt->Filename.c_str());
+ End += snprintf(End,sizeof(S)-50 - (End - S),"Alt-Filename: %s\n",Alt->Filename.c_str());
- End += snprintf(End,sizeof(S) - (End - S),"Alt-Size: %lu\n",Alt->Size);
+ End += snprintf(End,sizeof(S)-50 - (End - S),"Alt-Size: %lu\n",Alt->Size);
if (Alt->LastModified != 0)
if (Alt->LastModified != 0)
- End += snprintf(End,sizeof(S) - (End - S),"Alt-Last-Modified: %s\n",
+ End += snprintf(End,sizeof(S)-50 - (End - S),"Alt-Last-Modified: %s\n",
TimeRFC1123(Alt->LastModified).c_str());
if (Alt->MD5Sum.empty() == false)
TimeRFC1123(Alt->LastModified).c_str());
if (Alt->MD5Sum.empty() == false)
- End += snprintf(End,sizeof(S) - (End - S),"Alt-MD5-Hash: %s\n",
+ End += snprintf(End,sizeof(S)-50 - (End - S),"Alt-MD5-Hash: %s\n",
Alt->MD5Sum.c_str());
if (Alt->IMSHit == true)
Alt->MD5Sum.c_str());
if (Alt->IMSHit == true)
// sprintf the description
char S[1024];
// sprintf the description
char S[1024];
- unsigned int Len = snprintf(S,sizeof(S),"101 Log\nURI: %s\n"
+ unsigned int Len = snprintf(S,sizeof(S)-4,"101 Log\nURI: %s\n"
"Message: ",CurrentURI.c_str());
"Message: ",CurrentURI.c_str());
- vsnprintf(S+Len,sizeof(S)-Len,Format,args);
+ vsnprintf(S+Len,sizeof(S)-4-Len,Format,args);
strcat(S,"\n\n");
if (write(STDOUT_FILENO,S,strlen(S)) != (signed)strlen(S))
strcat(S,"\n\n");
if (write(STDOUT_FILENO,S,strlen(S)) != (signed)strlen(S))
// sprintf the description
char S[1024];
// sprintf the description
char S[1024];
- unsigned int Len = snprintf(S,sizeof(S),"102 Status\nURI: %s\n"
+ unsigned int Len = snprintf(S,sizeof(S)-4,"102 Status\nURI: %s\n"
"Message: ",CurrentURI.c_str());
"Message: ",CurrentURI.c_str());
- vsnprintf(S+Len,sizeof(S)-Len,Format,args);
+ vsnprintf(S+Len,sizeof(S)-4-Len,Format,args);
strcat(S,"\n\n");
if (write(STDOUT_FILENO,S,strlen(S)) != (signed)strlen(S))
strcat(S,"\n\n");
if (write(STDOUT_FILENO,S,strlen(S)) != (signed)strlen(S))
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: acqprogress.cc,v 1.18 1999/10/18 03:18:40 jgg Exp $
+// $Id: acqprogress.cc,v 1.19 1999/11/16 03:16:34 jgg Exp $
/* ######################################################################
Acquire Progress - Command line progress meter
/* ######################################################################
Acquire Progress - Command line progress meter
enum {Long = 0,Medium,Short} Mode = Long;
enum {Long = 0,Medium,Short} Mode = Long;
char *End = Buffer + sizeof(Buffer);
char *S = Buffer;
char *End = Buffer + sizeof(Buffer);
char *S = Buffer;
+ if (ScreenWidth >= sizeof(Buffer))
+ ScreenWidth = sizeof(Buffer)-1;
+
// Put in the percent done
sprintf(S,"%ld%%",long(double((CurrentBytes + CurrentItems)*100.0)/double(TotalBytes+TotalItems)));
// Put in the percent done
sprintf(S,"%ld%%",long(double((CurrentBytes + CurrentItems)*100.0)/double(TotalBytes+TotalItems)));
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: apt-get.cc,v 1.87 1999/10/28 05:54:45 jgg Exp $
+// $Id: apt-get.cc,v 1.88 1999/11/16 03:16:34 jgg Exp $
/* ######################################################################
apt-get - Cover for dpkg
/* ######################################################################
apt-get - Cover for dpkg
/* */
bool DoClean(CommandLine &CmdL)
{
/* */
bool DoClean(CommandLine &CmdL)
{
+ if (_config->FindB("APT::Get::Simulate") == true)
+ {
+ cout << "Del " << _config->FindDir("Dir::Cache::archives") << "* " <<
+ _config->FindDir("Dir::Cache::archives") << "partial/*" << endl;
+ return true;
+ }
+
// Lock the archive directory
FileFd Lock;
if (_config->FindB("Debug::NoLocking",false) == false)
// Lock the archive directory
FileFd Lock;
if (_config->FindB("Debug::NoLocking",false) == false)
AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in)
dnl -- SET THIS TO THE RELEASE VERSION --
AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in)
dnl -- SET THIS TO THE RELEASE VERSION --
-AC_DEFINE_UNQUOTED(VERSION,"0.3.14")
+AC_DEFINE_UNQUOTED(VERSION,"0.3.14.1")
AC_DEFINE_UNQUOTED(PACKAGE,"apt")
dnl Tom's host stuff
AC_DEFINE_UNQUOTED(PACKAGE,"apt")
dnl Tom's host stuff
+apt (0.3.14.1) unstable; urgency=low
+
+ * Added DSelect::WaitAfterDownload Closes: #49549
+ * Fixed cast error in byteswap macro and supporting code. Closes: #50093
+ * Fixed buffer overflow for wide terminal sizes. Closes: #50295
+ * Made -s and clean not do anything. Closes: #50238
+
+ -- Ben Gertzfield <che@debian.org> Sun, 7 Nov 1999 20:21:25 -0800
+
apt (0.3.14) unstable; urgency=low
* Fix Perl or group pre-depends thing Closes: #46091, #46096, #46233, #45901
apt (0.3.14) unstable; urgency=low
* Fix Perl or group pre-depends thing Closes: #46091, #46096, #46233, #45901
set -e
RES=`apt-config shell CLEAN DSelect::Clean OPTS DSelect::Options \
DPKG Dir::Bin::dpkg APTGET Dir::Bin::apt-get \
set -e
RES=`apt-config shell CLEAN DSelect::Clean OPTS DSelect::Options \
DPKG Dir::Bin::dpkg APTGET Dir::Bin::apt-get \
- ARCHIVES Dir::Cache::Archives/`
+ ARCHIVES Dir::Cache::Archives/ \
+ WAIT DSelect::WaitAfterDownload`
-$APTGET $OPTS dselect-upgrade
-RES=$?
+if [ x$WAIT = "xyes" ]; then
+ $APTGET $OPTS -d dselect-upgrade
+ echo "Press enter to continue." && read RES
+ $APTGET $OPTS dselect-upgrade
+ RES=$?
+else
+ $APTGET $OPTS dselect-upgrade
+ RES=$?
+fi
# 1 means the user choose no at the prompt
if [ $RES -eq 1 ]; then
# 1 means the user choose no at the prompt
if [ $RES -eq 1 ]; then