Mailinglist Archive: zypp-commit (301 mails)

< Previous Next >
[zypp-commit] r7693 - in /branches/SuSE-SLE-10-SP2-Branch: backend/package/libzypp-zmd-backend.changes backend/src/dbsource/zmd-backend.cc libzypp/package/libzypp.changes libzypp/zypp/ZYppFactory.cc
  • From: aschnell@xxxxxxxxxxxxxxxx
  • Date: Mon, 29 Oct 2007 16:47:30 -0000
  • Message-id: <20071029164731.27E062FCB8@xxxxxxxxxxxxxxxx>
Author: aschnell
Date: Mon Oct 29 17:47:30 2007
New Revision: 7693

URL: http://svn.opensuse.org/viewcvs/zypp?rev=7693&view=rev
Log:
- extended message of ZYppFactoryException (bug #191147)

Modified:
branches/SuSE-SLE-10-SP2-Branch/backend/package/libzypp-zmd-backend.changes
branches/SuSE-SLE-10-SP2-Branch/backend/src/dbsource/zmd-backend.cc
branches/SuSE-SLE-10-SP2-Branch/libzypp/package/libzypp.changes
branches/SuSE-SLE-10-SP2-Branch/libzypp/zypp/ZYppFactory.cc

Modified:
branches/SuSE-SLE-10-SP2-Branch/backend/package/libzypp-zmd-backend.changes
URL:
http://svn.opensuse.org/viewcvs/zypp/branches/SuSE-SLE-10-SP2-Branch/backend/package/libzypp-zmd-backend.changes?rev=7693&r1=7692&r2=7693&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP2-Branch/backend/package/libzypp-zmd-backend.changes
(original)
+++ branches/SuSE-SLE-10-SP2-Branch/backend/package/libzypp-zmd-backend.changes
Mon Oct 29 17:47:30 2007
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Mon Oct 29 17:33:06 CET 2007 - aschnell@xxxxxxx
+
+- report message of ZYppFactoryException (bug #191147)
+
+-------------------------------------------------------------------
Thu Oct 25 16:03:03 CEST 2007 - duncan@xxxxxxx

- Add zmd-solver-testcase binary which allows for easy generation of

Modified: branches/SuSE-SLE-10-SP2-Branch/backend/src/dbsource/zmd-backend.cc
URL:
http://svn.opensuse.org/viewcvs/zypp/branches/SuSE-SLE-10-SP2-Branch/backend/src/dbsource/zmd-backend.cc?rev=7693&r1=7692&r2=7693&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP2-Branch/backend/src/dbsource/zmd-backend.cc
(original)
+++ branches/SuSE-SLE-10-SP2-Branch/backend/src/dbsource/zmd-backend.cc Mon Oct
29 17:47:30 2007
@@ -32,8 +32,8 @@
}
catch (Exception & excpt_r) {
ZYPP_CAUGHT (excpt_r);
- cerr << "1|A transaction is already in progress." << endl;
- cout << "A transaction is already in progress." << endl;
+ cerr << "1|" << excpt_r.asUserString() << endl;
+ cout << excpt_r.asUserString() << endl;
exit(1);
}
return Z;

Modified: branches/SuSE-SLE-10-SP2-Branch/libzypp/package/libzypp.changes
URL:
http://svn.opensuse.org/viewcvs/zypp/branches/SuSE-SLE-10-SP2-Branch/libzypp/package/libzypp.changes?rev=7693&r1=7692&r2=7693&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP2-Branch/libzypp/package/libzypp.changes (original)
+++ branches/SuSE-SLE-10-SP2-Branch/libzypp/package/libzypp.changes Mon Oct 29
17:47:30 2007
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Mon Oct 29 17:31:45 CET 2007 - aschnell@xxxxxxx
+
+- extended message of ZYppFactoryException (bug #191147)
+
+-------------------------------------------------------------------
Fri Oct 26 15:33:01 CEST 2007 - aschnell@xxxxxxx

- fixed retrieval of epoch from rpmdb (bug #246680)

Modified: branches/SuSE-SLE-10-SP2-Branch/libzypp/zypp/ZYppFactory.cc
URL:
http://svn.opensuse.org/viewcvs/zypp/branches/SuSE-SLE-10-SP2-Branch/libzypp/zypp/ZYppFactory.cc?rev=7693&r1=7692&r2=7693&view=diff
==============================================================================
--- branches/SuSE-SLE-10-SP2-Branch/libzypp/zypp/ZYppFactory.cc (original)
+++ branches/SuSE-SLE-10-SP2-Branch/libzypp/zypp/ZYppFactory.cc Mon Oct 29
17:47:30 2007
@@ -63,6 +63,7 @@
ZYppGlobalLock()
: _clean_lock(false)
, _zypp_lockfile(0)
+ , _locker_pid(0)
{}

~ZYppGlobalLock()
@@ -89,10 +90,13 @@
catch(...) {} // let no exception escape.
}

+ pid_t locker_pid() const { return _locker_pid; }
+
bool _clean_lock;

private:
FILE *_zypp_lockfile;
+ pid_t _locker_pid;

void openLockFile(const char *mode)
{
@@ -173,13 +177,13 @@
pid_t lockerPid()
{
pid_t curr_pid = getpid();
- pid_t locked_pid = 0;
+ pid_t locker_pid = 0;
long readpid = 0;

fscanf(_zypp_lockfile, "%ld", &readpid);
MIL << "read: Lockfile " << ZYPP_LOCK_FILE << " has pid " << readpid <<
" (our pid: " << curr_pid << ") "<< std::endl;
- locked_pid = (pid_t) readpid;
- return locked_pid;
+ locker_pid = (pid_t) readpid;
+ return locker_pid;
}

public:
@@ -196,7 +200,8 @@
shLockFile();

pid_t locker_pid = lockerPid();
- if ( locker_pid == curr_pid )
+ _locker_pid = locker_pid;
+ if ( locker_pid == curr_pid )
{
// alles ok, we are requesting the instance again
//MIL << "Lockfile found, but it is myself. Assuming same process
getting zypp instance again." << std::endl;
@@ -276,7 +281,7 @@
///////////////////////////////////////////////////////////////////

ZYppFactoryException::ZYppFactoryException( const std::string & msg_r )
- : Exception(N_("Software management is already running."))
+ : Exception(msg_r)
{}

///////////////////////////////////////////////////////////////////
@@ -331,7 +336,10 @@
/*--------------------------------------------------*/
if ( globalLock.zyppLocked() )
{
- ZYPP_THROW( ZYppFactoryException(N_("Software management is already
running.")) );
+ string t = str::form(N_("System management is locked by the application
with pid %d. "
+ "Please close this application before trying
again."),
+ globalLock.locker_pid());
+ ZYPP_THROW(ZYppFactoryException(t));
}
else
{

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

< Previous Next >
This Thread
  • No further messages