Skip to Content.
Sympa Menu

sm-sorcery-bugs - [SM-Sorcery-Bugs] [Bug 13732] New: scribe_add_update_worker classifies git targets as tarballs

sm-sorcery-bugs AT lists.ibiblio.org

Subject: Bugs for Sorcery are reported here

List archive

Chronological Thread  
  • From: bugzilla-daemon AT bugs.sourcemage.org
  • To: sm-sorcery-bugs AT lists.ibiblio.org
  • Subject: [SM-Sorcery-Bugs] [Bug 13732] New: scribe_add_update_worker classifies git targets as tarballs
  • Date: 20 Apr 2007 20:01:03 -0000

http://bugs.sourcemage.org/show_bug.cgi?id=13732

Summary: scribe_add_update_worker classifies git targets as
tarballs
Product: Sorcery
Version: 1.14.x
Platform: Other
OS/Version: other
Status: NEW
Severity: normal
Priority: P3
Component: Scribe
AssignedTo: sm-sorcery-bugs AT lists.ibiblio.org
ReportedBy: jakakranjc AT email.si


While grepping around for #13729, I found this in scribe_add_update_worker:

217 if [ -z "$from" ]; then
218 #from is empty - use the default
219 prefix=$(url_get_prefix $CODEX_URL)

220 if list_find "rsync svn cvs smgl_tla dir" $prefix ; then

221 grim_target=$grim_name
222 else
223 grim_target="$grim_name.tar.bz2"
224 fi
225 from="$CODEX_URL/$grim_target"

$ ls var/lib/sorcery/modules/url_handlers/
url_cvs url_dir url_git url_http url_smgl_tla url_svn_http
url_svn_ssh url_default url_file url_git_http url_rsync url_svn
url_svn_https

git is missing in the that "tree vs tarball" prefix list. Since new $SCM
handlers will be added in the future, I suggest we fix it by inverting the
condition and only checking for "file http". Would that be a safe assumption
(can you make a non-tree repo)?

There is a similar list stored in libsummon too:
386 # hard-coded list of url prefixes that generally download trees
387 local tree_prefixes="cvs dir rsync smgl_tla svn svn_http svn_ssh
git"

Perhaps it would best to make a new function url_get_prefix_type that would
hold or get that list, so its uses can get abstracted (if it is possible to
combine the above two). With "get" I meant that perhaps the url handlers
should
declare their prevailing type themselves, so this code doesn't need to be
revisited every time one is added.

The git dl handler seems to have a lot of problems, so I couldn't test this
satisfactory though - not sure if I reproduced it.

--
Configure bugmail: http://bugs.sourcemage.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



  • [SM-Sorcery-Bugs] [Bug 13732] New: scribe_add_update_worker classifies git targets as tarballs, bugzilla-daemon, 04/20/2007

Archive powered by MHonArc 2.6.24.

Top of Page