]> git.saurik.com Git - apt.git/commitdiff
Fixed list notation doc bug and 'b' vs 'B'
authorArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:53:59 +0000 (16:53 +0000)
committerArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:53:59 +0000 (16:53 +0000)
Author: jgg
Date: 1999-06-06 05:52:37 GMT
Fixed list notation doc bug and 'b' vs 'B'

cmdline/acqprogress.cc
cmdline/apt-config.cc
cmdline/apt-get.cc
debian/changelog
debian/postinst
doc/apt-config.8.yo
doc/apt.conf.5.yo

index a5383a838d9cf2e96c805931b030b945420ed68a..5e88d3cd051d481fa8d34734ed463923fb7c52c7 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: acqprogress.cc,v 1.13 1999/04/20 05:59:29 jgg Exp $
+// $Id: acqprogress.cc,v 1.14 1999/06/06 05:52:37 jgg Exp $
 /* ######################################################################
 
    Acquire Progress - Command line progress meter 
 /* ######################################################################
 
    Acquire Progress - Command line progress meter 
@@ -48,7 +48,7 @@ void AcqTextStatus::IMSHit(pkgAcquire::ItemDesc &Itm)
    
    cout << "Hit " << Itm.Description;
    if (Itm.Owner->FileSize != 0)
    
    cout << "Hit " << Itm.Description;
    if (Itm.Owner->FileSize != 0)
-      cout << " [" << SizeToStr(Itm.Owner->FileSize) << "b]";
+      cout << " [" << SizeToStr(Itm.Owner->FileSize) << "B]";
    cout << endl;
    Update = true;
 };
    cout << endl;
    Update = true;
 };
@@ -72,7 +72,7 @@ void AcqTextStatus::Fetch(pkgAcquire::ItemDesc &Itm)
    
    cout << "Get:" << Itm.Owner->ID << ' ' << Itm.Description;
    if (Itm.Owner->FileSize != 0)
    
    cout << "Get:" << Itm.Owner->ID << ' ' << Itm.Description;
    if (Itm.Owner->FileSize != 0)
-      cout << " [" << SizeToStr(Itm.Owner->FileSize) << "b]";
+      cout << " [" << SizeToStr(Itm.Owner->FileSize) << "B]";
    cout << endl;
 };
                                                                        /*}}}*/
    cout << endl;
 };
                                                                        /*}}}*/
@@ -122,9 +122,9 @@ void AcqTextStatus::Stop()
       cout << '\r' << BlankLine << '\r';
    
    if (FetchedBytes != 0)
       cout << '\r' << BlankLine << '\r';
    
    if (FetchedBytes != 0)
-      cout << "Fetched " << SizeToStr(FetchedBytes) << "b in " <<
+      cout << "Fetched " << SizeToStr(FetchedBytes) << "B in " <<
          TimeToStr(ElapsedTime) << " (" << SizeToStr(CurrentCPS) << 
          TimeToStr(ElapsedTime) << " (" << SizeToStr(CurrentCPS) << 
-         "b/s)" << endl;
+         "B/s)" << endl;
 }
                                                                        /*}}}*/
 // AcqTextStatus::Pulse - Regular event pulse                          /*{{{*/
 }
                                                                        /*}}}*/
 // AcqTextStatus::Pulse - Regular event pulse                          /*{{{*/
@@ -189,7 +189,7 @@ void AcqTextStatus::Pulse(pkgAcquire *Owner)
       else
       {
         if (Mode == Medium || I->TotalSize == 0)
       else
       {
         if (Mode == Medium || I->TotalSize == 0)
-           snprintf(S,End-S," %sb",SizeToStr(I->CurrentSize).c_str());
+           snprintf(S,End-S," %sB",SizeToStr(I->CurrentSize).c_str());
       }
       S += strlen(S);
       
       }
       S += strlen(S);
       
@@ -200,7 +200,7 @@ void AcqTextStatus::Pulse(pkgAcquire *Owner)
            snprintf(S,End-S," %lu%%",
                     long(double(I->CurrentSize*100.0)/double(I->TotalSize)));
         else
            snprintf(S,End-S," %lu%%",
                     long(double(I->CurrentSize*100.0)/double(I->TotalSize)));
         else
-           snprintf(S,End-S,"/%sb %lu%%",SizeToStr(I->TotalSize).c_str(),
+           snprintf(S,End-S,"/%sB %lu%%",SizeToStr(I->TotalSize).c_str(),
                     long(double(I->CurrentSize*100.0)/double(I->TotalSize)));
       }      
       S += strlen(S);
                     long(double(I->CurrentSize*100.0)/double(I->TotalSize)));
       }      
       S += strlen(S);
@@ -222,7 +222,7 @@ void AcqTextStatus::Pulse(pkgAcquire *Owner)
    {      
       char Tmp[300];
       unsigned long ETA = (unsigned long)((TotalBytes - CurrentBytes)/CurrentCPS);
    {      
       char Tmp[300];
       unsigned long ETA = (unsigned long)((TotalBytes - CurrentBytes)/CurrentCPS);
-      sprintf(Tmp," %sb/s %s",SizeToStr(CurrentCPS).c_str(),TimeToStr(ETA).c_str());
+      sprintf(Tmp," %sB/s %s",SizeToStr(CurrentCPS).c_str(),TimeToStr(ETA).c_str());
       unsigned int Len = strlen(Buffer);
       unsigned int LenT = strlen(Tmp);
       if (Len + LenT < ScreenWidth)
       unsigned int Len = strlen(Buffer);
       unsigned int LenT = strlen(Tmp);
       if (Len + LenT < ScreenWidth)
index c626a1ee0ae50c6e808ab1445ac91bc079649474..3de59aee55bbe7fb538a5c89eb8e7eb447d51a25 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: apt-config.cc,v 1.5 1999/05/23 05:45:12 jgg Exp $
+// $Id: apt-config.cc,v 1.6 1999/06/06 05:52:37 jgg Exp $
 /* ######################################################################
    
    APT Config - Program to manipulate APT configuration files
 /* ######################################################################
    
    APT Config - Program to manipulate APT configuration files
@@ -48,6 +48,15 @@ bool DoShell(CommandLine &CmdL)
         cout << *I << "=\"" << _config->Find(I[1]) << '"' << endl;
    }
    
         cout << *I << "=\"" << _config->Find(I[1]) << '"' << endl;
    }
    
+   return true;
+}
+                                                                       /*}}}*/
+// DoDump - Dump the configuration space                               /*{{{*/
+// ---------------------------------------------------------------------
+/* */
+bool DoDump(CommandLine &CmdL)
+{
+   _config->Dump();
    return true;
 }
                                                                        /*}}}*/
    return true;
 }
                                                                        /*}}}*/
@@ -67,6 +76,7 @@ int ShowHelp()
    cout << endl;
    cout << "Commands:" << endl;
    cout << "   shell - Shell mode" << endl;
    cout << endl;
    cout << "Commands:" << endl;
    cout << "   shell - Shell mode" << endl;
+   cout << "   dump - Show the configuration" << endl;
    cout << endl;
    cout << "Options:" << endl;
    cout << "  -h   This help text." << endl;
    cout << endl;
    cout << "Options:" << endl;
    cout << "  -h   This help text." << endl;
@@ -85,6 +95,7 @@ int main(int argc,const char *argv[])
       {'o',"option",0,CommandLine::ArbItem},
       {0,0,0,0}};
    CommandLine::Dispatch Cmds[] = {{"shell",&DoShell},
       {'o',"option",0,CommandLine::ArbItem},
       {0,0,0,0}};
    CommandLine::Dispatch Cmds[] = {{"shell",&DoShell},
+                                   {"dump",&DoDump},
                                    {0,0}};
    
    // Parse the command line and initialize the package library
                                    {0,0}};
    
    // Parse the command line and initialize the package library
index 585026aba57e87e829251280ab8539a77b5eef76..a40b8a4c7d626e925ac8770fb20f6f6e104140e3 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: apt-get.cc,v 1.63 1999/06/05 07:30:18 jgg Exp $
+// $Id: apt-get.cc,v 1.64 1999/06/06 05:52:37 jgg Exp $
 /* ######################################################################
    
    apt-get - Cover for dpkg
 /* ######################################################################
    
    apt-get - Cover for dpkg
@@ -525,17 +525,17 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true,bool Saftey =
    // Number of bytes
    c1out << "Need to get ";
    if (DebBytes != FetchBytes)
    // Number of bytes
    c1out << "Need to get ";
    if (DebBytes != FetchBytes)
-      c1out << SizeToStr(FetchBytes) << "b/" << SizeToStr(DebBytes) << 'b';
+      c1out << SizeToStr(FetchBytes) << "B/" << SizeToStr(DebBytes) << 'B';
    else
    else
-      c1out << SizeToStr(DebBytes) << 'b';
+      c1out << SizeToStr(DebBytes) << 'B';
       
    c1out << " of archives. After unpacking ";
    
    // Size delta
    if (Cache->UsrSize() >= 0)
       
    c1out << " of archives. After unpacking ";
    
    // Size delta
    if (Cache->UsrSize() >= 0)
-      c1out << SizeToStr(Cache->UsrSize()) << "b will be used." << endl;
+      c1out << SizeToStr(Cache->UsrSize()) << "B will be used." << endl;
    else
    else
-      c1out << SizeToStr(-1*Cache->UsrSize()) << "b will be freed." << endl;
+      c1out << SizeToStr(-1*Cache->UsrSize()) << "B will be freed." << endl;
 
    if (_error->PendingError() == true)
       return false;
 
    if (_error->PendingError() == true)
       return false;
@@ -1024,7 +1024,7 @@ class LogCleaner : public pkgArchiveCleaner
    protected:
    virtual void Erase(const char *File,string Pkg,string Ver,struct stat &St) 
    {
    protected:
    virtual void Erase(const char *File,string Pkg,string Ver,struct stat &St) 
    {
-      cout << "Del " << Pkg << " " << Ver << " [" << SizeToStr(St.st_size) << "b]" << endl;
+      cout << "Del " << Pkg << " " << Ver << " [" << SizeToStr(St.st_size) << "B]" << endl;
    };
 };
 
    };
 };
 
@@ -1194,9 +1194,9 @@ bool DoSource(CommandLine &CmdL)
    // Number of bytes
    c1out << "Need to get ";
    if (DebBytes != FetchBytes)
    // Number of bytes
    c1out << "Need to get ";
    if (DebBytes != FetchBytes)
-      c1out << SizeToStr(FetchBytes) << "b/" << SizeToStr(DebBytes) << 'b';
+      c1out << SizeToStr(FetchBytes) << "B/" << SizeToStr(DebBytes) << 'B';
    else
    else
-      c1out << SizeToStr(DebBytes) << 'b';
+      c1out << SizeToStr(DebBytes) << 'B';
    c1out << " of source archives." << endl;
 
    if (_config->FindB("APT::Get::Simulate",false) == true)
    c1out << " of source archives." << endl;
 
    if (_config->FindB("APT::Get::Simulate",false) == true)
index 6136fa9d9e6a7da5240a0edd935ae21a71a4517b..4ed4424deebc1d919db44049abe4e17a6bb585e7 100644 (file)
@@ -23,6 +23,8 @@ apt (0.3.6.1) unstable; urgency=low
   * Fixed typo in apt-get help. Closes: #38712
   * Improved the error message in the case of broken held package. Closes: #38777
   * Fixed handling of MD5 failures
   * Fixed typo in apt-get help. Closes: #38712
   * Improved the error message in the case of broken held package. Closes: #38777
   * Fixed handling of MD5 failures
+  * Documented list notation Closes: #39008
+  * Change the 'b' to 'B'. Closes: #39007 
   
  -- Jason Gunthorpe <jgg@debian.org>  Wed, 12 May 1999 09:18:49 -0700
  
   
  -- Jason Gunthorpe <jgg@debian.org>  Wed, 12 May 1999 09:18:49 -0700
  
index 87476bfc08afbca083689814bd1f2dca37754567..d1b46d1a247c13b6b60354934d43a4fb2acb03e1 100755 (executable)
@@ -18,8 +18,9 @@ create_apt_conf ()
 # Use for a local mirror - remove the ftp1 http lines for the bits
 # your mirror contains.
 # deb file:/your/mirror/here/debian stable main contrib non-free
 # Use for a local mirror - remove the ftp1 http lines for the bits
 # your mirror contains.
 # deb file:/your/mirror/here/debian stable main contrib non-free
-# See sources.list(5) for more information, especial
+# See sources.list(5) for more information, especialy
 # Remember that you can only use http, ftp or file URIs
 # Remember that you can only use http, ftp or file URIs
+# CDROMs are managed throught the apt-cdrom tool.
 deb http://http.us.debian.org/debian stable main contrib non-free
 deb http://non-us.debian.org/debian-non-US stable non-US
 
 deb http://http.us.debian.org/debian stable main contrib non-free
 deb http://non-us.debian.org/debian-non-US stable non-US
 
index 93da32905dfa435edb792e6df7abdf54ae28e739..809c790c2c6e202331d240dd16ae0a4f1adb771f 100644 (file)
@@ -14,6 +14,7 @@ applications.
 em(command) is one of:
 itemize(
   it() shell
 em(command) is one of:
 itemize(
   it() shell
+  it() dump
 )
 
 Unless the -h, or --help option is given one of the above commands
 )
 
 Unless the -h, or --help option is given one of the above commands
@@ -41,6 +42,9 @@ MyApp::Options with a default of -f.
 If the configuration item to retrieve is prefixed with a / then it will
 be retrieved using filename mode which prepends base paths.
 
 If the configuration item to retrieve is prefixed with a / then it will
 be retrieved using filename mode which prepends base paths.
 
+dit(bf(dump))
+Just show the contents of the configuration space.
+
 enddit()
 
 manpageoptions()
 enddit()
 
 manpageoptions()
index 96b2e7dc562ff38970fe14776aee698aa9834a51..4eee5d0ea6dd426d2d47cacea23119ea9d1d309c 100644 (file)
@@ -30,9 +30,17 @@ verb(APT {
 };
 )
 with newlines placed to make
 };
 )
 with newlines placed to make
-it more readable. In general the sample configuration file in
+it more readable. Lists can be created by opening a scope an including a 
+single word enclosed in quotes followed by a semicolon. 
+In general the sample configuration file in
 em(/usr/doc/apt/examples/apt.conf) is a good guide for how it should look.
 
 em(/usr/doc/apt/examples/apt.conf) is a good guide for how it should look.
 
+All of the APT tools take a -o option which allows an arbitary configuration 
+directive to be specified on the command line. The syntax is a full option
+name (APT::Get::Assume-Yes for instance) followed by an equals sign then the
+new value of the option. Lists can be appended too by adding a trailing ::
+to the list name.
+
 manpagesection(The APT Group)
 This group of options controls general APT behavoir as well as holding the
 options for all of the tools.
 manpagesection(The APT Group)
 This group of options controls general APT behavoir as well as holding the
 options for all of the tools.