#16629: sage-fix-pkg-checksums munches build/pkgs/<packagename>/checksums
-------------------------------------+-------------------------------------
       Reporter:  charpent           |        Owner:
           Type:  defect             |       Status:  needs_review
       Priority:  minor              |    Milestone:  sage-6.3
      Component:  build              |   Resolution:
       Keywords:                     |    Merged in:
        Authors:                     |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/charpent/sage_fix_pkg_checksums_munches_build_pkgs__packagename__checksums| 
 d941afd9150164e979b7df98b2e574cdacd78053
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by charpent):

 Replying to [comment:12 vbraun]:
 > I think I'm not clear, so let me try again. Git **does** track the
 package version, because `package-version.txt` is checked into the
 repository. For any given Sage commit, `build/pkgs/*/package-version.txt`
 is the only relevant set of tarball versions. The upstream/ directory
 content is irrelevant, and only used to cache downloaded tarballs.
 >

 I beg to differ : From the current `sage-fix-pkg-checksum`, (as in the
 `develop` branch) :

 {{{
 #!/usr/bin/env bash

 # If any command-line arguments are present, treat them as files to be
 # checksummed. If no arguments are present, all tarballs in
 # $SAGE_ROOT/upstream are checksummed.
 if [ $# -eq 0 ]; then
     cd "$SAGE_ROOT"
     set upstream/*.tar*
 fi
 }}}

 In other words, the current version is driven by the content of
 `upstream/` if no argument is given. If an (some) argument(s) is|are
 given, it uses the beginning of each argument up to the first dash as a
 package name and whatever follows `tar` in this argument as the
 compression method. Therefore, this will produce the expected behaviour IF
 AND ONLY IF the script is passed tarball filenames.

 It will also produce the expected result if given arguments '''containing
 the package version'''. But not with arguments containing the package name
 only : there is no information available to choose which version is to be
 documented in `build/pkgs/<pkgname>/package-version.txt|checksums.ini`.

 A simple fix is to ignore package version mismatchs (i. e. removing the
 error message an the abort). In this case, the tarball ultimately
 documented in `build/pkgs/<pkgname>/checksums.ini` will be the one passed
 in argument, or the last matching the package name in the `upstream/` file
 list (lexicographic order).

 Another possibility is to use `build/pkgs` ad the corresponding `package-
 version.txt` to get the necessary information, and search `upstream/` for
 a relevant tarball. In this case, one might find one tarball (and process
 it as before), none (one type of error) or more than one (another type of
 error).

 Which one do you want ?

--
Ticket URL: <http://trac.sagemath.org/ticket/16629#comment:15>
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