Bug#655562: scripts/build/lb_binary_syslinux is not defensive enough against misconfiguration

January 12th, 2012 - 06:20 am ET by Martin Quinson | Report spam
Package: live-build
Thanks for the fish

(reposting this bug report because the first one seems to be lost in
ether -- sorry for potential dupplicates)

Falling in a recent bug of live-manual that advise the users to pass
usb-hdd as a build type is particularly unfriendly because the code on
its side is not defensive enough. In scripts/build/lb_binary_syslinux,
you have a case statement which objective is to set the _SUFFIX
variable depending on the kind of image that we are building. But if
the image kind is not recognized by the case, then the only error
message that the user get is: "mkdir: missing operand"

There is two needed fixes here IMHO:
- the configuration must be checked at the beginning of the process (to
ensure that typo such as hhd instead of hdd are detected and reported
in a timely manned)
- the call to mkdir must be protected: mkdir without argument will
always fail on the user, so you don't want to do that. I'm not sure
whether the code should fail if puzzled or if the mkdir should simply
be avoided, but I'm sure you'll know.

Anyway, thanks for this very nice piece of software, and keep up the
good work.

Bye, Mt.

La joie d'apprendre est aussi indispensable aux études que la
respiration aux coureurs. -- Maria Montessori



To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
email Follow the discussionReplies 1 replyReplies Make a reply

Similar topics

Replies

#1 Daniel Baumann
January 12th, 2012 - 06:40 am ET | Report spam
tag 655562 pending
thanks

On 01/12/2012 12:10 PM, Martin Quinson wrote:
- the configuration must be checked at the beginning of the process (to
ensure that typo such as hhd instead of hdd are detected and reported
in a timely manned)



yep, like i said on irc.

also, it should be a warning (with a sleep 5 or so only, not an exit 1,
remember the drop in of custom local formats), patches welcome.

- the call to mkdir must be protected: mkdir without argument will
always fail on the user, so you don't want to do that. I'm not sure
whether the code should fail if puzzled or if the mkdir should simply
be avoided, but I'm sure you'll know.



falling back to hdd seems to be the right thing to do here, done in git.

Anyway, thanks for this very nice piece of software, and keep up the
good work.



thanks :)

Address: Daniel Baumann, Donnerbuehlweg 3, CH-3012 Bern
Email:
Internet: http://people.progress-technologies.net/~daniel.baumann/



To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact
email Follow the discussion Replies Reply to this message
Help Create a new topicReplies Make a reply
Search Make your own search