- report_a_bug() moved to zypper-utils
authorJan Kupec <jkupec@suse.cz>
Thu, 16 Aug 2007 07:18:58 +0000 (07:18 +0000)
committerJan Kupec <jkupec@suse.cz>
Thu, 16 Aug 2007 07:18:58 +0000 (07:18 +0000)
src/zypper-utils.cc
src/zypper-utils.h
src/zypper.cc

index 7582e92..b9dc33c 100644 (file)
@@ -1,11 +1,5 @@
 #include <fstream>
-#include <sstream>
-#include <boost/format.hpp>
 #include "zypper.h"
-#include "zypper-misc.h"
-#include "zypper-tabulator.h"
-
-#include <zypp/Patch.h>
 
 using namespace zypp::detail;
 
@@ -29,6 +23,7 @@ string read_line_from_file( const Pathname &file )
   return token;
  }
 
+// ----------------------------------------------------------------------------
 
 void write_line_to_file( const Pathname &file, const std::string &line )
 {
@@ -39,3 +34,15 @@ void write_line_to_file( const Pathname &file, const std::string &line )
   }
   os.close();
 }
+
+// ----------------------------------------------------------------------------
+
+/// tell to report a bug, and how
+// (multiline, with endls)
+ostream& report_a_bug (ostream& stm)
+{
+  return stm << _("Please file a bug report about this.") << endl
+    // TranslatorExplanation remember not to translate the URL
+    // unless you translate the actual page :)
+             << _("See http://en.opensuse.org/Zypper#Troubleshooting for instructions.") << endl;
+}
index a2cfa70..8a610ce 100644 (file)
@@ -1,21 +1,17 @@
-/*-----------------------------------------------------------*- c++ -*-\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-
-#ifndef ZMART_UTILS_H
-#define ZMART_UTILS_H
+#ifndef ZYPPER_UTILS_H
+#define ZYPPER_UTILS_H
 
+#include <ostream>
 #include <string>
-#include "zypp/Url.h"
-#include "zypp/ResObject.h"
+
+#include <zypp/Pathname.h>
 
 std::string read_line_from_file( const zypp::Pathname &file );
 void write_line_to_file( const zypp::Pathname &file, const std::string &line );
 
-#endif
+/**
+ * Write a suggestion to report a bug to the specified stream.
+ */
+std::ostream & report_a_bug (std::ostream& stm);
 
+#endif /*ZYPPER_UTILS_H*/
index 191252b..7ad11a8 100644 (file)
@@ -36,6 +36,7 @@
 #include "zypper-info.h"
 #include "zypper-getopt.h"
 #include "zypper-command.h"
+#include "zypper-utils.h"
 
 using namespace std;
 using namespace zypp;
@@ -1376,17 +1377,6 @@ int one_command(int argc, char **argv)
 
 // ----------------------------------------------------------------------------
 
-/// tell to report a bug, and how
-// (multiline, with endls)
-ostream& report_a_bug (ostream& stm) {
-  return stm << _("Please file a bug report about this.") << endl
-    // remember not to translate the URL
-    // unless you translate the actual page :)
-            << _("See http://en.opensuse.org/Zypper#Troubleshooting for instructions.") << endl;
-}
-
-// ----------------------------------------------------------------------------
-
 /// process one command from the OS shell or the zypper shell
 // catch unexpected exceptions and tell the user to report a bug (#224216)
 int safe_one_command(int argc, char **argv)