From greg@bx.psu.edu Wed Oct 30 16:13:37 2013
From: Greg Von Kuster <greg@bx.psu.edu>
To: galaxy-dev@lists.galaxyproject.org
Subject: Re: [galaxy-dev] Installing toolshed repositories with
	set_environment dependency
Date: Wed, 30 Oct 2013 16:13:35 -0400
Message-ID: <1CD350AE-43B1-4451-9C31-EC0988E79B9B@bx.psu.edu>
In-Reply-To:
 <CANwbokdc_viO65DJCGJDaOFL_HnmK+N2bZ2TJkKrOaNEUx0Lgg@mail.gmail.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============0382970838419541615=="

--===============0382970838419541615==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

Thanks John,

I just sent my message as yours arrived - this will help me more quickly reso=
lve the issue.  I'll have a fix soon.

Greg Von Kuster

On Oct 30, 2013, at 4:09 PM, John Chilton <chilton(a)msi.umn.edu> wrote:

> I can verify augustus doesn't work correctly any longer, but I do not
> get the same error. The package installs properly but set_environment
> doesn't get handled.
>=20
> As far as I can tell this changeset:
>=20
> https://bitbucket.org/galaxy/galaxy-central/commits/ab9f5cb3acd8dcfe30fc5b9=
2fc4a792c9815c877
>=20
> Would break this functionality:
>=20
>    <set_environment version=3D"1.0">
>        <environment_variable name=3D"R_SCRIPT_PATH"
> action=3D"set_to">$REPOSITORY_INSTALL_DIR</environment_variable>
>    </set_environment>
>=20
> (as documented on wiki and as appears in the augustus wrappers).
>=20
>=20
> In particular these three lines:
>=20
> elif elem.tag =3D=3D 'set_environment':
>  env_var_name =3D env_var_elem.get( 'name', None )
>  if env_var_name:
>=20
> Which have become:
>=20
> elif elem.tag =3D=3D 'set_environment':
>  env_var_name =3D elem.get( 'name', None )
>  if env_var_name:
>=20
> Seem problematic. It looks like the set_environment element doesn't
> have the name, it is the inner environment_variable elements that do.
> This should probably be resolved before the next release.
>=20
> -John
>=20
>=20
>=20
> On Wed, Oct 30, 2013 at 10:10 AM, Bjoern Gruening
> <bjoern.gruening(a)gmail.com> wrote:
>> Hi Greg,
>>=20
>> sorry for the confusion. You answered to Saskia
>>=20
>>>>> This was indeed a bug (not "abut" which was a spell checker spelling
>>>>> error) which has been resolved in 11116:83bed9c7dbbc.  This fix has
>>=20
>> If I search for that number I only find your fix for the repository
>> action view. But I'm searching for the fix for ' Installing toolshed
>> repositories with set_environment dependency'. Saskia posted that she
>> gets that error:
>>=20
>> NameError: global name 'env_var_elem' is not defined
>>=20
>> And I can reproduce it with latest galaxy-central and
>> http://toolshed.g2.bx.psu.edu/view/bgruening/augustus a repository that
>> used to work, so I assume that is a regression.
>>=20
>> Sorry for not being clear enough!
>> Cheers,
>> Bjoern
>>=20
>>=20
>>> Hello Bjoern,
>>>=20
>>> The changeset to which your link refers is the change that allows anyone =
that has write permission on a repository to reset all metadata on that repos=
itory from the "Repository Actions" pop-up menu on the
>>> "View repository" page.  Previous to this change, this feature was restri=
cted to the owner of the repository.  I committed this changeset to the next-=
stble branch and merged it into the central branch, so it is available in bot=
h.
>>>=20
>>> I have just double-cheked using the central branch on my local developmen=
t repository, and this feature is working as expected.  For example, if I hav=
e a repo owned by user test and only test has write permission on that repo, =
the user test1 cannot reset all metadata on the repo.  However, if user test =
grants write permission on the repo to user test1, then user test1 can immedi=
ately reset all metadata on the repo.
>>>=20
>>> Can you let me know what steps you are taking and the behavior you are se=
eing that differs from this?
>>>=20
>>> Thanks!
>>>=20
>>> Greg Von Kuster
>>>=20
>>>=20
>>> On Oct 29, 2013, at 1:03 PM, Bjoern Gruening <bjoern.gruening(a)gmail.com=
> wrote:
>>>=20
>>>> Hi Greg,
>>>>=20
>>>> do you mean that patch?
>>>>=20
>>>> https://bitbucket.org/galaxy/galaxy-central/commits/all?search=3D83bed9c=
7dbbc
>>>>=20
>>>> I can reproduce that error and it is not fixed with latest
>>>> galaxy-central, or did you only applied it to next-stable?
>>>>=20
>>>> You can test with my augustus repository if you like.
>>>> http://toolshed.g2.bx.psu.edu/view/bgruening/augustus
>>>>=20
>>>> Thanks,
>>>> Bjoern
>>>>=20
>>>>=20
>>>>> Hello Saskia,
>>>>>=20
>>>>>=20
>>>>> This was indeed a bug (not "abut" which was a spell checker spelling
>>>>> error) which has been resolved in 11116:83bed9c7dbbc.  This fix has
>>>>> been committed to the next-stable branch and is currently running on
>>>>> both the test and main Galaxy tool sheds.  Thanks for reporting this
>>>>> issue.
>>>>>=20
>>>>>=20
>>>>> Greg Von Kuster
>>>>>=20
>>>>>=20
>>>>>=20
>>>>> On Oct 23, 2013, at 11:34 AM, S.D. Hiltemann
>>>>> <s.hiltemann(a)erasmusmc.nl> wrote:
>>>>>=20
>>>>>> I updated my Galaxies to the latest version today, and when I try to
>>>>>> install a toolshed repository which defines an environment variable
>>>>>> via the <set_environment> tags in the tool_dependencies.xml file, I
>>>>>> get an error (see below).
>>>>>>=20
>>>>>> tool_dependencies.xml:
>>>>>>=20
>>>>>> <?xml version=3D"1.0"?>
>>>>>> <tool_dependency>
>>>>>>   <set_environment version=3D"1.0">
>>>>>>       <environment_variable name=3D"CONDEL_SCRIPT_PATH"
>>>>>> action=3D"set_to">$REPOSITORY_INSTALL_DIR</environment_variable>
>>>>>>   </set_environment>
>>>>>> </tool_dependency>
>>>>>>=20
>>>>>> (before the update these repositories installed without problems)
>>>>>>=20
>>>>>> ..doing the same as an action within a package dependency does still
>>>>>> work, so for now I have just changed the tools I needed to set the
>>>>>> environment this way, e.g.:
>>>>>>=20
>>>>>> <tool_dependency>
>>>>>> <package name=3D"condel" version=3D"1">
>>>>>>       <install version=3D"1.0">
>>>>>>           <actions>
>>>>>>               <action type=3D"set_environment">
>>>>>>                   <environment_variable name=3D"CONDEL_SCRIPT_PATH"
>>>>>> action=3D"set_to">$REPOSITORY_INSTALL_DIR</environment_variable>
>>>>>>               </action>
>>>>>>           </actions>
>>>>>>       </install>
>>>>>>       <readme>
>>>>>>           Set condel environment variable
>>>>>>       </readme>
>>>>>>   </package>
>>>>>> </tool_dependency>
>>>>>>=20
>>>>>> Is this the preferred way of doing it, and should I change all my
>>>>>> tools this way? or should both ways still be working?
>>>>>>=20
>>>>>> Saskia
>>>>>>=20
>>>>>> Error Traceback:
>>>>>> View as:   Interactive  |  Text  |  XML (full)
>>>>>> =E2=87=9D NameError: global name 'env_var_elem' is not defined
>>>>>> URL: http://galaxy.trait-ctmm.cloudlet.sara.nl/admin_toolshed/manage_t=
ool_dependencies?repository_id=3Db847e822bdc195d0&operation=3Dinstall
>>>>>> Module weberror.evalexception.middleware:364 in respond
>>>>>> view
>>>>>>>> app_iter =3D self.application(environ, detect_start_response)
>>>>>>=20
>>>>>> Module paste.recursive:84 in __call__          view
>>>>>>>> return self.application(environ, start_response)
>>>>>>=20
>>>>>> Module paste.httpexceptions:633 in __call__          view
>>>>>>>> return self.application(environ, start_response)
>>>>>>=20
>>>>>> Module galaxy.web.framework.base:132 in __call__          view
>>>>>>>> return self.handle_request( environ, start_response )
>>>>>>=20
>>>>>> Module galaxy.web.framework.base:190 in handle_request          view
>>>>>>>> body =3D method( trans, **kwargs )
>>>>>>=20
>>>>>> Module galaxy.web.framework:229 in decorator          view
>>>>>>>> return func( self, trans, *args, **kwargs )
>>>>>>=20
>>>>>> Module galaxy.webapps.galaxy.controllers.admin_toolshed:757 in manage_=
tool_dependencies          view
>>>>>>>> self.initiate_tool_dependency_installation( trans, tool_dependencies=
_for_installation )
>>>>>>=20
>>>>>> Module galaxy.web.framework:229 in decorator          view
>>>>>>>> return func( self, trans, *args, **kwargs )
>>>>>>=20
>>>>>> Module galaxy.webapps.galaxy.controllers.admin_toolshed:433 in initiat=
e_tool_dependency_installation          view
>>>>>>>> tool_dependencies=3Dtool_dependencies )
>>>>>>=20
>>>>>> Module tool_shed.util.common_install_util:486 in handle_tool_dependenc=
ies          view
>>>>>>>> env_var_name =3D env_var_elem.get( 'name', None )
>>>>>>=20
>>>>>> NameError: global name 'env_var_elem' is not defined
>>>>>>=20
>>>>>>=20
>>>>>>=20
>>>>>>=20
>>>>>> ____________________________________________________________________
>>>>>> From: S.D. Hiltemann
>>>>>> Sent: Friday, August 02, 2013 11:19 AM
>>>>>> To: galaxy-dev(a)lists.bx.psu.edu
>>>>>> Subject: Toolshed repository update error
>>>>>>=20
>>>>>>=20
>>>>>>=20
>>>>>> I am working on putting a tool into the toolshed. I have a bash
>>>>>> script wrapper. I uploaded the first version fine, but when I wanted
>>>>>> to upload a revision, some unwanted characters are inserted around
>>>>>> the revised function of my code (see bottom) ..the inserted "<<<<<<
>>>>>> local" etc strings are causing my script to fail of course. How can
>>>>>> I prevent this from happening?
>>>>>>=20
>>>>>> Saskia
>>>>>>=20
>>>>>>=20
>>>>>> snippet of the code:
>>>>>>=20
>>>>>>=20
>>>>>>   if [[ ! -s $rfile ]]
>>>>>>   then
>>>>>>       dummycol=3D${addcols:2}
>>>>>>       outputcol=3D${dummycol//",B."/"    "}
>>>>>> <<<<<<< local
>>>>>>       echo -e "${col_chr_name}\t${col_start_name}\t
>>>>>> ${col_end_name}\t${col_ref_name}\t${col_obs_name}\t$outputcol" >
>>>>>> $rfile
>>>>>>       cat $rfile
>>>>>> =3D=3D=3D=3D=3D=3D=3D
>>>>>>       numcommas=3D`echo "$addcols" | grep -o "," | wc -l`
>>>>>>       echo "numcolums: $numcommas"
>>>>>>=20
>>>>>>       awk 'BEGIN{FS=3D"\t";OFS=3D"\t"}{
>>>>>>               if(FNR=3D=3D1)
>>>>>>                   print $0,"'"$outputcol"'";
>>>>>>               else{
>>>>>>                   printf $0
>>>>>>                   for(i=3D0;i<=3D"'"$numcommas"'"+1;i++)
>>>>>>                       printf "\t"
>>>>>>                   printf "\n"
>>>>>>               }
>>>>>>           }END{}' $ofile > tempofile
>>>>>>=20
>>>>>>           mv tempofile $ofile
>>>>>>=20
>>>>>>       return
>>>>>>>>>>>>> other
>>>>>>   fi
>>>>>>=20
>>>>>>=20
>>>>>>=20
>>>>>> ___________________________________________________________
>>>>>> Please keep all replies on the list by using "reply all"
>>>>>> in your mail client.  To manage your subscriptions to this
>>>>>> and other Galaxy lists, please use the interface at:
>>>>>> http://lists.bx.psu.edu/
>>>>>>=20
>>>>>> To search Galaxy mailing lists use the unified search at:
>>>>>> http://galaxyproject.org/search/mailinglists/
>>>>>=20
>>>>>=20
>>>>> ___________________________________________________________
>>>>> Please keep all replies on the list by using "reply all"
>>>>> in your mail client.  To manage your subscriptions to this
>>>>> and other Galaxy lists, please use the interface at:
>>>>> http://lists.bx.psu.edu/
>>>>>=20
>>>>> To search Galaxy mailing lists use the unified search at:
>>>>> http://galaxyproject.org/search/mailinglists/
>>>>=20
>>>>=20
>>>>=20
>>>=20
>>=20
>>=20
>>=20
>> ___________________________________________________________
>> Please keep all replies on the list by using "reply all"
>> in your mail client.  To manage your subscriptions to this
>> and other Galaxy lists, please use the interface at:
>>  http://lists.bx.psu.edu/
>>=20
>> To search Galaxy mailing lists use the unified search at:
>>  http://galaxyproject.org/search/mailinglists/
>=20
> ___________________________________________________________
> Please keep all replies on the list by using "reply all"
> in your mail client.  To manage your subscriptions to this
> and other Galaxy lists, please use the interface at:
>  http://lists.bx.psu.edu/
>=20
> To search Galaxy mailing lists use the unified search at:
>  http://galaxyproject.org/search/mailinglists/
>=20



--===============0382970838419541615==--


