void Fetcher::start( const Pathname &dest_dir )
{
MediaSetAccess media(_url, _path);
-
+
for ( list<OnMediaLocation>::const_iterator it_res = _resources.begin(); it_res != _resources.end(); ++it_res )
{
bool got_from_cache = false;
MIL << "file " << (*it_res).filename() << " found in previous cache. Using cached copy." << endl;
// checksum is already checked.
// we could later implement double failover and try to download if file copy fails.
-
+
// replicate the complete path in the target directory
Pathname dest_full_path = dest_dir + (*it_res).filename();
if ( assert_dir( dest_full_path.dirname() ) != 0 )
// try next cache
continue;
}
-
+
got_from_cache = true;
break;
}
{
// File exists in cache but with a different checksum
// so just try next cache
- continue;
+ continue;
}
}
else
continue;
}
}
-
+
if ( ! got_from_cache )
{
// try to get the file from the net
// ZYPP_THROW(SourceMetadataException( file_url.asString() + " " + N_(" fails checksum verification.") ));
// }
-} // namespace zypp
\ No newline at end of file
+} // namespace zypp
namespace zypp
{
-
- /**
+
+ /**
* Edition represents <code>[epoch:]version[-release]</code>
*
* This class allows to retrieve a group of files which can
* Constructs a fetcher from a url and path
*/
Fetcher( const Url &url, const Pathname &path );
-
+
/**
* Enqueue a object for transferal, they will not
* be transfered until \ref start() is called
* directory
*/
void start( const Pathname &dest_dir );
-
+
private:
Url _url;
Pathname _path;
};
} // ns zypp
-#endif
\ No newline at end of file
+#endif
/** \file zypp/Pathname.cc
*
*/
+#include <iostream>
+
#include "zypp/Pathname.h"
using std::string;
/////////////////////////////////////////////////////////////////
} // namespace zypp
-///////////////////////////////////////////////////////////////////
\ No newline at end of file
+///////////////////////////////////////////////////////////////////
/** \file zypp/Rel.cc
*
*/
+#include <iostream>
#include <map>
#include "zypp/base/Exception.h"
#include <fcntl.h>
}
+#include <iostream>
+
#include "zypp/base/Exception.h"
#include "zypp/base/Fd.h"
}
} // ns parser
-} // ns zypp
\ No newline at end of file
+} // ns zypp
* 02111-1307, USA.
*/
+#include <iostream>
+
#include "zypp/solver/detail/Pending.h"
/////////////////////////////////////////////////////////////////////////
-namespace zypp
+namespace zypp
{ ///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
namespace solver
/////////////////////////////////////////////////////////////////////
namespace detail
{ ///////////////////////////////////////////////////////////////////
-
+
using namespace std;
-
+
IMPL_PTR_TYPE(Pending);
-
+
//---------------------------------------------------------------------------
-
+
string
Pending::asString ( void ) const
{
return toString (*this);
}
-
-
+
+
string
Pending::toString ( const Pending & pending )
{
return "<pending/>";
}
-
-
+
+
ostream &
Pending::dumpOn (ostream & str) const
{
str << asString();
return str;
}
-
-
+
+
ostream &
operator<< (ostream & os, const Pending & pending)
{
return os << pending.asString();
}
-
+
//---------------------------------------------------------------------------
-
+
Pending::Pending (const char *description)
{
}
-
-
+
+
Pending::~Pending()
{
}
-
+
//---------------------------------------------------------------------------
-
+
///////////////////////////////////////////////////////////////////
};// namespace detail
/////////////////////////////////////////////////////////////////////
// CLASS NAME : Pending
class Pending : public base::ReferenceCounted, private base::NonCopyable {
-
+
typedef enum {
PENDING_STATUS_INVALID = 0,
}
}
-#endif
\ No newline at end of file
+#endif
}// ns susetags
}// ns source
-} // ns zypp
\ No newline at end of file
+} // ns zypp
} // ns source
} // ns zypp
-#endif
\ No newline at end of file
+#endif
inline Locale defaultTextLocale()
{
Locale ret( "en" );
- char * envlist[] = { "LC_ALL", "LC_CTYPE", "LANG", NULL };
- for ( char ** envvar = envlist; *envvar; ++envvar )
+ const char * envlist[] = { "LC_ALL", "LC_CTYPE", "LANG", NULL };
+ for ( const char ** envvar = envlist; *envvar; ++envvar )
{
- char * envlang = getenv( *envvar );
+ const char * envlang = getenv( *envvar );
if ( envlang )
{
std::string envstr( envlang );
}
}
-#endif
\ No newline at end of file
+#endif
}
}
-#endif
\ No newline at end of file
+#endif