Zypp Commits
Threads by month
- ----- 2024 -----
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
July 2007
- 11 participants
- 500 discussions
[zypp-commit] r6354 - /trunk/libzypp/package/libzypp.changes
by mlandres@svn.opensuse.org 31 Jul '07
by mlandres@svn.opensuse.org 31 Jul '07
31 Jul '07
Author: mlandres
Date: Tue Jul 31 21:59:00 2007
New Revision: 6354
URL: http://svn.opensuse.org/viewcvs/zypp?rev=6354&view=rev
Log:
changes
Modified:
trunk/libzypp/package/libzypp.changes
Modified: trunk/libzypp/package/libzypp.changes
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/package/libzypp.changes?…
==============================================================================
--- trunk/libzypp/package/libzypp.changes (original)
+++ trunk/libzypp/package/libzypp.changes Tue Jul 31 21:59:00 2007
@@ -1,4 +1,14 @@
-------------------------------------------------------------------
+Tue Jul 31 22:01:08 CEST 2007 - ma(a)suse.de
+
+- Added package attributes Package::sourcePkgName and
+ Package::sourcePkgEdition. Name and edition of the source
+ rpm this package was built from.
+- Added ZYpp::installSrcPackage to install a single source package.
+- revision 6353
+- version 3.13.4
+
+-------------------------------------------------------------------
Tue Jul 31 19:06:54 CEST 2007 - ma(a)suse.de
- Temorary files and directories created by makeSibling use the
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
[zypp-commit] r6353 - in /trunk/libzypp: ./ devel/devel.ma/ zypp/ zypp/detail/ zypp/repo/cached/ zypp/target/ zypp/zypp_detail/
by mlandres@svn.opensuse.org 31 Jul '07
by mlandres@svn.opensuse.org 31 Jul '07
31 Jul '07
Author: mlandres
Date: Tue Jul 31 21:58:43 2007
New Revision: 6353
URL: http://svn.opensuse.org/viewcvs/zypp?rev=6353&view=rev
Log:
- Added package attributes Package::sourcePkgName and
Package::sourcePkgEdition. Name and edition of the source
rpm this package was built from.
- Added ZYpp::installSrcPackage to install a single source package.
Modified:
trunk/libzypp/VERSION.cmake
trunk/libzypp/devel/devel.ma/Parse.cc
trunk/libzypp/zypp/Package.cc
trunk/libzypp/zypp/Package.h
trunk/libzypp/zypp/ZYpp.cc
trunk/libzypp/zypp/ZYpp.h
trunk/libzypp/zypp/detail/PackageImplIf.cc
trunk/libzypp/zypp/detail/PackageImplIf.h
trunk/libzypp/zypp/detail/SrcPackageImplIf.cc
trunk/libzypp/zypp/detail/SrcPackageImplIf.h
trunk/libzypp/zypp/repo/cached/PackageImpl.cc
trunk/libzypp/zypp/repo/cached/PackageImpl.h
trunk/libzypp/zypp/target/TargetImpl.cc
trunk/libzypp/zypp/target/TargetImpl.h
trunk/libzypp/zypp/zypp_detail/ZYppImpl.cc
trunk/libzypp/zypp/zypp_detail/ZYppImpl.h
Modified: trunk/libzypp/VERSION.cmake
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/VERSION.cmake?rev=6353&r…
==============================================================================
--- trunk/libzypp/VERSION.cmake (original)
+++ trunk/libzypp/VERSION.cmake Tue Jul 31 21:58:43 2007
@@ -47,4 +47,4 @@
SET(LIBZYPP_MAJOR "3")
SET(LIBZYPP_MINOR "13")
SET(LIBZYPP_COMPATMINOR "13")
-SET(LIBZYPP_PATCH "3")
+SET(LIBZYPP_PATCH "4")
Modified: trunk/libzypp/devel/devel.ma/Parse.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.ma/Parse.cc?…
==============================================================================
--- trunk/libzypp/devel/devel.ma/Parse.cc (original)
+++ trunk/libzypp/devel/devel.ma/Parse.cc Tue Jul 31 21:58:43 2007
@@ -48,8 +48,11 @@
{
bool operator()( const PoolItem & obj_r )
{
- MIL << obj_r << " " << obj_r->summary() << endl;
- MIL << obj_r << " " << obj_r->description() << endl;
+ Package::constPtr p( asKind<Package>(obj_r) );
+ if ( p )
+ {
+ MIL << p << " \t" << p->sourcePkgName() << '-' << p->sourcePkgEdition() << endl;
+ }
return true;
}
@@ -264,25 +267,6 @@
//zypp::base::LogControl::instance().logfile( "log.restrict" );
INT << "===[START]==========================================" << endl;
- Capability c( CapFactory().parse( ResTraits<Package>::kind,
- "modalias(kernel-bigsmp:pci:kfghkskd***k)" ) );
-
- capability::ModaliasCap::constPtr mc( capability::asKind<capability::ModaliasCap>(c) );
-
- DBG << c << endl;
- DBG << c.index() << endl;
-
- MIL << mc << endl;
- MIL << mc->name() << endl;
- MIL << mc->pkgname() << endl;
-
-
-
- ///////////////////////////////////////////////////////////////////
- INT << "===[END]============================================" << endl << endl;
- zypp::base::LogControl::instance().logNothing();
- return 0;
-
RepoManager repoManager( makeRepoManager( "/Local/ROOT" ) );
RepoInfoList repos = repoManager.knownRepositories();
SEC << repos << endl;
@@ -346,7 +330,7 @@
SEC << pool.knownRepositoriesSize() << endl;
std::for_each( pool.knownRepositoriesBegin(), pool.knownRepositoriesEnd(), Print() );
- std::for_each( pool.byNameBegin("glibc"), pool.byNameEnd("glibc"), Xprint() );
+ std::for_each( pool.begin(), pool.end(), Xprint() );
///////////////////////////////////////////////////////////////////
INT << "===[END]============================================" << endl << endl;
Modified: trunk/libzypp/zypp/Package.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Package.cc?rev=6353…
==============================================================================
--- trunk/libzypp/zypp/Package.cc (original)
+++ trunk/libzypp/zypp/Package.cc Tue Jul 31 21:58:43 2007
@@ -111,7 +111,13 @@
OnMediaLocation Package::location() const
{ return pimpl().location(); }
-
+
+ std::string Package::sourcePkgName() const
+ { return pimpl().sourcePkgName(); }
+
+ Edition Package::sourcePkgEdition() const
+ { return pimpl().sourcePkgEdition(); }
+
/////////////////////////////////////////////////////////////////
} // namespace zypp
///////////////////////////////////////////////////////////////////
Modified: trunk/libzypp/zypp/Package.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Package.h?rev=6353&…
==============================================================================
--- trunk/libzypp/zypp/Package.h (original)
+++ trunk/libzypp/zypp/Package.h Tue Jul 31 21:58:43 2007
@@ -40,7 +40,7 @@
typedef std::set<PackageKeyword> Keywords;
public:
-
+
/** Get the package change log */
Changelog changelog() const;
/** */
@@ -77,19 +77,29 @@
/** Disk usage per directory */
DiskUsage diskusage() const;
-
+
+ /** Name of the source rpm this package was built from.
+ * Empty if unknown.
+ */
+ std::string sourcePkgName() const;
+
+ /** Edition of the source rpm this package was built from.
+ * Empty if unknown.
+ */
+ Edition sourcePkgEdition() const;
+
/**
* Checksum the source says this package should have
* \deprecated Use location().checksum()
*/
ZYPP_DEPRECATED CheckSum checksum() const
{ return location().checksum(); }
-
+
/**
* \short Location of the resolvable in the repository
*/
OnMediaLocation location() const;
-
+
protected:
Package( const NVRAD & nvrad_r );
/** Dtor */
Modified: trunk/libzypp/zypp/ZYpp.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ZYpp.cc?rev=6353&r1…
==============================================================================
--- trunk/libzypp/zypp/ZYpp.cc (original)
+++ trunk/libzypp/zypp/ZYpp.cc Tue Jul 31 21:58:43 2007
@@ -98,7 +98,7 @@
void ZYpp::initTarget(const Pathname & root, bool commit_only )
{ _pimpl->initTarget(root, commit_only); }
-
+
void ZYpp::initializeTarget(const Pathname & root)
{ _pimpl->initializeTarget(root); }
@@ -108,6 +108,9 @@
ZYppCommitResult ZYpp::commit( const ZYppCommitPolicy & policy_r )
{ return _pimpl->commit( policy_r ); }
+ void ZYpp::installSrcPackage( const ResTraits<SrcPackage>::constPtrType & srcPackage_r )
+ { _pimpl->installSrcPackage( srcPackage_r ); }
+
///////////////////////////////////////////////////////////////////
void ZYpp::setTextLocale( const Locale & textLocale_r )
@@ -139,7 +142,7 @@
Pathname ZYpp::tmpPath() const
{ return _pimpl->tmpPath(); }
-
+
void ZYpp::setHomePath( const Pathname & path )
{ _pimpl->setHomePath(path); }
Modified: trunk/libzypp/zypp/ZYpp.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ZYpp.h?rev=6353&r1=…
==============================================================================
--- trunk/libzypp/zypp/ZYpp.h (original)
+++ trunk/libzypp/zypp/ZYpp.h Tue Jul 31 21:58:43 2007
@@ -20,6 +20,7 @@
#include "zypp/base/Deprecated.h"
#include "zypp/ZYppCommit.h"
+#include "zypp/ResTraits.h"
#include "zypp/Target.h"
#include "zypp/Resolver.h"
@@ -59,7 +60,7 @@
public:
- /**
+ /**
* Access to the main resolvable pool
* \ref zypp::ResPool
*/
@@ -78,7 +79,7 @@
DiskUsageCounter::MountPointSet diskUsage();
void setPartitions(const DiskUsageCounter::MountPointSet &mp);
-
+
DiskUsageCounter::MountPointSet getPartitions() const;
public:
@@ -97,8 +98,8 @@
* \throws Exception
* if commit_only == true, just init the target, dont populate store or pool
*/
- ZYPP_DEPRECATED void initTarget(const Pathname & root, bool commit_only = false);
-
+ ZYPP_DEPRECATED void initTarget(const Pathname & root, bool commit_only = false);
+
/**
* \throws Exception
*/
@@ -115,6 +116,11 @@
*/
ZYppCommitResult commit( const ZYppCommitPolicy & policy_r );
+ /** Install a source package on the Target.
+ * \throws Exception
+ */
+ void installSrcPackage( const ResTraits<SrcPackage>::constPtrType & srcPackage_r );
+
public:
/** */
Resolver_Ptr resolver() const;
@@ -154,10 +160,10 @@
public:
/** Get the path where zypp related plugins store persistent data and caches */
Pathname homePath() const;
-
+
/** Get the path where zypp related plugins store temp data */
Pathname tmpPath() const;
-
+
/** set the home, if you need to change it */
void setHomePath( const Pathname & path );
Modified: trunk/libzypp/zypp/detail/PackageImplIf.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/detail/PackageImplI…
==============================================================================
--- trunk/libzypp/zypp/detail/PackageImplIf.cc (original)
+++ trunk/libzypp/zypp/detail/PackageImplIf.cc Tue Jul 31 21:58:43 2007
@@ -21,6 +21,9 @@
namespace detail
{ /////////////////////////////////////////////////////////////////
+ ByteCount PackageImplIf::downloadSize() const
+ { return location().downloadSize(); }
+
unsigned PackageImplIf::mediaNr() const
{ return location().medianr(); }
@@ -71,9 +74,6 @@
ByteCount PackageImplIf::sourcesize() const
{ return ByteCount(); }
- ByteCount PackageImplIf::downloadSize() const
- { return location().downloadSize(); }
-
OnMediaLocation PackageImplIf::location() const
{ return OnMediaLocation(); }
@@ -92,6 +92,12 @@
std::list<PackageImplIf::PatchRpm> PackageImplIf::patchRpms() const
{ return std::list<PatchRpm>(); }
+ std::string PackageImplIf::sourcePkgName() const
+ { return std::string(); }
+
+ Edition PackageImplIf::sourcePkgEdition() const
+ { return Edition(); }
+
/////////////////////////////////////////////////////////////////
} // namespace detail
///////////////////////////////////////////////////////////////////
Modified: trunk/libzypp/zypp/detail/PackageImplIf.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/detail/PackageImplI…
==============================================================================
--- trunk/libzypp/zypp/detail/PackageImplIf.h (original)
+++ trunk/libzypp/zypp/detail/PackageImplIf.h Tue Jul 31 21:58:43 2007
@@ -49,13 +49,18 @@
typedef packagedelta::PatchRpm PatchRpm;
typedef std::set<PackageKeyword> Keywords;
- public:
- /** Overloaded ResObjectImpl attribute.
+ public:
+ /** Overloaded ResObjectImpl attribute.
* \return The \ref location media number.
*/
virtual unsigned mediaNr() const;
- public:
+ /** Overloaded ResObjectImpl attribute.
+ * \return The \ref location downloadSize.
+ */
+ virtual ByteCount downloadSize() const;
+
+ public:
/** \name Rpm Package Attributes. */
//@{
@@ -99,10 +104,18 @@
/** */
virtual std::list<PatchRpm> patchRpms() const PURE_VIRTUAL;
- virtual ByteCount downloadSize() const PURE_VIRTUAL;
-
virtual OnMediaLocation location() const PURE_VIRTUAL;
+ /** Name of the source rpm this package was built from.
+ * Empty if unknown.
+ */
+ virtual std::string sourcePkgName() const PURE_VIRTUAL;
+
+ /** Edition of the source rpm this package was built from.
+ * Empty if unknown.
+ */
+ virtual Edition sourcePkgEdition() const PURE_VIRTUAL;
+
//@}
};
Modified: trunk/libzypp/zypp/detail/SrcPackageImplIf.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/detail/SrcPackageIm…
==============================================================================
--- trunk/libzypp/zypp/detail/SrcPackageImplIf.cc (original)
+++ trunk/libzypp/zypp/detail/SrcPackageImplIf.cc Tue Jul 31 21:58:43 2007
@@ -21,19 +21,22 @@
namespace detail
{ /////////////////////////////////////////////////////////////////
+ ByteCount SrcPackageImplIf::downloadSize() const
+ { return location().downloadSize(); }
+
+ unsigned SrcPackageImplIf::mediaNr() const
+ { return location().medianr(); }
+
/////////////////////////////////////////////////////////////////
// Default implementation of SrcPackageImplIf attributes,
// as far as resonable.
/////////////////////////////////////////////////////////////////
- OnMediaLocation SrcPackageImplIf::location() const
- { return OnMediaLocation(); }
-
- ByteCount SrcPackageImplIf::downloadSize() const
- { return location().downloadSize(); }
+ OnMediaLocation SrcPackageImplIf::location() const
+ { return OnMediaLocation(); }
- DiskUsage SrcPackageImplIf::diskusage() const
- { return DiskUsage(); }
+ DiskUsage SrcPackageImplIf::diskusage() const
+ { return DiskUsage(); }
/////////////////////////////////////////////////////////////////
} // namespace detail
Modified: trunk/libzypp/zypp/detail/SrcPackageImplIf.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/detail/SrcPackageIm…
==============================================================================
--- trunk/libzypp/zypp/detail/SrcPackageImplIf.h (original)
+++ trunk/libzypp/zypp/detail/SrcPackageImplIf.h Tue Jul 31 21:58:43 2007
@@ -40,12 +40,22 @@
typedef SrcPackage ResType;
public:
- virtual OnMediaLocation location() const PURE_VIRTUAL;
+ /** Overloaded ResObjectImpl attribute.
+ * \return The \ref location media number.
+ */
+ virtual unsigned mediaNr() const;
+
+ /** Overloaded ResObjectImpl attribute.
+ * \return The \ref location downloadSize.
+ */
+ virtual ByteCount downloadSize() const;
+
+ public:
/** */
- virtual ByteCount downloadSize() const PURE_VIRTUAL;
+ virtual OnMediaLocation location() const PURE_VIRTUAL;
/** */
virtual DiskUsage diskusage() const PURE_VIRTUAL;
-
+
};
///////////////////////////////////////////////////////////////////
Modified: trunk/libzypp/zypp/repo/cached/PackageImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/cached/Package…
==============================================================================
--- trunk/libzypp/zypp/repo/cached/PackageImpl.cc (original)
+++ trunk/libzypp/zypp/repo/cached/PackageImpl.cc Tue Jul 31 21:58:43 2007
@@ -193,6 +193,16 @@
return std::list<std::string>();
}
+std::string PackageImpl::sourcePkgName() const
+{
+ return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrPackageSourcePkgName() );
+}
+
+Edition PackageImpl::sourcePkgEdition() const
+{
+ return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrPackageSourcePkgEdition() );
+}
+
/////////////////////////////////////////////////////////////////
} } } // namespace zypp::repo::cached
///////////////////////////////////////////////////////////////////
Modified: trunk/libzypp/zypp/repo/cached/PackageImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/cached/Package…
==============================================================================
--- trunk/libzypp/zypp/repo/cached/PackageImpl.h (original)
+++ trunk/libzypp/zypp/repo/cached/PackageImpl.h Tue Jul 31 21:58:43 2007
@@ -30,7 +30,7 @@
public:
PackageImpl( const data::RecordId &id, repo::cached::RepoImpl::Ptr repository_r );
-
+
virtual TranslatedText summary() const;
virtual TranslatedText description() const;
virtual TranslatedText insnotify() const;
@@ -41,7 +41,7 @@
virtual bool installOnly() const;
virtual Date buildtime() const;
virtual Date installtime() const;
-
+
// PACKAGE
virtual std::string buildhost() const;
virtual std::string distribution() const;
@@ -61,12 +61,11 @@
virtual std::list<std::string> authors() const;
virtual std::list<std::string> filenames() const;
virtual OnMediaLocation location() const;
-
- /*virtual std::list<DeltaRpm> deltaRpms() const;
- virtual std::list<PatchRpm> patchRpms() const;
- */
+ virtual std::string sourcePkgName() const;
+ virtual Edition sourcePkgEdition() const;
+
virtual Repository repository() const;
-
+
private:
repo::cached::RepoImpl::Ptr _repository;
Modified: trunk/libzypp/zypp/target/TargetImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/target/TargetImpl.c…
==============================================================================
--- trunk/libzypp/zypp/target/TargetImpl.cc (original)
+++ trunk/libzypp/zypp/target/TargetImpl.cc Tue Jul 31 21:58:43 2007
@@ -25,6 +25,7 @@
#include "zypp/Resolvable.h"
#include "zypp/ResObject.h"
#include "zypp/Package.h"
+#include "zypp/SrcPackage.h"
#include "zypp/Pattern.h"
#include "zypp/Selection.h"
#include "zypp/Script.h"
@@ -793,6 +794,15 @@
}
}
+ void TargetImpl::installSrcPackage( const SrcPackage::constPtr & srcPackage_r )
+ {
+ ZYPP_THROW( Exception("srcPackage install not yet implemented") );
+#warning IMPLEMENT IT
+ // Provide srcPackage_r on the local disk and install it using
+ // _rpm.installPackage( localfile );
+ }
+
+
/////////////////////////////////////////////////////////////////
} // namespace target
///////////////////////////////////////////////////////////////////
Modified: trunk/libzypp/zypp/target/TargetImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/target/TargetImpl.h…
==============================================================================
--- trunk/libzypp/zypp/target/TargetImpl.h (original)
+++ trunk/libzypp/zypp/target/TargetImpl.h Tue Jul 31 21:58:43 2007
@@ -113,6 +113,9 @@
*/
PoolItemList commit( const PoolItemList & items_r, const ZYppCommitPolicy & policy_r, const ResPool & pool_r );
+ /** Install a source package on the Target. */
+ void installSrcPackage( const ResTraits<SrcPackage>::constPtrType & srcPackage_r );
+
/** Overload to realize stream output. */
virtual std::ostream & dumpOn( std::ostream & str ) const
{
@@ -135,12 +138,12 @@
/** return the last modification date of the target */
Date timestamp() const;
-
- /**
+
+ /**
* reload the target in future calls if
* needed.
* note the loading can actually be delayed, but
- * the next call to resolvables must reflect the
+ * the next call to resolvables must reflect the
* status of the system.
*/
void reset();
Modified: trunk/libzypp/zypp/zypp_detail/ZYppImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/zypp_detail/ZYppImp…
==============================================================================
--- trunk/libzypp/zypp/zypp_detail/ZYppImpl.cc (original)
+++ trunk/libzypp/zypp/zypp_detail/ZYppImpl.cc Tue Jul 31 21:58:43 2007
@@ -273,6 +273,12 @@
return res;
}
+ void ZYppImpl::installSrcPackage( const ResTraits<SrcPackage>::constPtrType & srcPackage_r )
+ {
+ if (! _target)
+ ZYPP_THROW( Exception("Target not initialized.") );
+ _target->_pimpl->installSrcPackage( srcPackage_r );
+ }
//------------------------------------------------------------------------
// locales
Modified: trunk/libzypp/zypp/zypp_detail/ZYppImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/zypp_detail/ZYppImp…
==============================================================================
--- trunk/libzypp/zypp/zypp_detail/ZYppImpl.h (original)
+++ trunk/libzypp/zypp/zypp_detail/ZYppImpl.h Tue Jul 31 21:58:43 2007
@@ -21,6 +21,7 @@
#include "zypp/Locale.h"
#include "zypp/KeyRing.h"
#include "zypp/ZYppCommit.h"
+#include "zypp/ResTraits.h"
#include "zypp/DiskUsageCounter.h"
using namespace zypp::filesystem;
@@ -82,13 +83,13 @@
* true, just init the target, dont populate store or pool
*/
void initializeTarget(const Pathname & root);
-
+
/**
* \throws Exception
* if commit_only == true, just init the target, dont populate store or pool
*/
ZYPP_DEPRECATED void initTarget(const Pathname & root, bool commit_only);
-
+
/**
* \throws Exception
*/
@@ -97,6 +98,9 @@
/** Commit changes and transactions. */
ZYppCommitResult commit( const ZYppCommitPolicy & policy_r );
+ /** Install a source package on the Target. */
+ void installSrcPackage( const ResTraits<SrcPackage>::constPtrType & srcPackage_r );
+
public:
/** \todo Signal locale change. */
void setTextLocale( const Locale & textLocale_r )
@@ -130,10 +134,10 @@
/** Get the path where zypp related plugins store persistent data and caches */
Pathname homePath() const;
-
+
/** Get the path where zypp related plugins store tmp data */
Pathname tmpPath() const;
-
+
/** set the home, if you need to change it */
void setHomePath( const Pathname & path );
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
[zypp-commit] r6352 - in /trunk/libzypp-bindings/swig: CapSet.i RepoInfo.i RepoType.i ResPool.i ResStore.i ZYppCommitPolicy.i python/python.i ruby/ruby.i zypp.i
by aschnell@svn.opensuse.org 31 Jul '07
by aschnell@svn.opensuse.org 31 Jul '07
31 Jul '07
Author: aschnell
Date: Tue Jul 31 21:07:17 2007
New Revision: 6352
URL: http://svn.opensuse.org/viewcvs/zypp?rev=6352&view=rev
Log:
- restructuring
Modified:
trunk/libzypp-bindings/swig/CapSet.i
trunk/libzypp-bindings/swig/RepoInfo.i
trunk/libzypp-bindings/swig/RepoType.i
trunk/libzypp-bindings/swig/ResPool.i
trunk/libzypp-bindings/swig/ResStore.i
trunk/libzypp-bindings/swig/ZYppCommitPolicy.i
trunk/libzypp-bindings/swig/python/python.i
trunk/libzypp-bindings/swig/ruby/ruby.i
trunk/libzypp-bindings/swig/zypp.i
Modified: trunk/libzypp-bindings/swig/CapSet.i
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/CapSet.i?r…
==============================================================================
--- trunk/libzypp-bindings/swig/CapSet.i (original)
+++ trunk/libzypp-bindings/swig/CapSet.i Tue Jul 31 21:07:17 2007
@@ -6,6 +6,12 @@
};
+
+#ifdef SWIGRUBY
+iter3(CapSet, Capability*);
+#endif
+
+
// The ruby std_set.i can only handle one template parameter
// #ifdef SWIGPYTHON
@@ -13,3 +19,15 @@
// typedef std::set<Capability,CapOrder> CapSetTemp;
// #endif
+#ifdef SWIGPYTHON
+%extend CapSet
+{
+ // just a test
+ const Capability* haha()
+ {
+ CapSet::iterator i = self->begin();
+ const Capability* tmp = &*i;
+ return tmp;
+ }
+}
+#endif
Modified: trunk/libzypp-bindings/swig/RepoInfo.i
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/RepoInfo.i…
==============================================================================
--- trunk/libzypp-bindings/swig/RepoInfo.i (original)
+++ trunk/libzypp-bindings/swig/RepoInfo.i Tue Jul 31 21:07:17 2007
@@ -134,3 +134,6 @@
typedef std::list<RepoInfo> RepoInfoList;
%template(RepoInfoList) std::list<RepoInfo>;
+#ifdef SWIGRUBY
+auto_iterator(std::list<RepoInfo>, RepoInfo);
+#endif
Modified: trunk/libzypp-bindings/swig/RepoType.i
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/RepoType.i…
==============================================================================
--- trunk/libzypp-bindings/swig/RepoType.i (original)
+++ trunk/libzypp-bindings/swig/RepoType.i Tue Jul 31 21:07:17 2007
@@ -1,10 +1,14 @@
+#ifdef SWIGRUBY
+%alias RepoType::asString "to_s";
+#endif
+
struct RepoType
- {
+{
static const RepoType RPMMD;
static const RepoType YAST2;
//static const RepoType NONE;
-
+
enum Type
{
NONE_e,
@@ -17,10 +21,10 @@
explicit RepoType(const std::string & strval_r);
const Type toEnum() const { return _type; }
-
+
RepoType::Type parse(const std::string & strval_r);
const std::string & asString() const;
Type _type;
- };
\ No newline at end of file
+};
Modified: trunk/libzypp-bindings/swig/ResPool.i
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/ResPool.i?…
==============================================================================
--- trunk/libzypp-bindings/swig/ResPool.i (original)
+++ trunk/libzypp-bindings/swig/ResPool.i Tue Jul 31 21:07:17 2007
@@ -149,3 +149,43 @@
pool::PoolTraits::Impl_constPtr _pimpl;
};
+
+
+#ifdef SWIGRUBY
+
+iter3(ResPool, PoolItem_Ref*);
+
+// %extend ResPool {
+// void each()
+// {
+// ResPool::const_iterator i = self->begin();
+// while ( i != self->end() ) {
+// rb_yield( SWIG_NewPointerObj( (void *) &*i, SWIGTYPE_p_PoolItem_Ref, 0));
+// ++i;
+// }
+// }
+// }
+
+%extend ResPool {
+ void each_by_kind( const ResObject::Kind & kind_r )
+ {
+ ResPool::byKind_iterator i = self->byKindBegin( kind_r );
+ while ( i != self->byKindEnd( kind_r ) ) {
+ rb_yield( SWIG_NewPointerObj( (void *) &*i, SWIGTYPE_p_PoolItem_Ref, 0));
+ ++i;
+ }
+ }
+}
+
+%extend ResPool {
+ void each_by_name( const std::string &name )
+ {
+ ResPool::byName_iterator i = self->byNameBegin( name );
+ while ( i != self->byNameEnd( name ) ) {
+ rb_yield( SWIG_NewPointerObj( (void *) &*i, $descriptor(PoolItem_Ref), 0));
+ ++i;
+ }
+ }
+}
+
+#endif
Modified: trunk/libzypp-bindings/swig/ResStore.i
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/ResStore.i…
==============================================================================
--- trunk/libzypp-bindings/swig/ResStore.i (original)
+++ trunk/libzypp-bindings/swig/ResStore.i Tue Jul 31 21:07:17 2007
@@ -18,3 +18,19 @@
void clear();
};
+#ifdef SWIGRUBY
+iter2(ResStore, ResObject*);
+#endif
+
+#ifdef SWIGPYTHON
+%extend ResStore
+{
+ // just a test
+ const ResObject* haha()
+ {
+ ResStore::iterator i = self->begin();
+ const ResObject* tmp = &**i;
+ return tmp;
+ }
+}
+#endif
Modified: trunk/libzypp-bindings/swig/ZYppCommitPolicy.i
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/ZYppCommit…
==============================================================================
--- trunk/libzypp-bindings/swig/ZYppCommitPolicy.i (original)
+++ trunk/libzypp-bindings/swig/ZYppCommitPolicy.i Tue Jul 31 21:07:17 2007
@@ -1,5 +1,12 @@
+
+#ifdef SWIGRUBY
+%rename("dryRun=") ZYppCommitPolicy::dryRun(bool);
+%rename("rpmNoSignature=") ZYppCommitPolicy::rpmNoSignature(bool);
+%rename("syncPoolAfterCommit=") ZYppCommitPolicy::syncPoolAfterCommit(bool);
+#endif
+
class ZYppCommitPolicy
- {
+{
public:
ZYppCommitPolicy()
: _restrictToMedia ( 0 )
@@ -49,4 +56,4 @@
bool _dryRun;
bool _rpmNoSignature;
bool _syncPoolAfterCommit;
- };
\ No newline at end of file
+};
Modified: trunk/libzypp-bindings/swig/python/python.i
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/python/pyt…
==============================================================================
--- trunk/libzypp-bindings/swig/python/python.i (original)
+++ trunk/libzypp-bindings/swig/python/python.i Tue Jul 31 21:07:17 2007
@@ -11,27 +11,3 @@
};
%enddef
-
-%extend ResStore
-{
- // just a test
- const ResObject* haha()
- {
- ResStore::iterator i = self->begin();
- const ResObject* tmp = &**i;
- return tmp;
- }
-}
-
-
-%extend CapSet
-{
- // just a test
- const Capability* haha()
- {
- CapSet::iterator i = self->begin();
- const Capability* tmp = &*i;
- return tmp;
- }
-}
-
Modified: trunk/libzypp-bindings/swig/ruby/ruby.i
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/ruby/ruby.…
==============================================================================
--- trunk/libzypp-bindings/swig/ruby/ruby.i (original)
+++ trunk/libzypp-bindings/swig/ruby/ruby.i Tue Jul 31 21:07:17 2007
@@ -1,39 +1,17 @@
-%rename("asString") to_s;
-
-#define auto_string( cl ) \
-%extend cl { \
- std::string to_s() { \
- return self->asString();\
- } \
-}
-
-
-// #define iter( cl, storetype ) \
-// %mixin cl "Enumerable"; \
-// %extend cl { \
-// void each() { \
-// cl::iterator i = self->begin(); \
-// while ( i != self->end() ) { \
-// rb_yield( SWIG_NewPointerObj( (void *) &*i, $descriptor(storetype), 1)); \
-// ++i; \
-// } \
-// } \
-// }
-
/*
* Extend cls with an ruby-like each iterator. Yields objects of type storetype.
* Parameter storetype must be a pointer type.
*/
-#define iter2( cls, storetype ) \
+#define iter2(cls, storetype) \
%mixin cls "Enumerable"; \
%extend cls { \
void each() { \
cls::const_iterator i = self->begin(); \
- while ( i != self->end() ) { \
+ while (i != self->end()) { \
const storetype tmp = &**i; \
- rb_yield( SWIG_NewPointerObj( (void*) tmp, $descriptor(storetype), 0)); \
+ rb_yield(SWIG_NewPointerObj((void*) tmp, $descriptor(storetype), 0)); \
++i; \
} \
} \
@@ -42,33 +20,20 @@
/*
* Like iter2, but does only one dereferencing from the iterator.
*/
-#define iter3( cls, storetype ) \
+#define iter3(cls, storetype) \
%mixin cls "Enumerable"; \
%extend cls { \
void each() { \
cls::const_iterator i = self->begin(); \
- while ( i != self->end() ) { \
+ while (i != self->end()) { \
const storetype tmp = &*i; \
- rb_yield( SWIG_NewPointerObj( (void*) tmp, $descriptor(storetype), 0)); \
+ rb_yield(SWIG_NewPointerObj((void*) tmp, $descriptor(storetype), 0)); \
++i; \
} \
} \
}
-// %mixin ResStore "Enumerable";
-// %extend ResStore {
-// void each() {
-// ResStore::iterator i = self->begin();
-// while ( i != self->end() ) {
-// const ResObject* tmp = &**i;
-// rb_yield( SWIG_NewPointerObj( (void*) tmp, $descriptor(ResObject*), 0));
-// ++i;
-// }
-// }
-// }
-
-
#define auto_iterator( cl, storetype ) \
%mixin cl "Enumerable"; \
%extend cl { \
@@ -81,55 +46,3 @@
} \
}
-
-%extend Target {
- void each_by_kind( const ResObject::Kind & kind_r )
- {
- ResStore::resfilter_const_iterator i = self->byKindBegin( kind_r );
- while ( i != self->byKindEnd( kind_r ) ) {
- rb_yield( SWIG_NewPointerObj( (void *) &*i, $descriptor(ResStore::Ptr), 0));
- ++i;
- }
- }
-}
-
-// %extend ResPool {
-// void each()
-// {
-// ResPool::const_iterator i = self->begin();
-// while ( i != self->end() ) {
-// rb_yield( SWIG_NewPointerObj( (void *) &*i, SWIGTYPE_p_PoolItem_Ref, 0));
-// ++i;
-// }
-// }
-// }
-
-%extend ResPool {
- void each_by_kind( const ResObject::Kind & kind_r )
- {
- ResPool::byKind_iterator i = self->byKindBegin( kind_r );
- while ( i != self->byKindEnd( kind_r ) ) {
- rb_yield( SWIG_NewPointerObj( (void *) &*i, SWIGTYPE_p_PoolItem_Ref, 0));
- ++i;
- }
- }
-}
-
-%extend ResPool {
- void each_by_name( const std::string &name )
- {
- ResPool::byName_iterator i = self->byNameBegin( name );
- while ( i != self->byNameEnd( name ) ) {
- rb_yield( SWIG_NewPointerObj( (void *) &*i, $descriptor(PoolItem_Ref), 0));
- ++i;
- }
- }
-}
-
-
-%rename(asString) to_s;
-
-%rename("dryRun=") ZYppCommitPolicy::dryRun(bool);
-%rename("rpmNoSignature=") ZYppCommitPolicy::rpmNoSignature(bool);
-%rename("syncPoolAfterCommit=") ZYppCommitPolicy::syncPoolAfterCommit(bool);
-
Modified: trunk/libzypp-bindings/swig/zypp.i
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/zypp.i?rev…
==============================================================================
--- trunk/libzypp-bindings/swig/zypp.i (original)
+++ trunk/libzypp-bindings/swig/zypp.i Tue Jul 31 21:07:17 2007
@@ -4,40 +4,39 @@
%module zypp
#endif
- %{
- /* Includes the header in the wrapper code */
-
- #include "zypp/base/PtrTypes.h"
- #include <zypp/Edition.h>
- #include <zypp/ResTraits.h>
- #include <zypp/ResPoolProxy.h>
- #include <zypp/ResStore.h>
- #include <zypp/ZYppFactory.h>
- #include <zypp/ZYpp.h>
- #include <zypp/Pathname.h>
- #include "zypp/base/ReferenceCounted.h"
- #include "zypp/ResObject.h"
- #include "zypp/Target.h"
- #include "zypp/target/TargetImpl.h"
+%{
+/* Includes the header in the wrapper code */
+#include "zypp/base/PtrTypes.h"
+#include <zypp/Edition.h>
+#include <zypp/ResTraits.h>
+#include <zypp/ResPoolProxy.h>
+#include <zypp/ResStore.h>
+#include <zypp/ZYppFactory.h>
+#include <zypp/ZYpp.h>
+#include <zypp/Pathname.h>
+#include "zypp/base/ReferenceCounted.h"
+#include "zypp/ResObject.h"
+#include "zypp/Target.h"
+#include "zypp/target/TargetImpl.h"
#include "zypp/TranslatedText.h"
- #include "zypp/CapFactory.h"
- #include "zypp/Package.h"
+#include "zypp/CapFactory.h"
+#include "zypp/Package.h"
#include "zypp/ResFilters.h"
#include "zypp/OnMediaLocation.h"
- #include "zypp/Repository.h"
- #include "zypp/RepoManager.h"
- #include "zypp/repo/RepoType.h"
+#include "zypp/Repository.h"
+#include "zypp/RepoManager.h"
+#include "zypp/repo/RepoType.h"
#include "zypp/MediaSetAccess.h"
#include "zypp/TmpPath.h"
- using namespace boost;
- using namespace zypp;
- using namespace zypp::repo;
- using namespace zypp::resfilter;
- using namespace zypp::filesystem;
+using namespace boost;
+using namespace zypp;
+using namespace zypp::repo;
+using namespace zypp::resfilter;
+using namespace zypp::filesystem;
- typedef std::set<Url> UrlSet;
- %}
+typedef std::set<Url> UrlSet;
+%}
%rename("+") "operator+";
%rename("<<") "operator<<";
@@ -45,15 +44,6 @@
%rename("!") "operator!";
%rename("==") "operator==";
-/* Parse the header file to generate wrappers */
-%ignore zypp::operator<<( std::ostream & str, const ZYppFactory & obj );
-%ignore zypp::base::operator<<( std::ostream & str, const ReferenceCounted & obj );
-
-/*
-//%include "zypp/base/Deprecated.h"
-//%include "zypp/base/PtrTypes.h"
-*/
-
template < typename T >
class intrusive_ptr {
@@ -61,19 +51,26 @@
T *operator->();
};
-%include "Pathname.i"
-%include "Url.i"
-%include std_string.i
+%include "std_string.i"
%include "stl.i"
+
+
#ifdef SWIGRUBY
%include "ruby/std_list.i"
%include "ruby/std_set.i"
-#else
-%include std_list.i
-%include std_set.i
+%include "ruby/ruby.i"
#endif
+#ifdef SWIGPYTHON
+%include "std_list.i"
+%include "std_set.i"
+%include "python/python.i"
+#endif
+
+
+%include "Pathname.i"
+%include "Url.i"
%include "NeedAType.i"
%include "Arch.i"
%include "ResStore.i"
@@ -111,25 +108,6 @@
%include "TmpPath.i"
-#ifdef SWIGRUBY
-
-%include "ruby/ruby.i"
-
-/* define iterators using swig macros */
-iter2( ResStore, ResObject* )
-iter3( CapSet, Capability* )
-iter3(ResPool, PoolItem_Ref*)
-auto_iterator( std::list<RepoInfo>, RepoInfo )
-
-#endif
-
-#ifdef SWIGPYTHON
-
-%include "python/python.i"
-
-#endif
-
-
class ZYpp
{
public:
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
Author: jkupec
Date: Tue Jul 31 20:07:57 2007
New Revision: 6351
URL: http://svn.opensuse.org/viewcvs/zypp?rev=6351&view=rev
Log:
- help texts consolidated
Modified:
trunk/zypper/src/zypper.cc
Modified: trunk/zypper/src/zypper.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper.cc?rev=6351&r1…
==============================================================================
--- trunk/zypper/src/zypper.cc (original)
+++ trunk/zypper/src/zypper.cc Tue Jul 31 20:07:57 2007
@@ -58,21 +58,6 @@
DigestCallbacks digest_callbacks;
-static struct option global_options[] = {
- {"help", no_argument, 0, 'h'},
- {"verbose", no_argument, 0, 'v'},
- {"quiet", no_argument, 0, 'q'},
- {"version", no_argument, 0, 'V'},
- {"terse", no_argument, 0, 't'},
- {"table-style", required_argument, 0, 's'},
- {"rug-compatible", no_argument, 0, 'r'},
- {"non-interactive", no_argument, 0, 0},
- {"no-gpg-checks", no_argument, 0, 0},
- {"root", required_argument, 0, 'R'},
- {"opt", optional_argument, 0, 'o'},
- {0, 0, 0, 0}
-};
-
/**
* Constructor wrapper catching exceptions,
* returning an empty one on error.
@@ -90,28 +75,6 @@
return u;
}
-string help_commands = _(
- " Commands:\n"
- "\thelp\t\t\tHelp\n"
- "\tshell, sh\t\tAccept multiple commands at once\n"
- "\tinstall, in\t\tInstall packages or resolvables\n"
- "\tremove, rm\t\tRemove packages or resolvables\n"
- "\tsearch, se\t\tSearch for packages matching a pattern\n"
- "\trepos, lr\t\tList all defined repositories.\n"
- "\taddrepo, ar\t\tAdd a new repository\n"
- "\tremoverepo, rr\t\tRemove specified repository\n"
- "\trenamerepo, nr\t\tRename specified repository\n"
- "\tmodifyrepo, mr\t\tModify specified repository\n"
- "\trefresh, ref\t\tRefresh all repositories\n"
- "\tpatch-check, pchk\tCheck for patches\n"
- "\tpatches, pch\t\tList patches\n"
- "\tlist-updates, lu\tList updates\n"
- "\txml-updates, xu\t\tList updates and patches in xml format\n"
- "\tupdate, up\t\tUpdate installed resolvables with newer versions.\n"
- "\tinfo, if\t\tShow full information for packages\n"
- "\tpatch-info\t\tShow full information for patches\n"
- "");
-
bool ghelp = false;
/*
@@ -122,11 +85,60 @@
*/
ZypperCommand process_globals(int argc, char **argv)
{
- // global options
+ static struct option global_options[] = {
+ {"help", no_argument, 0, 'h'},
+ {"verbose", no_argument, 0, 'v'},
+ {"quiet", no_argument, 0, 'q'},
+ {"version", no_argument, 0, 'V'},
+ {"terse", no_argument, 0, 't'},
+ {"table-style", required_argument, 0, 's'},
+ {"rug-compatible", no_argument, 0, 'r'},
+ {"non-interactive", no_argument, 0, 0},
+ {"no-gpg-checks", no_argument, 0, 0},
+ {"root", required_argument, 0, 'R'},
+ {"opt", optional_argument, 0, 'o'},
+ {"disable-system-resolvables", optional_argument, 0, 'o'},
+ {0, 0, 0, 0}
+ };
+
+ // parse global options
gopts = parse_options (argc, argv, global_options);
if (gopts.count("_unknown"))
return ZypperCommand::NONE;
- //return "_unknown";
+
+ static string help_global_options = _(" Options:\n"
+ "\t--help, -h\t\tHelp.\n"
+ "\t--version, -V\t\tOutput the version number.\n"
+ "\t--quiet, -q\t\tSuppress normal output, print only error messages.\n"
+ "\t--verbose, -v\t\tIncrease verbosity.\n"
+ "\t--terse, -t\t\tTerse output for machine consumption.\n"
+ "\t--table-style, -s\tTable style (integer).\n"
+ "\t--rug-compatible, -r\tTurn on rug compatibility.\n"
+ "\t--non-interactive\tDon't ask anything, use default answers automatically.\n"
+ "\t--no-gpg-checks\t\tIgnore GPG check failures and continue.\n"
+ "\t--root, -R <dir>\tOperate on a different root directory.\n");
+
+ static string help_commands = _(
+ " Commands:\n"
+ "\thelp\t\t\tHelp\n"
+ "\tshell, sh\t\tAccept multiple commands at once\n"
+ "\tinstall, in\t\tInstall packages or resolvables\n"
+ "\tremove, rm\t\tRemove packages or resolvables\n"
+ "\tsearch, se\t\tSearch for packages matching a pattern\n"
+ "\trepos, lr\t\tList all defined repositories.\n"
+ "\taddrepo, ar\t\tAdd a new repository\n"
+ "\tremoverepo, rr\t\tRemove specified repository\n"
+ "\trenamerepo, nr\t\tRename specified repository\n"
+ "\tmodifyrepo, mr\t\tModify specified repository\n"
+ "\trefresh, ref\t\tRefresh all repositories\n"
+ "\tpatch-check, pchk\tCheck for patches\n"
+ "\tpatches, pch\t\tList patches\n"
+ "\tlist-updates, lu\tList updates\n"
+ "\txml-updates, xu\t\tList updates and patches in xml format\n"
+ "\tupdate, up\t\tUpdate installed resolvables with newer versions.\n"
+ "\tinfo, if\t\tShow full information for packages\n"
+ "\tpatch-info\t\tShow full information for patches\n"
+ "");
if (gopts.count("rug-compatible"))
gSettings.is_rug_compatible = true;
@@ -140,19 +152,6 @@
if (gopts.count("help"))
ghelp = true;
- string help_global_options = _(" Options:\n"
- "\t--help, -h\t\tHelp.\n"
- "\t--version, -V\t\tOutput the version number.\n"
- "\t--quiet, -q\t\tSuppress normal output, print only error messages.\n"
- "\t--verbose, -v\t\tIncrease verbosity.\n"
- "\t--terse, -t\t\tTerse output for machine consumption.\n"
- "\t--table-style, -s\tTable style (integer).\n"
- "\t--rug-compatible, -r\tTurn on rug compatibility.\n"
- "\t--non-interactive\tDon't ask anything, use default answers automatically.\n"
- "\t--no-gpg-checks\t\tIgnore GPG check failures and continue.\n"
- "\t--root, -R <dir>\tOperate on a different root directory.\n");
- ;
-
if (gopts.count("quiet")) {
gSettings.verbosity = -1;
DBG << "Verbosity " << gSettings.verbosity << endl;
@@ -189,7 +188,6 @@
gSettings.root_dir = gopts["root"].front();
}
-
// testing option
if (gopts.count("opt")) {
cout << "Opt arg: ";
@@ -333,18 +331,19 @@
{0, 0, 0, 0}
};
specific_options = service_add_options;
+ // TranslatorExplanation don't translate the repo types (well, the plaindir)
+ // since they must be used in their original shape
specific_help = _(
"addrepo (ar) [options] <URI> <alias>\n"
"\n"
- "Add repository specified by URI to the system and assing specified alias to it."
+ "Add repository specified by URI to the system and assing specified alias to it.\n"
"\n"
" Command options:\n"
- "\t--repo,-r <FILE.repo>\tRead the URL and alias from a file\n"
- "\t\t\t\t(even remote)\n"
- "\t--type,-t <TYPE>\tType of repository (YaST, YUM, or plaindir)\n"
- "\t--disabled,-d\t\tAdd the repository as disabled\n"
- "\t--no-refresh,-n\t\tAdd the repository with auto-refresh disabled\n"
- );
+ "-r, --repo <FILE.repo> Read the URL and alias from a file (even remote)\n"
+ "-t, --type <TYPE> Type of repository (YaST, YUM, or plaindir)\n"
+ "-d, --disabled Add the repository as disabled\n"
+ "-n, --no-refresh Add the repository with auto-refresh disabled\n"
+ );
}
else if (command == ZypperCommand::LIST_REPOS) {
static struct option service_list_options[] = {
@@ -355,10 +354,10 @@
specific_help = _(
"repos (lr)\n"
"\n"
- "List all defined repositories."
+ "List all defined repositories.\n"
"\n"
"This command has no additional options.\n"
- );
+ );
}
else if (command == ZypperCommand::REMOVE_REPO) {
static struct option service_delete_options[] = {
@@ -371,12 +370,12 @@
specific_help = _(
"removerepo (rr) [options] <alias|URL>\n"
"\n"
- "Remove repository specified by alias or URL."
+ "Remove repository specified by alias or URL.\n"
"\n"
" Command options:\n"
- "\t--loose-auth\tIgnore user authentication data in the URL\n"
- "\t--loose-query\tIgnore query string in the URL\n"
- );
+ " --loose-auth\tIgnore user authentication data in the URL\n"
+ " --loose-query\tIgnore query string in the URL\n"
+ );
}
else if (command == ZypperCommand::RENAME_REPO) {
static struct option service_rename_options[] = {
@@ -387,10 +386,10 @@
specific_help = _(
"renamerepo [options] <alias> <new-alias>\n"
"\n"
- "Assign new alias to the repository specified by alias."
+ "Assign new alias to the repository specified by alias.\n"
"\n"
"This command has no additional options.\n"
- );
+ );
}
else if (command == ZypperCommand::MODIFY_REPO) {
static struct option service_modify_options[] = {
@@ -405,12 +404,13 @@
specific_help = _(
"modifyrepo (mr) <options> <alias>\n"
"\n"
- "Modify properties of the repository specified by alias."
+ "Modify properties of the repository specified by alias.\n"
"\n"
- "\t--disable,-d\t\tDisable the repository (but don't remove it)\n"
- "\t--enable,-e\t\tEnable a disabled repository\n"
- "\t--enable-autorefresh,-a\tEnable auto-refresh of the repository\n"
- "\t--disable-autorefresh\tDisable auto-refresh of the repository\n"
+ " Command options:\n"
+ "-d, --disable Disable the repository (but don't remove it)\n"
+ "-e, --enable Enable a disabled repository\n"
+ "-a, --enable-autorefresh Enable auto-refresh of the repository\n"
+ " --disable-autorefresh Disable auto-refresh of the repository\n"
);
}
else if (command == ZypperCommand::REFRESH) {
@@ -422,10 +422,10 @@
specific_help = _(
"refresh\n"
"\n"
- "Refresh all installation sources found in the system.\n"
+ "Refresh all defined and enabled repositories.\n"
"\n"
"This command has no additional options.\n"
- );
+ );
}
else if (command == ZypperCommand::LIST_UPDATES) {
static struct option list_updates_options[] = {
@@ -447,7 +447,7 @@
"-t, --type <type> Type of resolvable (package, patch, pattern, product) (default: patch)\n"
"-r, --repo <alias> Work only with updates from repository specified by alias.\n"
" --best-effort Do a 'best effort' approach to update, updates to a lower than latest-and-greatest version are also acceptable.\n"
- );
+ );
}
else if (command == ZypperCommand::UPDATE) {
static struct option update_options[] = {
@@ -521,7 +521,7 @@
" --sort-by-repo Sort packages by repository.\n"
"\n"
"* and ? wildcards can also be used within search strings.\n"
- );
+ );
}
else if (command == ZypperCommand::PATCH_CHECK) {
static struct option patch_check_options[] = {
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
[zypp-commit] r6350 - /trunk/libzypp/devel/devel.ma/Basic.cc
by mlandres@svn.opensuse.org 31 Jul '07
by mlandres@svn.opensuse.org 31 Jul '07
31 Jul '07
Author: mlandres
Date: Tue Jul 31 20:00:56 2007
New Revision: 6350
URL: http://svn.opensuse.org/viewcvs/zypp?rev=6350&view=rev
Log:
backup
Modified:
trunk/libzypp/devel/devel.ma/Basic.cc
Modified: trunk/libzypp/devel/devel.ma/Basic.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.ma/Basic.cc?…
==============================================================================
--- trunk/libzypp/devel/devel.ma/Basic.cc (original)
+++ trunk/libzypp/devel/devel.ma/Basic.cc Tue Jul 31 20:00:56 2007
@@ -28,15 +28,6 @@
{
INT << "===[START]==========================================" << endl;
- filesystem::TmpFile a( filesystem::TmpFile::makeSibling( "/tmp/madirCBzAje" ) );
- filesystem::TmpDir b( filesystem::TmpDir::makeSibling( "/tmp/matest" ) );
-
- int i;
- cin >> i;
-
- filesystem::assert_dir( "/tmp/matest/foo/ba" );
- mode_t mask = ::umask(0022); ::umask(mask);
-
ResPool pool( getZYpp()->pool() );
const char *const lines[] = {
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
[zypp-commit] r6349 - in /trunk/libzypp/zypp: PathInfo.cc PathInfo.h media/MediaCurl.cc
by mlandres@svn.opensuse.org 31 Jul '07
by mlandres@svn.opensuse.org 31 Jul '07
31 Jul '07
Author: mlandres
Date: Tue Jul 31 20:00:46 2007
New Revision: 6349
URL: http://svn.opensuse.org/viewcvs/zypp?rev=6349&view=rev
Log:
Added filesystem::getUmask and filesystem::applyUmaskTo (in PathInfo.h) and
fixed MediaCurl to use them.
Modified:
trunk/libzypp/zypp/PathInfo.cc
trunk/libzypp/zypp/PathInfo.h
trunk/libzypp/zypp/media/MediaCurl.cc
Modified: trunk/libzypp/zypp/PathInfo.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/PathInfo.cc?rev=634…
==============================================================================
--- trunk/libzypp/zypp/PathInfo.cc (original)
+++ trunk/libzypp/zypp/PathInfo.cc Tue Jul 31 20:00:46 2007
@@ -866,6 +866,18 @@
return ret;
}
+ ///////////////////////////////////////////////////////////////////
+ //
+ // METHOD NAME : getUmask
+ // METHOD TYPE : mode_t
+ //
+ mode_t getUmask()
+ {
+ mode_t mask = ::umask( 0022 );
+ ::umask( mask );
+ return mask;
+ }
+
/////////////////////////////////////////////////////////////////
} // namespace filesystem
///////////////////////////////////////////////////////////////////
Modified: trunk/libzypp/zypp/PathInfo.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/PathInfo.h?rev=6349…
==============================================================================
--- trunk/libzypp/zypp/PathInfo.h (original)
+++ trunk/libzypp/zypp/PathInfo.h Tue Jul 31 20:00:46 2007
@@ -641,6 +641,22 @@
* @return Free disk space or -1 on error.
**/
ByteCount df( const Pathname & path );
+
+ /**
+ * Get the current umask (file mode creation mask)
+ *
+ * @return The current umask
+ **/
+ mode_t getUmask();
+
+ /**
+ * Modify \c mode_r according to the current umask
+ * <tt>( mode_r & ~getUmask() )</tt>.
+ * \see \ref getUmask.
+ * @return The resulting permissions.
+ **/
+ inline mode_t applyUmaskTo( mode_t mode_r )
+ { return mode_r & ~getUmask(); }
//@}
/////////////////////////////////////////////////////////////////
Modified: trunk/libzypp/zypp/media/MediaCurl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/media/MediaCurl.cc?…
==============================================================================
--- trunk/libzypp/zypp/media/MediaCurl.cc (original)
+++ trunk/libzypp/zypp/media/MediaCurl.cc Tue Jul 31 20:00:46 2007
@@ -456,7 +456,7 @@
{
DBG << "Enabling HTTP authentication methods: " << use_auth
<< " (CURLOPT_HTTPAUTH=" << auth << ")" << std::endl;
-
+
ret = curl_easy_setopt( _curl, CURLOPT_HTTPAUTH, auth);
if ( ret != 0 ) {
disconnectFrom();
@@ -706,16 +706,16 @@
catch (MediaUnauthorizedException & ex_r)
{
callback::SendReport<AuthenticationReport> auth_report;
-
+
if (!_url.getUsername().empty() && !retry)
auth_data.setUserName(_url.getUsername());
-
+
string prompt_msg;
if (retry || !_url.getUsername().empty())
prompt_msg = _("Invalid user name or password.");
else // first prompt
prompt_msg = boost::str(boost::format(
- _("Authentication required for '%s'")) % _url.asString());
+ _("Authentication required for '%s'")) % _url.asString());
// set available authentication types from the exception
auth_data.setAuthType(ex_r.hint());
@@ -726,12 +726,12 @@
<< "CurlAuthData: " << auth_data << endl;
if (auth_data.valid()) {
- _userpwd = auth_data.getUserPwd();
+ _userpwd = auth_data.getUserPwd();
// set username and password
CURLcode ret = curl_easy_setopt(_curl, CURLOPT_USERPWD, _userpwd.c_str());
if ( ret != 0 ) ZYPP_THROW(MediaCurlSetOptException(_url, _curlError));
-
+
// set auth type
ret = curl_easy_setopt(_curl, CURLOPT_HTTPAUTH, auth_data.authType());
if ( ret != 0 ) ZYPP_THROW(MediaCurlSetOptException(_url, _curlError));
@@ -775,16 +775,16 @@
catch (MediaUnauthorizedException & ex_r)
{
callback::SendReport<AuthenticationReport> auth_report;
-
+
if (!_url.getUsername().empty() && !retry)
auth_data.setUserName(_url.getUsername());
-
+
string prompt_msg;
if (retry || !_url.getUsername().empty())
prompt_msg = _("Invalid user name or password.");
else // first prompt
prompt_msg = boost::str(boost::format(
- _("Authentication required for '%s'")) % _url.asString());
+ _("Authentication required for '%s'")) % _url.asString());
// set available authentication types from the exception
auth_data.setAuthType(ex_r.hint());
@@ -795,12 +795,12 @@
<< "CurlAuthData: " << auth_data << endl;
if (auth_data.valid()) {
- _userpwd = auth_data.getUserPwd();
+ _userpwd = auth_data.getUserPwd();
// set username and password
CURLcode ret = curl_easy_setopt(_curl, CURLOPT_USERPWD, _userpwd.c_str());
if ( ret != 0 ) ZYPP_THROW(MediaCurlSetOptException(_url, _curlError));
-
+
// set auth type
ret = curl_easy_setopt(_curl, CURLOPT_HTTPAUTH, auth_data.authType());
if ( ret != 0 ) ZYPP_THROW(MediaCurlSetOptException(_url, _curlError));
@@ -821,7 +821,7 @@
}
}
while (retry);
-
+
return false;
}
@@ -834,7 +834,7 @@
if(_url.getHost().empty())
ZYPP_THROW(MediaBadUrlEmptyHostException(_url));
-
+
string path = _url.getPathName();
if ( !path.empty() && path != "/" && *path.rbegin() == '/' &&
filename.absolute() ) {
@@ -866,7 +866,7 @@
curlUrl.setPathParams( "" );
curlUrl.setQueryString( "" );
curlUrl.setFragment( "" );
-
+
//
// See also Bug #154197 and ftp url definition in RFC 1738:
// The url "ftp://user@host/foo/bar/file" contains a path,
@@ -881,22 +881,22 @@
if ( ret != 0 ) {
ZYPP_THROW(MediaCurlSetOptException(url, _curlError));
}
-
+
// set no data, because we only want to check if the file exists
//ret = curl_easy_setopt( _curl, CURLOPT_NOBODY, 1 );
//if ( ret != 0 ) {
// ZYPP_THROW(MediaCurlSetOptException(url, _curlError));
- //}
-
- // instead of returning no data with NOBODY, we return
+ //}
+
+ // instead of returning no data with NOBODY, we return
// little data, that works with broken servers, and
// works for ftp as well, because retrieving only headers
// ftp will return always OK code ?
ret = curl_easy_setopt( _curl, CURLOPT_RANGE, "0-1" );
if ( ret != 0 ) {
ZYPP_THROW(MediaCurlSetOptException(url, _curlError));
- }
-
+ }
+
FILE *file = ::fopen( "/dev/null", "w" );
if ( !file ) {
::fclose(file);
@@ -934,11 +934,11 @@
{
ZYPP_THROW(MediaCurlSetOptException(url, _curlError));
}
-
+
if ( ok != 0 )
{
::fclose( file );
-
+
std::string err;
try
{
@@ -946,7 +946,7 @@
switch ( ok )
{
case CURLE_FTP_COULDNT_RETR_FILE:
- case CURLE_FTP_ACCESS_DENIED:
+ case CURLE_FTP_ACCESS_DENIED:
err_file_not_found = true;
break;
case CURLE_HTTP_RETURNED_ERROR:
@@ -961,7 +961,7 @@
str::numstring( httpReturnCode );
if ( httpReturnCode == 401 )
{
- std::string auth_hint = getAuthHint();
+ std::string auth_hint = getAuthHint();
DBG << msg << " Login failed (URL: " << url.asString() << ")" << std::endl;
DBG << "MediaUnauthorizedException auth hint: '" << auth_hint << "'" << std::endl;
@@ -1008,7 +1008,7 @@
err = "Unrecognized error";
break;
}
-
+
if( err_file_not_found)
{
// file does not exists
@@ -1024,14 +1024,14 @@
{
ZYPP_RETHROW(excpt_r);
}
- }
-
+ }
+
// exists
return ( ok == CURLE_OK );
//if ( curl_easy_setopt( _curl, CURLOPT_PROGRESSDATA, NULL ) != 0 ) {
// WAR << "Can't unset CURLOPT_PROGRESSDATA: " << _curlError << endl;;
//}
-}
+}
void MediaCurl::doGetFileCopy( const Pathname & filename , const Pathname & target, callback::SendReport<DownloadProgressReport> & report) const
{
@@ -1176,7 +1176,7 @@
str::numstring( httpReturnCode );
if ( httpReturnCode == 401 )
{
- std::string auth_hint = getAuthHint();
+ std::string auth_hint = getAuthHint();
DBG << msg << " Login failed (URL: " << url.asString() << ")" << std::endl;
DBG << "MediaUnauthorizedException auth hint: '" << auth_hint << "'" << std::endl;
@@ -1297,11 +1297,7 @@
}
#endif // DETECT_DIR_INDEX
- mode_t mask;
- // getumask() would be fine, but does not exist
- // [ the linker can't find it in glibc :-( ].
- mask = ::umask(0022); ::umask(mask);
- if ( ::fchmod( ::fileno(file), 0644 & ~mask))
+ if ( ::fchmod( ::fileno(file), filesystem::applyUmaskTo( 0644 ) ) )
{
ERR << "Failed to chmod file " << destNew << endl;
}
@@ -1461,4 +1457,4 @@
} // namespace media
} // namespace zypp
-//
+//
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
[zypp-commit] r6348 - /trunk/libzypp/zypp/repo/ScriptProvider.cc
by mlandres@svn.opensuse.org 31 Jul '07
by mlandres@svn.opensuse.org 31 Jul '07
31 Jul '07
Author: mlandres
Date: Tue Jul 31 19:34:46 2007
New Revision: 6348
URL: http://svn.opensuse.org/viewcvs/zypp?rev=6348&view=rev
Log:
fix to compile
Modified:
trunk/libzypp/zypp/repo/ScriptProvider.cc
Modified: trunk/libzypp/zypp/repo/ScriptProvider.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/ScriptProvider…
==============================================================================
--- trunk/libzypp/zypp/repo/ScriptProvider.cc (original)
+++ trunk/libzypp/zypp/repo/ScriptProvider.cc Tue Jul 31 19:34:46 2007
@@ -10,9 +10,11 @@
*
*/
#include <iostream>
-//#include "zypp/base/Logger.h"
+#include <fstream>
#include "zypp/repo/ScriptProvider.h"
+#include "zypp/PathInfo.h"
+#include "zypp/TmpPath.h"
using std::endl;
@@ -36,6 +38,36 @@
inlined inlined_r, location location_r )
{
ManagedFile ret;
+
+ // 1st try inlined
+ std::string inlined( (script_r.*inlined_r)() );
+ if ( ! inlined.empty() )
+ {
+ // Take care the TmpFile goes out of scope BEFORE the
+ // ofstream opens the file again.
+ ret = ManagedFile( filesystem::TmpFile( filesystem::TmpPath::defaultLocation(),
+ "zypp-script-"+script_r.name() ),
+ filesystem::unlink );
+ std::ofstream str( ret.value().c_str() );
+ str << inlined << endl;
+ }
+ else
+ {
+ // otherwise try download
+ OnMediaLocation location( (script_r.*location_r)() );
+ if ( ! location.filename().empty() )
+ {
+ ret = access_r.provideFile( script_r.repository(), location );
+ }
+ else
+ {
+ // no script
+ return ManagedFile();
+ }
+ }
+
+ // HERE: got the script
+ filesystem::chmod( ret, 0700 );
return ret;
}
@@ -52,11 +84,7 @@
const Script::constPtr & script_r )
: _access( access_r )
, _script( script_r )
- {
- // ManagedFile provideFile( Repository repo_r,
- // const OnMediaLocation & loc_r,
- // const ProvideFilePolicy & policy_r = ProvideFilePolicy() );
- }
+ {}
///////////////////////////////////////////////////////////////////
//
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
[zypp-commit] r6347 - in /trunk/zypper/src: zypper-getopt.h zypper-misc.cc zypper-misc.h zypper-search.cc zypper-sources.cc zypper-sources.h zypper.cc
by jkupec@svn.opensuse.org 31 Jul '07
by jkupec@svn.opensuse.org 31 Jul '07
31 Jul '07
Author: jkupec
Date: Tue Jul 31 19:17:48 2007
New Revision: 6347
URL: http://svn.opensuse.org/viewcvs/zypp?rev=6347&view=rev
Log:
- --repo added to install, remove, search, update, list-updates, info,
patch-check, show-patches, xml-updates (FATE #302158, #302160)
Modified:
trunk/zypper/src/zypper-getopt.h
trunk/zypper/src/zypper-misc.cc
trunk/zypper/src/zypper-misc.h
trunk/zypper/src/zypper-search.cc
trunk/zypper/src/zypper-sources.cc
trunk/zypper/src/zypper-sources.h
trunk/zypper/src/zypper.cc
Modified: trunk/zypper/src/zypper-getopt.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-getopt.h?rev=6…
==============================================================================
--- trunk/zypper/src/zypper-getopt.h (original)
+++ trunk/zypper/src/zypper-getopt.h Tue Jul 31 19:17:48 2007
@@ -73,6 +73,8 @@
char ** _argv;
};
+extern parsed_opts gopts; // global options
+extern parsed_opts copts; // command options
#endif /*ZYPPER_GETOPT_H_*/
// Local Variables:
Modified: trunk/zypper/src/zypper-misc.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-misc.cc?rev=63…
==============================================================================
--- trunk/zypper/src/zypper-misc.cc (original)
+++ trunk/zypper/src/zypper-misc.cc Tue Jul 31 19:17:48 2007
@@ -16,6 +16,7 @@
#include <zypp/target/store/xml_escape_parser.hpp>
#include "zypper.h"
+#include "zypper-getopt.h"
#include "zypper-misc.h"
#include "zypper-callbacks.h"
@@ -693,7 +694,7 @@
// ----------------------------------------------------------------------------
-void list_patch_updates( const string &repo_alias, bool best_effort )
+void list_patch_updates(bool best_effort)
{
Table tbl;
Table pm_tbl; // only those that affect packagemanager: they have priority
@@ -760,21 +761,13 @@
{
public:
PoolItem_Ref best;
- string _repo_alias;
-
- LookForArchUpdate( const string &repo_alias = "" )
- {
- _repo_alias = repo_alias;
- }
bool operator()( PoolItem_Ref provider )
{
if (!provider.status().isLocked() // is not locked (taboo)
&& (!best // first match
// or a better edition than candidate
- || best->edition().compare( provider->edition() ) < 0)
- && (_repo_alias.empty()
- || provider->repository().info().alias() == _repo_alias) )
+ || best->edition().compare( provider->edition() ) < 0))
{
best = provider; // store
}
@@ -790,9 +783,9 @@
// but that allows changing the arch (#222140).
static
PoolItem_Ref
-findArchUpdateItem( const ResPool & pool, PoolItem_Ref item, const string &repo_alias )
+findArchUpdateItem( const ResPool & pool, PoolItem_Ref item )
{
- LookForArchUpdate info( repo_alias );
+ LookForArchUpdate info;
invokeOnEach( pool.byNameBegin( item->name() ),
pool.byNameEnd( item->name() ),
@@ -815,7 +808,7 @@
typedef set<PoolItem_Ref> Candidates;
static void
-find_updates( const ResObject::Kind &kind, const string &repo_alias, Candidates &candidates )
+find_updates( const ResObject::Kind &kind, Candidates &candidates )
{
const zypp::ResPool& pool = God->pool();
ResPool::byKind_iterator
@@ -827,7 +820,7 @@
if (it->status().isUninstalled())
continue;
// (actually similar to ProvideProcess?)
- PoolItem_Ref candidate = findArchUpdateItem( pool, *it, repo_alias );
+ PoolItem_Ref candidate = findArchUpdateItem( pool, *it );
if (!candidate.resolvable())
continue;
@@ -839,17 +832,17 @@
// ----------------------------------------------------------------------------
-void list_updates( const ResObject::Kind &kind, const string &repo_alias, bool best_effort )
+void list_updates( const ResObject::Kind &kind, bool best_effort )
{
bool k_is_patch = kind == ResTraits<Patch>::kind;
if (k_is_patch)
- list_patch_updates( repo_alias, best_effort );
+ list_patch_updates( best_effort );
else {
Table tbl;
// show repo only if not best effort or --from-repo set
- // on best_effort, the solver will determine the repo if we don't limit it to a specific one
- bool hide_repo = best_effort && repo_alias.empty();
+ // on best_effort, the solver will determine the repo if we don't limit it to a specific one
+ bool hide_repo = best_effort || copts.count("repo");
// header
TableHeader th;
@@ -872,7 +865,7 @@
unsigned int cols = th.cols();
Candidates candidates;
- find_updates( kind, repo_alias, candidates );
+ find_updates( kind, candidates );
Candidates::iterator cb = candidates.begin (), ce = candidates.end (), ci;
for (ci = cb; ci != ce; ++ci) {
@@ -972,8 +965,7 @@
void xml_list_updates()
{
Candidates candidates;
- string repo_alias;
- find_updates (ResTraits<Package>::kind, repo_alias, candidates);
+ find_updates (ResTraits<Package>::kind, candidates);
Candidates::iterator cb = candidates.begin (), ce = candidates.end (), ci;
for (ci = cb; ci != ce; ++ci) {
@@ -1002,7 +994,7 @@
// ----------------------------------------------------------------------------
static
-void mark_patch_updates( const std::string &repo_alias, bool skip_interactive )
+void mark_patch_updates( bool skip_interactive )
{
if (true) {
// search twice: if there are none with affects_pkg_manager, retry on all
@@ -1040,16 +1032,16 @@
// ----------------------------------------------------------------------------
-void mark_updates( const ResObject::Kind &kind, const std::string &repo_alias, bool skip_interactive, bool best_effort )
+void mark_updates( const ResObject::Kind &kind, bool skip_interactive, bool best_effort )
{
bool k_is_patch = kind == ResTraits<Patch>::kind;
if (k_is_patch) {
- mark_patch_updates( repo_alias, skip_interactive );
+ mark_patch_updates(skip_interactive);
}
else {
Candidates candidates;
- find_updates (kind, repo_alias, candidates);
+ find_updates (kind, candidates);
if (best_effort)
invokeOnEach (candidates.begin(), candidates.end(), require_item_update);
else
Modified: trunk/zypper/src/zypper-misc.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-misc.h?rev=634…
==============================================================================
--- trunk/zypper/src/zypper-misc.h (original)
+++ trunk/zypper/src/zypper-misc.h Tue Jul 31 19:17:48 2007
@@ -75,9 +75,22 @@
* if repo_alias != "", restrict updates to this repository.
* if best_effort == true, any version greater than the installed one will do.
* Prints the table of updates to stdout.
+ *
+ * \param kind resolvable type
+ * \param best_effort
+ */
+void list_updates( const zypp::ResObject::Kind &kind, bool best_effort );
+
+/**
+ * \param kind resolvable type
+ * \param skip_interactive whether to skip updates that need user interaction
+ * \param best_effort
+ */
+void mark_updates( const zypp::ResObject::Kind &kind, bool skip_interactive, bool best_effort );
+
+/**
+ *
*/
-void list_updates( const zypp::ResObject::Kind &kind, const std::string &repo_alias, bool best_effort );
-void mark_updates( const zypp::ResObject::Kind &kind, const std::string &repo_alias, bool skip_interactive, bool best_effort );
void usage(int argc, char **argv);
/**
Modified: trunk/zypper/src/zypper-search.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-search.cc?rev=…
==============================================================================
--- trunk/zypper/src/zypper-search.cc (original)
+++ trunk/zypper/src/zypper-search.cc Tue Jul 31 19:17:48 2007
@@ -37,9 +37,6 @@
) :
_zypp(zypp), _options(options), _qstrings(qstrings) {
- cond_init_target(); // calls ZYpp::initializeTarget("/");
- init_repos();
-
// no repos warning
if (gData.repos.empty()) {
cerr << _("No repositories configured. Please, add at least one"
Modified: trunk/zypper/src/zypper-sources.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-sources.cc?rev…
==============================================================================
--- trunk/zypper/src/zypper-sources.cc (original)
+++ trunk/zypper/src/zypper-sources.cc Tue Jul 31 19:17:48 2007
@@ -5,6 +5,7 @@
#include <fstream>
#include <boost/format.hpp>
+#include <boost/logic/tribool.hpp>
#include <boost/lexical_cast.hpp>
#include <zypp/target/store/PersistentStorage.h>
@@ -28,16 +29,39 @@
extern Settings gSettings;
-static void do_init_repos()
+static int do_init_repos()
{
RepoManager manager;
- gData.repos = manager.knownRepositories();
+
+ string specific_repo = copts.count( "repo" ) ? copts["repo"].front() : "";
+ if (!specific_repo.empty())
+ {
+ MIL << "--repo set to '" << specific_repo
+ << "'. Going to operate on this repo only." << endl;
+ try { gData.repos.push_back(manager.getRepositoryInfo(specific_repo)); }
+ catch (const repo::RepoNotFoundException & ex)
+ {
+ cerr << format(_("Repository '%s' not found.")) % specific_repo << endl;
+ ERR << specific_repo << " not found";
+ return ZYPPER_EXIT_ERR_INVALID_ARGS;
+ }
+ catch (const Exception & ex)
+ {
+ cerr << format(_("Error reading repository description file for '%s'."))
+ % specific_repo << endl;
+ cerr_v << _("Reason: ") << ex.asUserString() << endl;
+ ZYPP_CAUGHT(ex);
+ return ZYPPER_EXIT_ERR_ZYPP;
+ }
+ }
+ else
+ gData.repos = manager.knownRepositories();
for (std::list<RepoInfo>::iterator it = gData.repos.begin();
it != gData.repos.end(); ++it)
{
RepoInfo repo(*it);
- MIL << "initializing " << repo.alias() << endl;
+ MIL << "initializing " << repo.alias() << endl;
//! \todo honor command line options/commands
bool do_refresh = repo.enabled() && repo.autorefresh();
@@ -67,20 +91,22 @@
}
}
}
+
+ return ZYPPER_EXIT_OK;
}
// ----------------------------------------------------------------------------
-void init_repos()
+int init_repos()
{
static bool done = false;
//! \todo this has to be done so that it works in zypper shell
if (done)
- return;
+ return ZYPPER_EXIT_OK;
if ( !gSettings.disable_system_sources )
{
- do_init_repos();
+ return do_init_repos();
}
done = true;
@@ -343,7 +369,7 @@
repo.addBaseUrl(url);
repo.setEnabled(enabled);
repo.setAutorefresh(refresh);
-
+
return add_repo(repo);
}
@@ -351,7 +377,7 @@
//! \todo handle zypp exceptions
int add_repo_from_file(const std::string & repo_file_url,
- const tribool enabled, const tribool autorefresh)
+ bool enabled, bool autorefresh)
{
//! \todo handle local .repo files, validate the URL
Url url(repo_file_url);
@@ -363,14 +389,8 @@
{
RepoInfo repo = *it;
- // by default set enabled and autorefresh to true
- repo.setEnabled(true);
- repo.setAutorefresh(true);
-
- if (!indeterminate(enabled))
- repo.setEnabled(enabled);
- if (!indeterminate(autorefresh))
- repo.setAutorefresh(autorefresh);
+ repo.setEnabled(enabled);
+ repo.setAutorefresh(autorefresh);
add_repo(repo);
}
@@ -496,7 +516,7 @@
// ----------------------------------------------------------------------------
-void modify_repo(const string & alias, const parsed_opts & copts)
+void modify_repo(const string & alias)
{
// tell whether currenlty processed options are contradicting each other
bool contradiction = false;
@@ -553,7 +573,7 @@
manager.modifyRepository(alias, repo);
- cout_n << format(_("Repository %s has been sucessfully modified.")) % alias << endl;
+ cout << format(_("Repository %s has been sucessfully modified.")) % alias << endl;
MIL << format("Repository %s modified:") % alias << repo << endl;
}
catch (const RepoNotFoundException & ex)
Modified: trunk/zypper/src/zypper-sources.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-sources.h?rev=…
==============================================================================
--- trunk/zypper/src/zypper-sources.h (original)
+++ trunk/zypper/src/zypper-sources.h Tue Jul 31 19:17:48 2007
@@ -1,8 +1,6 @@
#ifndef ZMART_SOURCES_H
#define ZMART_SOURCES_H
-#include <boost/logic/tribool.hpp>
-
#include "zypp/Url.h"
#include "zypper-getopt.h"
@@ -10,8 +8,11 @@
/**
* Reads known enabled repositories and stores them in gData.
* This command also refreshes repos with auto-refresh enabled.
+ *
+ * \return ZYPPER_EXIT_ERR_INVALID_ARGS if --repo does not specify a valid repository,
+ * ZYPPER_EXIT_ERR_ZYPP on error, ZYPPER_EXIT_OK otherwise.
*/
-void init_repos();
+int init_repos();
/**
* List defined repositories.
@@ -30,8 +31,8 @@
* \param url Valid URL of the repository.
* \param alias
* \param type
- * \param enabled
- * \param autorefresh
+ * \param enabled Whether the repo should be enabled
+ * \param autorefresh Whether the repo should have autorefresh turned on
* \return ZYPPER_EXIT_ERR_ZYPP on unexpected zypp exception,
* ZYPPER_EXIT_OK otherwise
*/
@@ -41,16 +42,18 @@
bool enabled = true, bool autorefresh = true );
/**
- * Add repository specified in given repo file on \a repo_file_url.
+ * Add repository specified in given repo file on \a repo_file_url. All repos
+ * will be added enabled and with autorefresh turned on. The enabled and
+ * autorefresh values provided in the files will be ignored.
*
* \param repo_file_url Valid URL of the repo file.
- * \param enabled If determined, overrides repo file's enabled setting.
- * \param autorefresh If determined, overrides repo file's autorefresh setting.
+ * \param enabled Whether the repo should be enabled
+ * \param autorefresh Whether the repo should have autorefresh turned on
* \return ZYPPER_EXIT_ERR_ZYPP on unexpected zypp exception,
* ZYPPER_EXIT_OK otherwise
*/
int add_repo_from_file(const std::string & repo_file_url,
- boost::tribool enabled = true, boost::tribool autorefresh = true);
+ bool enabled = true, bool autorefresh = true);
/**
* If ZMD process found, notify user that ZMD is running and that changes
@@ -76,9 +79,8 @@
* Modify repository properties.
*
* \param alias repository alias
- * \param copts pre-parsed command line options
*/
-void modify_repo(const std::string & alias, const parsed_opts & copts);
+void modify_repo(const std::string & alias);
#endif
// Local Variables:
Modified: trunk/zypper/src/zypper.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper.cc?rev=6347&r1…
==============================================================================
--- trunk/zypper/src/zypper.cc (original)
+++ trunk/zypper/src/zypper.cc Tue Jul 31 19:17:48 2007
@@ -46,6 +46,8 @@
ZYpp::Ptr God = NULL;
RuntimeData gData;
Settings gSettings;
+parsed_opts gopts; // global options
+parsed_opts copts; // command options
ostream no_stream(NULL);
@@ -55,6 +57,7 @@
KeyRingCallbacks keyring_callbacks;
DigestCallbacks digest_callbacks;
+
static struct option global_options[] = {
{"help", no_argument, 0, 'h'},
{"verbose", no_argument, 0, 'v'},
@@ -109,8 +112,6 @@
"\tpatch-info\t\tShow full information for patches\n"
"");
-// global options
-parsed_opts gopts;
bool ghelp = false;
/*
@@ -247,7 +248,7 @@
string help_global_source_options = _(
" Repository options:\n"
"\t--disable-repositories, -D\t\tDo not read data from defined repositories.\n"
- "\t--repo <URI|.repo>\t\tRead additional repository\n"
+ "\t--plus-repo <URI|.repo>\t\tRead additional repository\n" //! \todo additional repo
);
//! \todo preserve for rug comp. "\t--disable-system-sources, -D\t\tDo not read the system sources\n"
//! \todo preserve for rug comp. "\t--source, -S\t\tRead additional source\n"
@@ -262,7 +263,9 @@
}
else if (command == ZypperCommand::INSTALL) {
static struct option install_options[] = {
- {"catalog", required_argument, 0, 'c'},
+ {"repo", required_argument, 0, 'r'},
+ // rug compatibility option, we have --repo
+ {"catalog", required_argument, 0, 'c'},
{"type", required_argument, 0, 't'},
{"name", no_argument, 0, 'n'},
// rug compatibility, we have global --non-interactive
@@ -275,6 +278,9 @@
{0, 0, 0, 0}
};
specific_options = install_options;
+ // TranslatorExplanation don't translate the resolvable types
+ // (package, patch, pattern, product) or at least leave also their
+ // originals, since they are expected untranslated on the command line
specific_help = _(
"install [options] <capability> ...\n"
"\n"
@@ -282,16 +288,19 @@
" NAME[ OP <VERSION>], where OP is one of <, <=, =, >=, >.\n"
"\n"
" Command options:\n"
- "\t--catalog,-c\t\t\tOnly from this catalog (under development)\n"
- "\t--type,-t <resolvable_type>\tType of resolvable (package, patch, pattern, product) (default: package)\n"
- "\t--name,-n\t\t\tSelect resolvables by plain name, not by capability\n"
- "\t--auto-agree-with-licenses,-l\tAutomatically say 'yes' to third party license confirmation prompt.\n"
- "\t\t\t\t\tSee man zypper for more details.\n"
- "\t--debug-solver\t\t\tCreate solver test case for debugging\n"
+ "-r, --repo <alias> Install resolvables only from repository specified by alias.\n"
+ "-t, --type <type> Type of resolvable (package, patch, pattern, product) (default: package)\n"
+ "-n, --name Select resolvables by plain name, not by capability\n"
+ "-l, --auto-agree-with-licenses Automatically say 'yes' to third party license confirmation prompt.\n"
+ " See 'man zypper' for more details.\n"
+ " --debug-solver Create solver test case for debugging\n"
);
}
else if (command == ZypperCommand::REMOVE) {
static struct option remove_options[] = {
+ {"repo", required_argument, 0, 'r'},
+ // rug compatibility option, we have --repo
+ {"catalog", required_argument, 0, 'c'},
{"type", required_argument, 0, 't'},
{"name", no_argument, 0, 'n'},
// rug compatibility, we have global --non-interactive
@@ -308,10 +317,11 @@
" NAME[ OP <VERSION>], where OP is one of <, <=, =, >=, >.\n"
"\n"
" Command options:\n"
- "\t--type,-t <resolvable_type>\tType of resolvable (package, patch, pattern, product) (default: package)\n"
- "\t--name,-n\t\t\tSelect resolvables by plain name, not by capability\n"
- "\t--debug-solver\t\t\tCreate solver test case for debugging\n"
- );
+ "-r, --repo <alias> Operate only with resolvables from repository specified by alias.\n"
+ "-t, --type <type> Type of resolvable (package, patch, pattern, product) (default: package)\n"
+ "-n, --name Select resolvables by plain name, not by capability\n"
+ " --debug-solver Create solver test case for debugging\n"
+ );
}
else if (command == ZypperCommand::ADD_REPO) {
static struct option service_add_options[] = {
@@ -419,9 +429,11 @@
}
else if (command == ZypperCommand::LIST_UPDATES) {
static struct option list_updates_options[] = {
- {"type", required_argument, 0, 't'},
- { "from-repo", required_argument, 0, 0 },
- { "best-effort", no_argument, 0, 0 },
+ {"repo", required_argument, 0, 'r'},
+ // rug compatibility option, we have --repo
+ {"catalog", required_argument, 0, 'c'},
+ {"type", required_argument, 0, 't'},
+ {"best-effort", no_argument, 0, 0 },
{"help", no_argument, 0, 'h'},
{0, 0, 0, 0}
};
@@ -432,17 +444,19 @@
"List all available updates\n"
"\n"
" Command options:\n"
- "\t--type,-t <resolvable_type>\tType of resolvable (package, patch, pattern, product) (default: patch)\n"
- "\t--from-repo <repository_alias>\tRestrict updates to named repository (default: get updates from all repositories)\n"
- "\t--best-effort\tDo a 'best effort' approach to update, updates to a lower than latest-and-greatest version are also acceptable\n"
+ "-t, --type <type> Type of resolvable (package, patch, pattern, product) (default: patch)\n"
+ "-r, --repo <alias> Work only with updates from repository specified by alias.\n"
+ " --best-effort Do a 'best effort' approach to update, updates to a lower than latest-and-greatest version are also acceptable.\n"
);
}
else if (command == ZypperCommand::UPDATE) {
static struct option update_options[] = {
+ {"repo", required_argument, 0, 'r'},
+ // rug compatibility option, we have --repo
+ {"catalog", required_argument, 0, 'c'},
{"type", required_argument, 0, 't'},
{"skip-interactive", no_argument, 0, 0},
{"auto-agree-with-licenses", no_argument, 0, 'l'},
- {"from-repo", required_argument, 0, 0},
{"best-effort", no_argument, 0, 0},
{"debug-solver", no_argument, 0, 0},
{"help", no_argument, 0, 'h'},
@@ -454,13 +468,13 @@
"\n"
" Command options:\n"
"\n"
- "\t--type,-t <resolvable_type>\tType of resolvable (package, patch, pattern, product) (default: patch)\n"
- "\t--skip-interactive\t\tSkip interactive updates\n"
- "\t--auto-agree-with-licenses,-l\tAutomatically say 'yes' to third party license confirmation prompt.\n"
- "\t\t\t\t\tSee man zypper for more details.\n"
- "\t--from-repo <repository_alias>\tRestrict updates to named repository (default: get updates from all repositories)\n"
- "\t--best-effort\t\t\tDo a 'best effort' approach to update, updates to a lower than latest-and-greatest version are also acceptable\n"
- "\t--debug-solver\t\t\tCreate solver test case for debugging\n"
+ "-t, --type <type> Type of resolvable (package, patch, pattern, product) (default: patch)\n"
+ "-r, --repo <alias> Work only with updates from repository specified by alias.\n"
+ " --skip-interactive Skip interactive updates\n"
+ "-l, --auto-agree-with-licenses Automatically say 'yes' to third party license confirmation prompt.\n"
+ " See man zypper for more details.\n"
+ " --best-effort Do a 'best effort' approach to update, updates to a lower than latest-and-greatest version are also acceptable\n"
+ " --debug-solver Create solver test case for debugging\n"
);
}
else if (command == ZypperCommand::SEARCH) {
@@ -476,7 +490,12 @@
{"case-sensitive", no_argument, 0, 'c'},
{"type", required_argument, 0, 't'},
{"sort-by-name", no_argument, 0, 0},
+ // rug compatibility option, we have --sort-by-repo
{"sort-by-catalog", no_argument, 0, 0},
+ {"sort-by-repo", no_argument, 0, 0},
+ // rug compatibility option, we have --repo
+ {"catalog", required_argument, 0, 'c'}, //! \todo fix conflicting 'c' short option
+ {"repo", required_argument, 0, 'r'},
{"help", no_argument, 0, 'h'},
{0, 0, 0, 0}
};
@@ -497,14 +516,18 @@
"-i, --installed-only Show only packages that are already installed.\n"
"-u, --uninstalled-only Show only packages that are not currently installed.\n"
"-t, --type Search only for packages of the specified type.\n"
+ "-r, --repo <alias> Search only in repository specified by alias.\n"
" --sort-by-name Sort packages by name (default).\n"
- " --sort-by-catalog Sort packages by catalog (source).\n"
+ " --sort-by-repo Sort packages by repository.\n"
"\n"
"* and ? wildcards can also be used within search strings.\n"
);
}
else if (command == ZypperCommand::PATCH_CHECK) {
static struct option patch_check_options[] = {
+ {"repo", required_argument, 0, 'r'},
+ // rug compatibility option, we have --repo
+ {"catalog", required_argument, 0, 'c'},
{"help", no_argument, 0, 'h'},
{0, 0, 0, 0}
};
@@ -514,11 +537,16 @@
"\n"
"Check for available patches\n"
"\n"
- "This command has no additional options.\n"
- );
+ " Command options:\n"
+ "\n"
+ "-r, --repo <alias> Check for patches only in repository specified by alias.\n"
+ );
}
else if (command == ZypperCommand::SHOW_PATCHES) {
static struct option patches_options[] = {
+ {"repo", required_argument, 0, 'r'},
+ // rug compatibility option, we have --repo
+ {"catalog", required_argument, 0, 'c'},
{"help", no_argument, 0, 'h'},
{0, 0, 0, 0}
};
@@ -528,11 +556,16 @@
"\n"
"List all available patches\n"
"\n"
- "This command has no additional options.\n"
- );
+ " Command options:\n"
+ "\n"
+ "-r, --repo <alias> Check for patches only in repository specified by alias.\n"
+ );
}
else if (command == ZypperCommand::INFO) {
static struct option info_options[] = {
+ {"repo", required_argument, 0, 'r'},
+ // rug compatibility option, we have --repo
+ {"catalog", required_argument, 0, 'c'},
{"help", no_argument, 0, 'h'},
{0, 0, 0, 0}
};
@@ -542,11 +575,15 @@
"\n"
"'info' -- Show full information for packages\n"
"\n"
- "This command has no additional options.\n"
- );
+ " Command options:\n"
+ "\n"
+ "-r, --repo <alias> Work only with the repository specified by alias.\n"
+ );
}
+ // rug compatibility command, we have zypper info [-t <res_type>]
else if (command == ZypperCommand::RUG_PATCH_INFO) {
static struct option patch_info_options[] = {
+ {"catalog", required_argument, 0, 'c'},
{"help", no_argument, 0, 'h'},
{0, 0, 0, 0}
};
@@ -556,8 +593,8 @@
"\n"
"'patch-info' -- Show detailed information for patches\n"
"\n"
- "This command has no additional options.\n"
- );
+ "This is a rug compatibility alias for 'zypper info -t patch'\n"
+ );
}
else if (command == ZypperCommand::MOO) {
static struct option moo_options[] = {
@@ -575,6 +612,7 @@
}
else if (command == ZypperCommand::XML_LIST_UPDATES_PATCHES) {
static struct option xml_updates_options[] = {
+ {"repo", required_argument, 0, 'r'},
{"help", no_argument, 0, 'h'},
{0, 0, 0, 0}
};
@@ -584,11 +622,13 @@
"\n"
"'xml-updates' - Show updates and patches in xml format\n"
"\n"
- "This command has no additional options.\n"
+ " Command options:\n"
+ "-r, --repo <alias> Work only with updates from repository specified by alias.\n"
);
}
- parsed_opts copts = parse_options (argc, argv, specific_options);
+ // parse command options
+ copts = parse_options (argc, argv, specific_options);
if (copts.count("_unknown"))
return ZYPPER_EXIT_ERR_SYNTAX;
@@ -891,7 +931,7 @@
return ZYPPER_EXIT_ERR_INVALID_ARGS;
}
- modify_repo(arguments[0], copts);
+ modify_repo(arguments[0]);
}
// --------------------------( refresh )------------------------------------
@@ -961,7 +1001,9 @@
return ZYPPER_EXIT_ERR_INVALID_ARGS;
}
- init_repos();
+ int initret = init_repos();
+ if (initret != ZYPPER_EXIT_OK)
+ return initret;
//! \todo support temporary additional repos
/*
@@ -1047,6 +1089,11 @@
options.resolveConflicts();
+ int initret = init_repos();
+ if (initret != ZYPPER_EXIT_OK)
+ return initret;
+ cond_init_target(); // calls ZYpp::initializeTarget("/");
+
Table t;
t.style(Ascii);
@@ -1054,8 +1101,9 @@
search.doSearch(FillTable(t, search.installedCache()));
if (t.empty())
- cout_n << _("No resolvables found.") << endl;
+ cout << _("No resolvables found.") << endl;
else {
+ cout << endl;
if (copts.count("sort-by-catalog")) t.sort(1);
else t.sort(3); // sort by name
cout << t;
@@ -1074,7 +1122,11 @@
}
cond_init_target ();
- init_repos ();
+
+ int initret = init_repos();
+ if (initret != ZYPPER_EXIT_OK)
+ return initret;
+
// TODO additional_sources
// TODO warn_no_sources
// TODO calc token?
@@ -1101,7 +1153,9 @@
}
cond_init_target ();
- init_repos ();
+ int initret = init_repos();
+ if (initret != ZYPPER_EXIT_OK)
+ return initret;
cond_load_resolvables();
establish ();
show_patches ();
@@ -1125,7 +1179,6 @@
return ZYPPER_EXIT_ERR_INVALID_ARGS;
}
- string srepo = copts.count( "from-repo" ) ? copts["from-repo"].front() : "";
bool best_effort = copts.count( "best-effort" );
if (gSettings.is_rug_compatible && best_effort) {
@@ -1135,11 +1188,13 @@
cerr << _("Running as 'rug', can't do 'best-effort' approach to update.") << endl;
}
cond_init_target ();
- init_repos ();
+ int initret = init_repos();
+ if (initret != ZYPPER_EXIT_OK)
+ return initret;
cond_load_resolvables();
establish ();
- list_updates( kind, srepo, best_effort );
+ list_updates( kind, best_effort );
return ZYPPER_EXIT_OK;
}
@@ -1152,7 +1207,9 @@
if (ghelp) { cout << specific_help << endl; return !ghelp; }
cond_init_target ();
- init_repos ();
+ int initret = init_repos();
+ if (initret != ZYPPER_EXIT_OK)
+ return initret;
cond_load_resolvables();
establish ();
@@ -1195,7 +1252,6 @@
return ZYPPER_EXIT_ERR_INVALID_ARGS;
}
- string srepo = copts.count( "from-repo" ) ? copts["from-repo"].front() : "";
bool best_effort = copts.count( "best-effort" );
if (gSettings.is_rug_compatible && best_effort) {
@@ -1205,12 +1261,14 @@
cerr << _("Running as 'rug', can't do 'best-effort' approach to update.") << endl;
}
cond_init_target ();
- init_repos ();
+ int initret = init_repos();
+ if (initret != ZYPPER_EXIT_OK)
+ return initret;
cond_load_resolvables ();
establish ();
bool skip_interactive = copts.count("skip-interactive") || gSettings.non_interactive;
- mark_updates( kind, srepo, skip_interactive, best_effort );
+ mark_updates( kind, skip_interactive, best_effort );
if (copts.count("debug-solver"))
@@ -1240,7 +1298,9 @@
}
cond_init_target ();
- init_repos ();
+ int initret = init_repos();
+ if (initret != ZYPPER_EXIT_OK)
+ return initret;
cond_load_resolvables ();
establish ();
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
[zypp-commit] r6346 - /trunk/libzypp/package/libzypp.changes
by mlandres@svn.opensuse.org 31 Jul '07
by mlandres@svn.opensuse.org 31 Jul '07
31 Jul '07
Author: mlandres
Date: Tue Jul 31 19:04:31 2007
New Revision: 6346
URL: http://svn.opensuse.org/viewcvs/zypp?rev=6346&view=rev
Log:
changes
Modified:
trunk/libzypp/package/libzypp.changes
Modified: trunk/libzypp/package/libzypp.changes
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/package/libzypp.changes?…
==============================================================================
--- trunk/libzypp/package/libzypp.changes (original)
+++ trunk/libzypp/package/libzypp.changes Tue Jul 31 19:04:31 2007
@@ -3,7 +3,7 @@
- Temorary files and directories created by makeSibling use the
same protection as the original.
-- revision 6317
+- revision 6344
- version 3.13.3
-------------------------------------------------------------------
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
[zypp-commit] r6345 - /trunk/libzypp/package/libzypp.changes
by mlandres@svn.opensuse.org 31 Jul '07
by mlandres@svn.opensuse.org 31 Jul '07
31 Jul '07
Author: mlandres
Date: Tue Jul 31 19:04:20 2007
New Revision: 6345
URL: http://svn.opensuse.org/viewcvs/zypp?rev=6345&view=rev
Log:
changes
Modified:
trunk/libzypp/package/libzypp.changes
Modified: trunk/libzypp/package/libzypp.changes
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/package/libzypp.changes?…
==============================================================================
--- trunk/libzypp/package/libzypp.changes (original)
+++ trunk/libzypp/package/libzypp.changes Tue Jul 31 19:04:20 2007
@@ -1,7 +1,15 @@
-------------------------------------------------------------------
+Tue Jul 31 19:06:54 CEST 2007 - ma(a)suse.de
+
+- Temorary files and directories created by makeSibling use the
+ same protection as the original.
+- revision 6317
+- version 3.13.3
+
+-------------------------------------------------------------------
Tue Jul 31 10:37:13 CEST 2007 - schubi(a)suse.de
-- Removed keepExtras from resolvePool. This will be handled
+- Removed keepExtras from resolvePool. This will be handled
in the solver internally now. #294727
- Checking if item really exists (#295544; ResolverInfoContainer.cc)
- revision 6317
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0