-// AcqTextStatus::IMSHit - Called when an item got a HIT response /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-void AcqTextStatus::IMSHit(pkgAcquire::ItemDesc &Itm)
-{
- cout << '\r' << BlankLine << '\r';
- cout << "Hit " << Itm.Description;
- if (Itm.Owner->FileSize != 0)
- cout << " [" << SizeToStr(Itm.Owner->FileSize) << ']';
- cout << endl;
- Update = true;
-};
- /*}}}*/
-// AcqTextStatus::Fetch - An item has started to download /*{{{*/
-// ---------------------------------------------------------------------
-/* This prints out the short description and the expected size */
-void AcqTextStatus::Fetch(pkgAcquire::ItemDesc &Itm)
-{
- Update = true;
- if (Itm.Owner->Complete == true)
- return;
-
- Itm.Owner->ID = ID++;
-
- cout << '\r' << BlankLine << '\r';
- cout << hex << Itm.Owner->ID << dec << " Get " << Itm.Description;
- if (Itm.Owner->FileSize != 0)
- cout << " [" << SizeToStr(Itm.Owner->FileSize) << ']';
- cout << endl;
-};
- /*}}}*/
-// AcqTextStatus::Done - Completed a download /*{{{*/
-// ---------------------------------------------------------------------
-/* We don't display anything... */
-void AcqTextStatus::Done(pkgAcquire::ItemDesc &Itm)
-{
- Update = true;
-};
- /*}}}*/
-// AcqTextStatus::Fail - Called when an item fails to download /*{{{*/
-// ---------------------------------------------------------------------
-/* We print out the error text */
-void AcqTextStatus::Fail(pkgAcquire::ItemDesc &Itm)
-{
- cout << '\r' << BlankLine << '\r';
- cout << "Err " << Itm.Description << endl;
- cout << " " << Itm.Owner->ErrorText << endl;
- Update = true;
-};
- /*}}}*/
-// AcqTextStatus::Stop - Finished downloading /*{{{*/
-// ---------------------------------------------------------------------
-/* This prints out the bytes downloaded and the overall average line
- speed */
-void AcqTextStatus::Stop()
-{
- pkgAcquireStatus::Stop();
- cout << '\r' << BlankLine << '\r';
-
- if (FetchedBytes == 0)
- cout << flush;
- else
- cout << "Fetched " << SizeToStr(FetchedBytes) << " in " <<
- TimeToStr(ElapsedTime) << " (" << SizeToStr(CurrentCPS) <<
- "/s)" << endl;
-}
- /*}}}*/
-// AcqTextStatus::Pulse - Regular event pulse /*{{{*/
-// ---------------------------------------------------------------------
-/* This draws the current progress. Each line has an overall percent
- meter and a per active item status meter along with an overall
- bandwidth and ETA indicator. */
-void AcqTextStatus::Pulse(pkgAcquire *Owner)
-{
- pkgAcquireStatus::Pulse(Owner);
-
- enum {Long = 0,Medium,Short} Mode = Long;
-
- ScreenWidth = 78;
- char Buffer[300];
- char *End = Buffer + sizeof(Buffer);
- char *S = Buffer;
-
- // Put in the percent done
- sprintf(S,"%ld%%",long(double(CurrentBytes*100.0)/double(TotalBytes)));
+// cout << flNoLink(argv[1]) << endl;
+
+// #if 0
+/* DynamicMMap *FileMap = new DynamicMMap(MMap::Public);
+ pkgFLCache *FList = new pkgFLCache(*FileMap);
+
+ char *Name = "/tmp/test";
+ pkgFLCache::PkgIterator Pkg(*FList,0);
+ pkgFLCache::NodeIterator Node = FList->GetNode(Name,Name+strlen(Name),Pkg.Offset(),true,false);
+ cout << (pkgFLCache::Node *)Node << endl;
+ Node = FList->GetNode(Name,Name+strlen(Name),Pkg.Offset(),true,false);
+ cout << (pkgFLCache::Node *)Node << endl;
+*/
+// #if 0
+ _config->Set("Dir::State::status","/tmp/testing/status");
+
+ debDpkgDB Db;