guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Creating guild bundles [bug/feature request]


From: Ian Price
Subject: Creating guild bundles [bug/feature request]
Date: Sun, 04 Sep 2011 13:24:48 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Hi,
Testing out sigil last night with one of my existing projects, I came
across a snag when trying to create a bundle.
If it is not under version control, everything works normally.

$ ls
pkg−list.scm
queues.sls
README
tests.scm
$ guild create-bundle
Creating pfds_0.zip
$ unzip -l pfds_0.zip 
Archive:  pfds_0.zip
  Length      Date    Time    Name
−−−−−−−−−  −−−−−−−−−− −−−−−   −−−−
     2221  09−04−2011 12:41   pfds_0/tests.scm
       57  09−04−2011 12:41   pfds_0/README
      380  09−04−2011 12:41   pfds_0/pkg−list.scm
     2910  09−04−2011 12:41   pfds_0/queues.sls
−−−−−−−−−                     −−−−−−−
     5568                     4 files

So far, so good, but a simple 'git init' later.

$ git init
Initialized empty Git repository in /tmp/pfds/.git/
$ guild create-bundle
Creating pfds_0.zip

zip error: Nothing to do! (/tmp/pfds/pfds_0.zip)
Backtrace:
In module/ice−9/boot−9.scm:
 170: 9 [catch #t #<catch−closure 9b30410> ...]
In unknown file:
   ?: 8 [catch−closure]
In module/ice−9/boot−9.scm:
  62: 7 [call−with−prompt prompt0 ...]
In module/ice−9/eval.scm:
 389: 6 [eval # #]
In /usr/local/bin/guile−tools:
  68: 5 [main ("/usr/local/bin/guild" "create−bundle")]
In scripts/create−bundle.scm:
  57: 4 [main]
In unknown file:
   ?: 3 [with−fluids⋆ (#<fluid 24>) (#) ...]
   ?: 2 [loop−procedure (#) (#) ()]
   ?: 1 [run−zip # #]
In sigil/spells/filesys.scm:
 211: 0 [with−working−directory # #<procedure a1deac8 ()>]

sigil/spells/filesys.scm:211:2: In procedure with−working−directory:
sigil/spells/filesys.scm:211:2: ERROR: R6RS exception:
  1. &fatal−error
  2. &message: "`/usr/bin/zip' returned with unexpected status 12"

clearly not what we're after. Adding a file reveals the problem

$ git add queues.sls 
$ guild create-bundle
Creating pfds_0.zip
$ unzip -l pfds_0.zip 
Archive:  pfds_0.zip
  Length      Date    Time    Name
−−−−−−−−−  −−−−−−−−−− −−−−−   −−−−
     2910  09−04−2011 12:41   pfds_0/queues.sls
−−−−−−−−−                     −−−−−−−
     2910                     1 file
$ git ls-files
queues.sls

The problem is that sigil (well, list-files in (sigil actions)) is being
clever, and punts to the underlying vcs if there is one, which can lead
to ill-formed bundles if not all files are under revision control (in my
particular case, it was pkg-list.scm that was not (yet) added :). Rather
than using heuristics, I think it would be better to use pkg-list.scm
itself to decide what to bundle, but I don't think this is a priority,
as long as people know there are edge cases :).

-- 
Ian Price

"Programming is like pinball. The reward for doing it well is
the opportunity to do it again" - from "The Wizardy Compiled"




reply via email to

[Prev in Thread] Current Thread [Next in Thread]