Erase handling is not the best feature of system model, and it comes
down to the fact that "erase" is not well-specified. Does it mean
"erase-if-it-exists" or "erase-and-it-must-exist"?  And intermediate
"erase" operations could potentially modify the results of the
system model; erase is order-dependent.

I agree that this behavior is hard to understand.  However, exactly
what is right to do is harder to know.

A system model is a kind of story.  "Pretend that I had installed
this, updated that, erased that other thing, etc: find the state
in which that would leave the system and put it in that state."
The "updateall" operation updates all the version numbers, and
then re-runs the model.  If lines in the system model do not make
sense in the new context, it's hard to know how to "rewrite the
story" to honor the original intent.  The "erase" is the most common
case of this, but also an "install" of a version that later comes
to contradict a version added to a group can do the same, as when
a package is installed from a private repository on its way to being
added to the system group.

Erik and I were tackling that when rPath changed directions and I
went to SAS, which is why we don't have great answers at this
point.  While system model is in basic use now internally at SAS,
that use hasn't yet raised this issue and it's not clear whether
it will in the future.

The good news is that this no longer depends on SAS to implement.
Nine years after we started developing Conary, we finally are in
a position to accept external contributions without copyright
assignment.  After the necessary contributor agreement, which is
modeled on the Linux kernel Developer Certificate of Origin, is
added to the Conary source code, we will have the option to
incorporate external contributions that follow that process.

I can't tell you how happy this makes me.

That said, changes to the actions of system model will certainly
take review and careful thought.

I could imagine an option to "conary updateall" that would tell
it to remove (or potentially comment out) lines that cause
errors.  I don't have a sense for how much work that would be.
That would clearly not be the default out of the box.  It is
possible that the default setting for that behavior could be
set by a configuration option.

Given such an option, there could be another similar one that
would clear out all no-op lines. It would slow processing a bit,
but that might be OK.  But because "install" really means "make
sure this is installed, and it's OK if it was already installed"
in the system model language, that would have to be an option
or configuration setting.

On Sat, May 25, 2013 at 10:22:11PM +0200, Martin Bähr wrote:
> hi,
> 
> i am puzzeld by this behaviour of conary:
> 
> # conary updateall
> No troves found matching: padevchooser
> # conary erase padevchooser
>   Erase   padevchooser(:data :runtime)=0.9.4-5-1
> # conary updateall
> No troves found matching: seed
> # conary erase seed
> Erase   seed(:data :lib :runtime)=2.31.91-2-6[~!builddocs]
> # conary updateall
> libbonoboui was not found on path foresight.rpath.org@fl:2-qa (Closest 
> alternate flavors found: [ is: x86_64])
> # vim /etc/conary/system-model
> (remove line
>   erase 'libbonoboui[~!builddocs is: x86]')
> # conary updateall
> libgnomecanvas was not found on path foresight.rpath.org@fl:2-qa (Closest 
> alternate flavors found: [is: x86_64])
> # vim /etc/conary/system-model
> (remove line
>   erase 'libgnomecanvas[~!builddocs is: x86]')
> # conary updateall                                                           
> pygobject:data was not found on path foresight.rpath.org@fl:2-qa (Closest 
> alternate flavors found: [is: x86_64])
> # vim /etc/conary/system-model
> (remove lines 
>   erase 'pygobject:data[~!builddocs is: x86]'
>   erase 'pygobject:doc[~!builddocs is: x86]'
>   erase 'pygobject:runtime[~!builddocs is: x86]')
> # conary updateall
> seed:doc was not found
> # vim /etc/conary/system-model
> (remove line
>   erase 'seed:doc[~!builddocs is: x86_64]')
> # conary updateall
> padevchooser was not found
> # vim /etc/conary/system-model
> (remove line
>   erase padevchooser)
> # conary updateall
> seed was not found
> # vim /etc/conary/system-model
> (remove line
>   erase seed)
> 
> now i can understand conary complaining about install lines which point
> to non-existing packages.
> i can also get why it would complain about erase lines, if i put them
> there manually (by editing the system-model)
> 
> but i do not get why it can't handle removal of packages that are not
> mentioned in the system model (padevchooser was not mentioned), seed was
> only in there as seed:doc. ardour (see below) was not mentioned either.
> 
> i am also wondering, if errors about bogus erase lines could be turned
> into a warning, or ignored. (if i don't want a package, and it's removed
> from the groups, then i have to remove it from system-model, and then it
> is added back into groups, then suddenly the package will be installed
> again, and i have to remove it again manually, whereas if the erase-line
> would stay, it would be gone for good)
> 
> and further, it would be nice if conary could list all problems in
> system model all at once and not make me run updateall 8 times.
> 
> on my laptop i got his simpler case:
> # conary updateall
> No troves found matching: ardour
> # conary erase ardour
>     Erase   ardour(:config :data :lib :runtime)=2.8.11-1-1
>     Erase   slv2(:lib)=0.6.6-4-2
> # conary updateall                                                            
>     
> wireshark was not found   
> # conary erase wireshark
>     Erase   info-wireshark(:group)=1-1-1
>     Erase   wireshark(:runtime)=1.6.10-1-1
> # conary updateall                                                            
>     
> wireshark was not found   
> # vim /etc/conary/system-model
> (remove lines
>   install wireshark:runtime
>   erase wireshark
>   erase wireshark
>   (i removed lines by commenting them with # and at the time of writing
>    this email i can't remember if one of those wireshark lines was already
>    commented out or not. one of the erase lines was in the middle of the
>    file, the other at the end))
> # conary updateall                                                            
>     
> ardour was not found      
> # vim /etc/conary/system-model
> (remove line
>   erase ardour)
> 
> greetings, martin.
> -- 
> eKita                   -   the online platform for your entire academic life
> hackerspace beijing     -       http://societyserver.org/hackerspace-beijing/
> --
> chief engineer                                                       eKita.co
> pike programmer      pike.lysator.liu.se                          caudium.net
> foresight developer  realss.com                            foresightlinux.org
> unix sysadmin        trainer        developer               societyserver.org
> Martin Bähr          working in china        http://societyserver.org/mbaehr/
> 
> _______________________________________________
> Foresight-devel mailing list
> [email protected]
> https://lists.foresightlinux.org/mailman/listinfo/foresight-devel

_______________________________________________
Foresight-devel mailing list
[email protected]
https://lists.foresightlinux.org/mailman/listinfo/foresight-devel

Reply via email to