#10176: ImportError: No module named sagenb on openSUSE
------------------------------+---------------------------------------------
Reporter: mpatel | Owner: jason, was
Type: defect | Status: needs_review
Priority: blocker | Milestone: sage-4.6
Component: notebook | Keywords:
Author: Leif Leonhardy | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
------------------------------+---------------------------------------------
Comment(by leif):
Mitesh, I think we can remove the (non-portable / non-POSIX) {{{-n}}} from
{{{
#!sh
ln -snf sagenb-main sagenb
}}}
if we first delete {{{sagenb}}} (with {{{rm -f}}}). (This was introduced
at #10097, by
[http://trac.sagemath.org/sage_trac/attachment/ticket/10097/trac_10097-sagenb_relocatability.patch
this patch].)
In fact, the {{{rm -f sagenb}}} had been there, before I changed the
{{{cp}}} to {{{mv}}}, so the {{{-n}}} was IMHO previously superfluous. (I
actually assumed you meant {{{rm -rf}}}, deleting also the '''contents of
the directory''' pointed to ({{{sagenb-main}}}) and copied to {{{sagenb-
main-old}}} right before, rather than the link itself, to avoid having old
files in the directory to which the new files are copied. Right?)
So I'd suggest "uncommenting" the original {{{rm -f sagenb}}}, and
omitting the {{{-n}}} when effectively ''[re]creating'' (as opposed to
''overwriting'') the {{{sagenb}}} symbolic link. (We then don't need the
{{{-f}}} either.):
{{{
#!sh
...
mkdir -p "$SAGE_ROOT/devel"
echo "Copying SageNB package to '$SAGE_ROOT/devel/sagenb-main'."
if [ -d "$SAGE_ROOT/devel/sagenb-main" ]; then
echo "Moving old SageNB package to '$SAGE_ROOT/devel/sagenb-main-
old'."
rm -rf "$SAGE_ROOT/devel/sagenb-main-old"
mv "$SAGE_ROOT/devel/sagenb-main" "$SAGE_ROOT/devel/sagenb-main-old"
fi
rm -f "$SAGE_ROOT/devel/sagenb" # Delete just the link itself (if it
exists)
cd ..
cp -pr sagenb "$SAGE_ROOT/devel/sagenb-main"
cd "$SAGE_ROOT/devel"
ln -s sagenb-main sagenb
...
}}}
Opinions? Or do I miss something?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10176#comment:20>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.