Mailinglist Archive: zypp-commit (223 mails)

< Previous Next >
[zypp-commit] r10523 - in /trunk/libzypp: devel/devel.ma/NewPool.cc package/libzypp.changes zypp/Package.cc zypp/sat/SolvAttr.cc zypp/sat/SolvAttr.h
  • From: mlandres@xxxxxxxxxxxxxxxx
  • Date: Wed, 09 Jul 2008 10:20:25 -0000
  • Message-id: <20080709102025.ABADD2F105@xxxxxxxxxxxxxxxx>
Author: mlandres
Date: Wed Jul 9 12:20:25 2008
New Revision: 10523

URL: http://svn.opensuse.org/viewcvs/zypp?rev=10523&view=rev
Log:
Provide Package::url() if available in solv file. (bnc #402434)

Modified:
trunk/libzypp/devel/devel.ma/NewPool.cc
trunk/libzypp/package/libzypp.changes
trunk/libzypp/zypp/Package.cc
trunk/libzypp/zypp/sat/SolvAttr.cc
trunk/libzypp/zypp/sat/SolvAttr.h

Modified: trunk/libzypp/devel/devel.ma/NewPool.cc
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.ma/NewPool.cc?rev=10523&r1=10522&r2=10523&view=diff
==============================================================================
--- trunk/libzypp/devel/devel.ma/NewPool.cc (original)
+++ trunk/libzypp/devel/devel.ma/NewPool.cc Wed Jul 9 12:20:25 2008
@@ -559,29 +559,6 @@
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////

- SEC << zypp::getZYpp()->diskUsage() << endl;
-
- for_( it, pool.begin(), pool.end() )
- {
- //MIL << *it << endl;
- //DBG << (*it)->diskusage() << endl;
- }
-
- PoolItem pu ( getPi<Package>("amarok") );
- PoolItem pi ( getPi<Package>("amarok",Edition("1.4.7-37")) );
-
- pi.status().setTransact( true, ResStatus::USER );
- SEC << zypp::getZYpp()->diskUsage() << endl;
-
- pu.status().setTransact( true, ResStatus::USER );
- SEC << zypp::getZYpp()->diskUsage() << endl;
-
-
- ///////////////////////////////////////////////////////////////////
- INT << "===[END]============================================" << endl <<
endl;
- zypp::base::LogControl::instance().logNothing();
- return 0;
-
if ( 0 )
{
PoolItem pi ( getPi<Package>("amarok") );
@@ -596,7 +573,7 @@
}
}

- SEC << zypp::getZYpp()->diskUsage() << endl;
+ //SEC << zypp::getZYpp()->diskUsage() << endl;

//vdumpPoolStats( USR << "Pool:"<< endl, pool.begin(), pool.end() ) << endl;
//waitForInput();

Modified: trunk/libzypp/package/libzypp.changes
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/package/libzypp.changes?rev=10523&r1=10522&r2=10523&view=diff
==============================================================================
--- trunk/libzypp/package/libzypp.changes (original)
+++ trunk/libzypp/package/libzypp.changes Wed Jul 9 12:20:25 2008
@@ -1,8 +1,14 @@
-------------------------------------------------------------------
+Wed Jul 9 12:13:58 CEST 2008 - ma@xxxxxxx
+
+- Provide Package::url() if available in solv file. (bnc #402434)
+- revision 10523
+
+-------------------------------------------------------------------
Mon Jul 7 13:39:09 CEST 2008 - schubi@xxxxxxx

-- Do not update an already updated package Bug 400422
-- Revision 10504
+- Do not update an already updated package (bnc #400422)
+- revision 10504

-------------------------------------------------------------------
Fri Jul 4 17:19:24 CEST 2008 - ma@xxxxxxx

Modified: trunk/libzypp/zypp/Package.cc
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Package.cc?rev=10523&r1=10522&r2=10523&view=diff
==============================================================================
--- trunk/libzypp/zypp/Package.cc (original)
+++ trunk/libzypp/zypp/Package.cc Wed Jul 9 12:20:25 2008
@@ -51,7 +51,7 @@
Changelog Package::changelog() const
{
Target_Ptr target;
- try
+ try
{
target = getZYpp()->target();
}
@@ -60,8 +60,8 @@
ERR << "Target not initialized. Changelog is not available." <<
std::endl;
return Changelog();
}
-
-
+
+
if ( repository().isSystemRepo() )
{
target::rpm::RpmHeader::constPtr header;
@@ -72,36 +72,27 @@
return Changelog();
}

- /** */
std::string Package::buildhost() const
{ return lookupStrAttribute( sat::SolvAttr::buildhost ); }

- /** */
std::string Package::distribution() const
{ return lookupStrAttribute( sat::SolvAttr::distribution ); }

- /** */
std::string Package::license() const
{ return lookupStrAttribute( sat::SolvAttr::license ); }

- /** */
std::string Package::packager() const
{ return lookupStrAttribute( sat::SolvAttr::packager ); }

- /** */
std::string Package::group() const
{ return lookupStrAttribute( sat::SolvAttr::group ); }

Package::Keywords Package::keywords() const
{ return Keywords( sat::SolvAttr::keywords, satSolvable() ); }

- /** Don't ship it as class Url, because it might be
- * in fact anything but a legal Url. */
-#warning DUMMY url
std::string Package::url() const
- { return string(); }
+ { return lookupStrAttribute( sat::SolvAttr::url ); }

- /** */
ByteCount Package::sourcesize() const
{ return lookupNumAttribute( sat::SolvAttr::sourcesize ); }

@@ -113,8 +104,8 @@
}

std::list<std::string> Package::filenames() const
- {
- std::list<std::string> files;
+ {
+ std::list<std::string> files;
sat::LookupAttr q( sat::SolvAttr::filelist, *this );
for_( it, q.begin(), q.end() )
{
@@ -129,20 +120,20 @@
OnMediaLocation Package::location() const
{ return lookupLocation(); }

- std::string Package::sourcePkgName() const
- {
+ std::string Package::sourcePkgName() const
+ {
// no id means same as package
- sat::detail::IdType id( lookupIdAttribute( sat::SolvAttr::sourcename ) );
- id = lookupIdAttribute(sat::SolvAttr::sourcearch);
- return id ? IdString( id ).asString() : name();
- }
+ sat::detail::IdType id( lookupIdAttribute( sat::SolvAttr::sourcename ) );
+ id = lookupIdAttribute(sat::SolvAttr::sourcearch);
+ return id ? IdString( id ).asString() : name();
+ }

- Edition Package::sourcePkgEdition() const
- {
+ Edition Package::sourcePkgEdition() const
+ {
// no id means same as package
- sat::detail::IdType id( lookupIdAttribute( sat::SolvAttr::sourceevr ) );
- return id ? Edition( id ) : edition();
- }
+ sat::detail::IdType id( lookupIdAttribute( sat::SolvAttr::sourceevr ) );
+ return id ? Edition( id ) : edition();
+ }

/////////////////////////////////////////////////////////////////
} // namespace zypp

Modified: trunk/libzypp/zypp/sat/SolvAttr.cc
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/sat/SolvAttr.cc?rev=10523&r1=10522&r2=10523&view=diff
==============================================================================
--- trunk/libzypp/zypp/sat/SolvAttr.cc (original)
+++ trunk/libzypp/zypp/sat/SolvAttr.cc Wed Jul 9 12:20:25 2008
@@ -68,6 +68,7 @@
const SolvAttr SolvAttr::sourcename ( SOLVABLE_SOURCENAME );
const SolvAttr SolvAttr::sourceevr ( SOLVABLE_SOURCEEVR );
const SolvAttr SolvAttr::headerend ( SOLVABLE_HEADEREND );
+ const SolvAttr SolvAttr::url ( SOLVABLE_URL );

// patch
const SolvAttr SolvAttr::patchcategory ( SOLVABLE_PATCHCATEGORY );

Modified: trunk/libzypp/zypp/sat/SolvAttr.h
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/sat/SolvAttr.h?rev=10523&r1=10522&r2=10523&view=diff
==============================================================================
--- trunk/libzypp/zypp/sat/SolvAttr.h (original)
+++ trunk/libzypp/zypp/sat/SolvAttr.h Wed Jul 9 12:20:25 2008
@@ -42,9 +42,9 @@
static const SolvAttr noAttr;

/** \name special solvable attributes which are part of the ::Solvable
struct
- *
+ *
* \todo can these be used in LookupAttr currently?
- * \todo add dependencies here? Or move all this stuff elsewhere?
+ * \todo add dependencies here? Or move all this stuff elsewhere?
*/
//@{
static const SolvAttr name;
@@ -87,6 +87,7 @@
static const SolvAttr sourcename;
static const SolvAttr sourceevr;
static const SolvAttr headerend;
+ static const SolvAttr url;
//@}

/** \name patch */

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages