Bug 1539 - downloads of distribution packages
downloads of distribution packages
Status: RESOLVED FIXED
Product: bake
Classification: Unclassified
Component: bakeconf.xml
unspecified
PC Linux
: P3 normal
Assigned To: Daniel Camara
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-30 15:32 UTC by Tom Henderson
Modified: 2012-12-04 17:39 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Henderson 2012-11-30 15:32:13 UTC
./bake.py configure -a && ./bake.py download shows that these are being downloaded on a Fedora system:

 >> Downloading qt4
 >> Download qt4 - OK
...
 >> Downloading libxml2-dev
 >> Download libxml2-dev - OK

With more verbosity (-vv):

 >> Downloading qt4
 yum -y install qt4-devel dir=/openvz/scratch/tomh/bake-test/source
Loaded plugins: auto-update-debuginfo, presto, refresh-packagekit
You need to be root to perform this command.
 >> Download qt4 - OK

 >> Downloading libxml2-dev
 >> Download libxml2-dev - OK

On this system, libxml2-devel is already installed, qt-devel is not.  

So, for starters, it seems to be wrong to report "OK" in this case where it fails to install underneath.  It is also reporting OK when there is a no-op, implying that something was performed.

I might expect instead something like:

 >> Downloading qt4
 >> Download qt4 - FAIL:  You need to be root to perform this command.
...
 >> Downloading libxml2-dev
 >> Not downloading libxml2-dev as it is already installed on the system


However, I'm wondering about having bake do package installs because of mixing of privileges.  I'd rather not recommend "sudo bake.py download" to users.  I'd rather that the user exits out of bake and installs qt4 then reruns bake.

I think this gets to a question about the scope of bake; should it be doing conf checks on underlying distribution packages and trying to wrap package management tools?
Comment 1 Daniel Camara 2012-12-04 17:39:39 UTC

-- 
> So, for starters, it seems to be wrong to report "OK" in this
> case where it fails to install underneath.  It is also reporting
> OK when there is a no-op, implying that something was performed.

Fixed, the planned behavior wasn't to show OK if the command failed. I had changed the message but I forguet to raise the exception, I just fixed.

...
>  >> Downloading libxml2-dev
>  >> Not downloading libxml2-dev as it is already installed on the system

I added the message in case of already installed module, however, I enabled it only for verbose mode. I guess if the dependency is there it is fine for the user, I believe a cleaner output is better.

>  However, I'm wondering about having bake do package installs
> because of mixing of privileges.  I'd rather not recommend
> "sudo bake.py download" to users.  I'd rather that the user
> exits out of bake and installs qt4 then reruns bake.

> I think this gets to a question about the scope of bake;
> should it be doing conf checks on underlying distribution
> packages and trying to wrap package management tools?

 Well this was made in the spirit of helping the users and making their live easier, and in any case, it is just an attempt to help. If there is a problem an error message is shown and the user at least knows where to start to search for answers. I believe that having the option, to be able to do that, is better than not having anything. The idea is that we can even make bake auto sufficient, it is easy to have an "bake configure -e InstallAllDependencies"  that will go and install all that bake will ever need, e.g. mercurial, svn, cmake, autotools.... and kitchen sink... Well, I didn't do that because I guess it is overkill for most of the users, but can easily be done with the system dependencies. 

What I consider is that the system dependencies are as important as any module dependency... for this reason I guess, when such dependencies are really required for the module, they should be able to be expressed some how. If that means wrap the package management tool... why not?