#16327: new bash script to clean up $SAGE_ROOT/upstream
-------------------------------+------------------------
       Reporter:  ppurka       |        Owner:
           Type:  enhancement  |       Status:  new
       Priority:  major        |    Milestone:  sage-6.3
      Component:  scripts      |   Resolution:
       Keywords:               |    Merged in:
        Authors:               |    Reviewers:
Report Upstream:  N/A          |  Work issues:
         Branch:               |       Commit:
   Dependencies:               |     Stopgaps:
-------------------------------+------------------------

Comment (by ppurka):

 Replying to [comment:1 leif]:
 > One problem is that currently not all packages have proper versions /
 "fullnames", cf. `sage-list-packages`.  I.e., e.g. `ver` may be empty and
 then `pkg_ver="$pkg-$ver"` doesn't work.

 Well, sage-list-packages gives very old versions. I don't see how that is
 reliable.
 {{{
 ~» sage -sh
 ~» sage-list-packages standard
 ...
 sage-5.13 ............................... not installed
 sage_root-5.13 .......................... not installed
 sage_scripts-5.13 ....................... not installed
 sagenb-0.10.7.2 ......................... installed version: 0.10.8.2
 ...
 }}}

 Do you have an example where a package does not have version? I can not
 find any in my list; but I haven't tried the optional or experimental
 packages, of course.
 {{{
 ~/tmp/sage/build/pkgs» for p in *; do
  if [[ ! -f "$p"/package-version.txt ]]; then
   continue
  fi
  if [[ -z "$(<$p/package-version.txt)" ]]; then
   echo "$p has empty version"
  fi
 done
 ~/tmp/sage/build/pkgs»
 }}}

 Finally, the script skips those packages that do not have versions in
 their tarball. In those cases, the `tarball` variable in the inner for
 loop happens to be of the form `.../upstream/package-*`. The script
 therefore checks whether the variable `tarball` is actually a file in
 `upstream/` or not.

--
Ticket URL: <http://trac.sagemath.org/ticket/16327#comment:3>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to