patch in trac # 4644 not in sage-4.2.1 ???

0 views
Skip to first unread message

Mariah Lenox

unread,
Nov 20, 2009, 3:09:45 PM11/20/09
to sage-...@googlegroups.com
Sage Developers,

trac # 4644 has a patch that I wrote to deal with
several problems with 'sage -sh'. It is listed
as fixed in 4.2.

Yet sage-4.2.1 does not seem to have the patch.

Did I miss a discussion about this issue that caused
my patch to be reverted?

--
Mariah

Minh Nguyen

unread,
Nov 20, 2009, 7:34:37 PM11/20/09
to sage-...@googlegroups.com
Hi Mariah,

On Sat, Nov 21, 2009 at 7:09 AM, Mariah Lenox <mariah...@gmail.com> wrote:
> Sage Developers,
>
> trac # 4644 has a patch that I wrote to deal with
> several problems with 'sage -sh'. It is listed
> as fixed in 4.2.
>
> Yet sage-4.2.1 does not seem to have the patch.

I just confirmed that ticket #4644 [1] was merged in Sage 4.1.2. It
wasn't merged into the Sage standard library repository, but rather
into the Sage scripts repository. In order to see the commit message,
first I cd to SAGE_ROOT/local/bin, executed "hg log | less", and
navigated through the commit history to get this:

{{{
changeset: 1336:3ed042bae0d8
user: Mariah Lenox <mariah...@gmail.com>
date: Tue Sep 29 08:12:26 2009 +0900
summary: [mq]: trac_4644.patch
}}}

This means that your patch was merged in the scripts repository as
changeset 1336.

[1] http://trac.sagemath.org/sage_trac/ticket/4644

--
Regards
Minh Van Nguyen

Mariah

unread,
Nov 23, 2009, 2:56:00 PM11/23/09
to sage-devel
Minh,

The patch may have been merged into sage-4.1.2.
But it is NOT in sage-4.2.1.

Just do (in sage-4.2.1) "./sage -sh".
I expect to see (at the end)

*****
/home/mariah/sage/sage-4.2.1-x86_64-Linux-core2-fc
sage subshell$
*****

Yet what I see is just

*****
Bypassing shell configuration files ...

%
*****

So I must have missed some discussion!

Mariah

On Nov 20, 7:34 pm, Minh Nguyen <nguyenmi...@gmail.com> wrote:
> Hi Mariah,
>
> On Sat, Nov 21, 2009 at 7:09 AM, Mariah Lenox <mariah.le...@gmail.com> wrote:
> > Sage Developers,
>
> > trac # 4644 has a patch that I wrote to deal with
> > several problems with 'sage -sh'.  It is listed
> > as fixed in 4.2.
>
> > Yet sage-4.2.1 does not seem to have the patch.
>
> I just confirmed that ticket #4644 [1] was merged in Sage 4.1.2. It
> wasn't merged into the Sage standard library repository, but rather
> into the Sage scripts repository. In order to see the commit message,
> first I cd to SAGE_ROOT/local/bin, executed "hg log | less", and
> navigated through the commit history to get this:
>
> {{{
> changeset:   1336:3ed042bae0d8
> user:        Mariah Lenox <mariah.le...@gmail.com>

John H Palmieri

unread,
Nov 23, 2009, 3:05:22 PM11/23/09
to sage-devel
On Nov 23, 11:56 am, Mariah <mariah.le...@gmail.com> wrote:
> Minh,
>
> The patch may have been merged into sage-4.1.2.
> But it is NOT in sage-4.2.1.
>
> Just do (in sage-4.2.1) "./sage -sh".
> I expect to see (at the end)
>
> *****
> /home/mariah/sage/sage-4.2.1-x86_64-Linux-core2-fc
> sage subshell$
> *****

This is what I see (with Sage 4.2.1). More importantly, when I look at
the file SAGE_ROOT/local/bin/sage-sage, it has the changes from that
patch.

Maybe you have a copy of Sage lying around (or at least a copy of the
file sage-sage) that's being run instead of the one in SAGE_ROOT/local/
bin, so you're not seeing the new behavior?

--
John

Robert Bradshaw

unread,
Nov 23, 2009, 5:18:41 PM11/23/09
to sage-...@googlegroups.com
Try running

hg -R $SAGE_ROOT/local/bin

If you've been editing stuff in there, then did an -upgrade, there may
well be multiple heads in there that you'll have to merge. (And then
re-merge every time you upgrade, which is a pain...)

- Robert


Georg S. Weber

unread,
Nov 24, 2009, 2:57:50 AM11/24/09
to sage-devel
For what it's worth,
this is from Sage-4.3.alpha0 (when I do ./sage -sh):

<snip>
Starting subshell with Sage environment variables set.
Be sure to exit when you are done and do not do anything
with other copies of Sage!

Bypassing shell configuration files ...

/Users/Shared/sage/build/sage-4.3.alpha0
sage subshell$
</snip>

Cheers,
Georg

Mariah

unread,
Nov 24, 2009, 2:16:40 PM11/24/09
to sage-devel
John, Robert, George,

Is your version of sage an upgrade from a previous version
of sage? Rather than do that, I am building sage from source,
specifically the sage-4.2.1.tar source. And sage from
source does NOT have the patch. Specifically,
sage-sage from source has lines 369-416:

if [ $1 = '-sh' -o $1 = '--sh' ]; then
# AUTHORS:
# Carl Witty and William Stein: initial version
# Craig Citro: add options for not loading profile
cd "$CUR"
shift
echo ""
echo "Starting subshell with Sage environment variables set."
echo "Be sure to exit when you are done and do not do anything"
echo "with other copies of Sage!"
echo ""
SHELL_NAME=`basename $SHELL`
echo "Bypassing shell configuration files ..."
echo
# We must start a new shell with no .profile or .bashrc files
# processed, so that we know our path is correct
PS1="${PWD}\nsage subshell$ "
export PS1
case $SHELL_NAME in
bash)
SHELL_OPTS=" --norc"
;;
csh)
SHELL_OPTS=" -f"
;;
ksh)
SHELL_OPTS=" -p"
;;
sh)
SHELL_OPTS=" --norc"
;;
tcsh)
SHELL_OPTS=" -f"
;;
zsh)
SHELL_OPTS=" -f -d"
;;
*)
echo "Unknown shell: $SHELL!"
echo "Exiting Sage."
exit 1
esac

$SHELL_NAME $SHELL_OPTS "$@"

echo Exited Sage subshell.
exit $?
fi

This does NOT have the patch applied.

Have I found a bug in the sage distribution process?

Mariah

William Stein

unread,
Nov 24, 2009, 2:21:35 PM11/24/09
to sage-devel
Yes it does. The patch is here:

http://trac.sagemath.org/sage_trac/attachment/ticket/4644/trac_4644.patch

I'm reading it, and it is applied. Maybe the patch posted to ticket
4644 is wrong?

-- William

John H Palmieri

unread,
Nov 24, 2009, 2:36:47 PM11/24/09
to sage-devel
On Nov 24, 11:16 am, Mariah <mariah.le...@gmail.com> wrote:
> John, Robert, George,
>
> Is your version of sage an upgrade from a previous version
> of sage?  

No, I looked at the 4.2.1 and 4.3.alpha0 source, in particular the
file SAGE_ROOT/spkg/standard/sage_scripts-4.3.alpha0.spkg: apply "tar
jxf" to this and look at sage-sage there.

> Rather than do that, I am building sage from source,
> specifically the sage-4.2.1.tar source.  And sage from
> source does NOT have the patch.  Specifically,
> sage-sage from source has lines 369-416:

[snip]

> This does NOT have the patch applied.

As William says, it does have the patch applied, at least that's what
it looks like to me when I read the patch attached to the ticket.
What do you think those lines should say instead?

--
John

Mariah

unread,
Nov 24, 2009, 2:41:50 PM11/24/09
to sage-devel
William,

> Yes it does.   The patch is here:
>
>    http://trac.sagemath.org/sage_trac/attachment/ticket/4644/trac_4644.p...
>
> I'm reading it, and it is applied.  Maybe the patch posted to ticket
> 4644 is wrong?

You are correct, the patch is applied ... but it is not working for
me, but
working for everyone else!

I am seriously confused. Apologies for being so dense.

I will investigate.

Mariah
Reply all
Reply to author
Forward
0 new messages