Hello community,
here is the log from the commit of package libstorage for openSUSE:Factory
checked in at Tue Apr 6 13:49:18 CEST 2010.
--------
--- libstorage/libstorage.changes 2010-04-01 14:13:37.000000000 +0200
+++ /mounts/work_src_done/STABLE/libstorage/libstorage.changes 2010-04-06 12:53:38.000000000 +0200
@@ -1,0 +2,5 @@
+Tue Apr 01 18:44:59 CEST 2010 - aschnell@suse.de
+
+- show size in create text for volume group
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libstorage.spec ++++++
--- /var/tmp/diff_new_pack.FQiRNF/_old 2010-04-06 13:49:11.000000000 +0200
+++ /var/tmp/diff_new_pack.FQiRNF/_new 2010-04-06 13:49:11.000000000 +0200
@@ -20,7 +20,7 @@
Name: libstorage
Version: 2.19.13
-Release: 1
+Release: 2
License: GPL
Group: System/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -144,4 +144,5 @@
%defattr(-,root,root)
%{python_sitelib}/libstorage.py*
%attr(755,root,root) %{python_sitearch}/_libstorage.so
+
%changelog
++++++ libstorage-2.19.13.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.19.13/storage/Device.cc new/libstorage-2.19.13/storage/Device.cc
--- old/libstorage-2.19.13/storage/Device.cc 2010-03-31 17:49:39.000000000 +0200
+++ new/libstorage-2.19.13/storage/Device.cc 2010-04-01 18:06:53.000000000 +0200
@@ -23,6 +23,7 @@
#include "storage/Device.h"
#include "storage/AppUtil.h"
#include "storage/StorageTmpl.h"
+#include "storage/HumanString.h"
namespace storage
@@ -89,6 +90,13 @@
}
+ string
+ Device::sizeString() const
+ {
+ return byteToHumanString(1024 * sizeK(), false, 2, false);
+ }
+
+
bool
Device::getMajorMinor()
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.19.13/storage/Device.h new/libstorage-2.19.13/storage/Device.h
--- old/libstorage-2.19.13/storage/Device.h 2010-03-31 17:49:39.000000000 +0200
+++ new/libstorage-2.19.13/storage/Device.h 2010-04-01 18:23:51.000000000 +0200
@@ -64,6 +64,7 @@
void setSilent(bool val = true) { silent = val; }
unsigned long long sizeK() const { return size_k; }
+ string sizeString() const;
bool getMajorMinor();
unsigned long majorNr() const { return mjr; }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.19.13/storage/LvmVg.cc new/libstorage-2.19.13/storage/LvmVg.cc
--- old/libstorage-2.19.13/storage/LvmVg.cc 2010-03-30 16:59:20.000000000 +0200
+++ new/libstorage-2.19.13/storage/LvmVg.cc 2010-04-01 18:43:08.000000000 +0200
@@ -209,6 +209,7 @@
getStorage()->setUsedBy(d, UB_LVM, device());
free_pe += pe;
num_pe += pe;
+ calcSize();
++i;
}
if( ret==0 && pv_add.size()+pv.size()-pv_remove.size()<=0 )
@@ -265,6 +266,7 @@
pv_remove = plrem;
free_pe -= rem_pe;
num_pe -= rem_pe;
+ calcSize();
}
if( ret==0 )
checkConsistency();
@@ -722,10 +724,12 @@
if( exists && pes != pe_size )
y2war("inconsistent pe_size my:" << pe_size << " lvm:" << pes);
pe_size = pes;
+ calcSize();
}
else if( line.find( "Total PE" ) == 0 )
{
extractNthWord( 2, line ) >> num_pe;
+ calcSize();
}
else if( line.find( "Free PE" ) == 0 )
{
@@ -839,6 +843,7 @@
{
extractNthWord( 5, line ) >> p->num_pe;
extractNthWord( 7, line ) >> p->free_pe;
+ calcSize();
}
line = c.getLine( i++ );
}
@@ -1074,17 +1079,21 @@
Text txt;
if( doing )
{
- // displayed text during action, %1$s is replaced by a name (e.g. system),
- // %2$s is replaced by one or more devices (e.g /dev/sda1 /dev/sda2)
- txt = sformat( _("Creating volume group %1$s from %2$s"), name().c_str(),
- addList().c_str() );
+ // displayed text during action
+ // %1$s is replaced by a name (e.g. system)
+ // %2$s is replaced by size (e.g. 623.5 MB)
+ // %3$s is replaced by one or more devices (e.g /dev/sda1 /dev/sda2)
+ txt = sformat(_("Creating volume group %1$s (%2$s) from %3$s"), name().c_str(),
+ sizeString().c_str(), addList().c_str());
}
else
{
- // displayed text before action, %1$s is replaced by a name (e.g. system),
- // %2$s is replaced by one or more devices (e.g /dev/sda1 /dev/sda2)
- txt = sformat( _("Create volume group %1$s from %2$s"), name().c_str(),
- addList().c_str() );
+ // displayed text before action
+ // %1$s is replaced by a name (e.g. system)
+ // %2$s is replaced by size (e.g. 623.5 MB)
+ // %3$s is replaced by one or more devices (e.g /dev/sda1 /dev/sda2)
+ txt = sformat(_("Create volume group %1$s (%2$s) from %3$s"), name().c_str(),
+ sizeString().c_str(), addList().c_str());
}
return( txt );
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.19.13/storage/PeContainer.cc new/libstorage-2.19.13/storage/PeContainer.cc
--- old/libstorage-2.19.13/storage/PeContainer.cc 2010-03-30 16:59:20.000000000 +0200
+++ new/libstorage-2.19.13/storage/PeContainer.cc 2010-04-01 18:33:06.000000000 +0200
@@ -170,6 +170,7 @@
}
pe_size = peSizeK;
}
+ calcSize();
}
y2mil("ret:" << ret);
return( ret );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.19.13/storage/PeContainer.h new/libstorage-2.19.13/storage/PeContainer.h
--- old/libstorage-2.19.13/storage/PeContainer.h 2010-03-26 12:16:06.000000000 +0100
+++ new/libstorage-2.19.13/storage/PeContainer.h 2010-04-01 18:32:22.000000000 +0200
@@ -45,7 +45,6 @@
void saveData(xmlNode* node) const;
unsigned long long peSize() const { return pe_size; }
- unsigned long long sizeK() const { return pe_size*num_pe; }
unsigned long peCount() const { return num_pe; }
unsigned long peFree() const { return free_pe; }
unsigned numPv() const { return pv.size(); }
@@ -54,6 +53,7 @@
unsigned long sizeToLe( unsigned long long sizeK ) const;
int setPeSize( long long unsigned, bool lvm1 );
+ void calcSize() { size_k = pe_size * num_pe; }
void unuseDev() const;
void changeDeviceName( const string& old, const string& nw );
bool equalContent( const PeContainer& rhs, bool comp_vol=true ) const;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.19.13/storage/Storage.cc new/libstorage-2.19.13/storage/Storage.cc
--- old/libstorage-2.19.13/storage/Storage.cc 2010-04-01 13:54:53.000000000 +0200
+++ new/libstorage-2.19.13/storage/Storage.cc 2010-04-01 16:59:46.000000000 +0200
@@ -935,9 +935,7 @@
void
Storage::handleLogFile(const string& name) const
{
- string bname( name );
- string::size_type pos = bname.rfind( '.' );
- bname.erase( pos );
+ string bname(name, 0, name.rfind('.'));
y2mil("name:" << name << " bname:" << bname);
if( access( bname.c_str(), R_OK )==0 )
{
@@ -3167,9 +3165,7 @@
ret = v->setPeSize( peSizeK );
if( ret==0 && !devs.empty() )
{
- list<string> d;
- back_insert_iterator inserter(d);
- copy( devs.begin(), devs.end(), inserter );
+ list<string> d(devs.begin(), devs.end());
ret = v->extendVg( d );
}
if( ret==0 )
@@ -3231,9 +3227,7 @@
}
else if( i != lvgEnd() )
{
- list<string> d;
- back_insert_iterator
inserter(d);
- copy( devs.begin(), devs.end(), inserter );
+ list<string> d(devs.begin(), devs.end());
ret = i->extendVg( d );
}
else
@@ -3261,9 +3255,7 @@
}
else if( i != lvgEnd() )
{
- list<string> d;
- back_insert_iterator
inserter(d);
- copy( devs.begin(), devs.end(), inserter );
+ list<string> d(devs.begin(), devs.end());
ret = i->reduceVg( d );
}
else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.19.13/storage/Volume.cc new/libstorage-2.19.13/storage/Volume.cc
--- old/libstorage-2.19.13/storage/Volume.cc 2010-03-31 17:49:39.000000000 +0200
+++ new/libstorage-2.19.13/storage/Volume.cc 2010-04-01 17:58:07.000000000 +0200
@@ -39,7 +39,6 @@
#include "storage/OutputProcessor.h"
#include "storage/EtcFstab.h"
#include "storage/StorageDefines.h"
-#include "storage/HumanString.h"
namespace storage
@@ -2793,10 +2792,6 @@
return( ret );
}
-string Volume::sizeString() const
-{
- return byteToHumanString(1024 * size_k, false, 2, false);
-}
bool Volume::canUseDevice() const
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-2.19.13/storage/Volume.h new/libstorage-2.19.13/storage/Volume.h
--- old/libstorage-2.19.13/storage/Volume.h 2010-03-31 17:49:39.000000000 +0200
+++ new/libstorage-2.19.13/storage/Volume.h 2010-04-01 17:55:47.000000000 +0200
@@ -174,7 +174,6 @@
Text losetupText( bool doing=true ) const;
Text crsetupText( bool doing=true ) const;
Text fstabUpdateText() const;
- string sizeString() const;
bool optNoauto() const;
bool inCryptotab() const { return( encryption!=ENC_NONE &&
encryption!=ENC_LUKS &&
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org