Mailinglist Archive: zypp-devel (115 mails)
| < Previous | Next > |
Re: [zypp-devel] Re: [zypp-commit] r5933 - in /branches/REFACTORING-10_3/libzypp/zypp: RepoInfo.cc RepoInfo.h
- From: Michael Andres <ma@xxxxxxx>
- Date: Mon, 9 Jul 2007 17:00:35 +0200
- Message-id: <20070709150035.GA14446@xxxxxxx>
On Mon, Jul 09, Klaus Kaempf wrote:
> * dmacvicar@xxxxxxxxxxxxxxxx <dmacvicar@xxxxxxxxxxxxxxxx> [Jul 09. 2007 14:57]:
> > Author: dmacvicar
> > Date: Mon Jul 9 14:57:21 2007
> > New Revision: 5933
> >
> > URL: http://svn.opensuse.org/viewcvs/zypp?rev=5933&view=rev
> > Log:
> >
> > provide numeric id on run time for RepoInfo, useful
> > for YaST, useless for the rest of the world.
>
> Please keep a list of those things (e.g. http://en.opensuse.org/Libzypp/Refactoring/Cleanup
> or a DEPRECATED comment in the .cc or .h file) so we can address them in the future.
This particular change will be reverted.
A fix numeric id on run time is usefull for objects that follow reference
semantics (all 'copies' refer to the same object in memory).
But RepoInfo performs copy-on-write, so such an Id is more dangerous than
uesefull. In fact you expose an implementation detail, because the ID
changes whenever a copy of the implementation class is created.
In order to be 'reliable' for YaST, YaST had to treat the RepoInfos such a
way that no copies of the implementation class are created. That's quite
error-prone.
--
cu,
Michael Andres
+------------------------------------------------------------------+
Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4
+------------------------------------------------------------------+
Michael Andres YaST Development ma@xxxxxxxxxx
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg)
Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0
+------------------------------------------------------------------+
--
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx
> * dmacvicar@xxxxxxxxxxxxxxxx <dmacvicar@xxxxxxxxxxxxxxxx> [Jul 09. 2007 14:57]:
> > Author: dmacvicar
> > Date: Mon Jul 9 14:57:21 2007
> > New Revision: 5933
> >
> > URL: http://svn.opensuse.org/viewcvs/zypp?rev=5933&view=rev
> > Log:
> >
> > provide numeric id on run time for RepoInfo, useful
> > for YaST, useless for the rest of the world.
>
> Please keep a list of those things (e.g. http://en.opensuse.org/Libzypp/Refactoring/Cleanup
> or a DEPRECATED comment in the .cc or .h file) so we can address them in the future.
This particular change will be reverted.
A fix numeric id on run time is usefull for objects that follow reference
semantics (all 'copies' refer to the same object in memory).
But RepoInfo performs copy-on-write, so such an Id is more dangerous than
uesefull. In fact you expose an implementation detail, because the ID
changes whenever a copy of the implementation class is created.
In order to be 'reliable' for YaST, YaST had to treat the RepoInfos such a
way that no copies of the implementation class are created. That's quite
error-prone.
--
cu,
Michael Andres
+------------------------------------------------------------------+
Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4
+------------------------------------------------------------------+
Michael Andres YaST Development ma@xxxxxxxxxx
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg)
Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0
+------------------------------------------------------------------+
--
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx
| < Previous | Next > |