Skip to Content.
Sympa Menu

sm-discuss - [SM-Discuss] Getting better in quality

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Vlad Glagolev <stealth AT sourcemage.org>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: [SM-Discuss] Getting better in quality
  • Date: Thu, 22 Jul 2010 01:01:38 +0400

Hello, mages!

As some of you may have noticed recently, I commented a few commits with the
phrases about code quality.
I'm interested in your opinion first, but one of my aims is to make SMGL code
better. At least in a part
I help the project with.

Also, I don't want to point at someone directly, but instead I just have a
few advices which would
help us to improve the quality of code and therefore -- a quality of
distribution (in my opinion).

1. When you create a new spell, try to read carefully its official
documentation, INSTALL and README
files inside the tarball to detect required and optional dependencies (on
a stuff like pythonic one
there could be suggest ones). Don't add them for fun and find what is
really required to build.
2. If the program you try to create a spell for already exists in other
distributions, you can look into
their repos and see how it builds. Those are usually Arch Linux, Gentoo,
OpenBSD, NetBSD, FreeBSD
(since ports are built from source), maybe a few others (source-based are
preferred though). But note,
there could be something wrong/untested in them (it might be different,
outdated, etc.), so please check
every "hack" carefully under SMGL installation.
3. Look at files like configure.ac, configure, try ./configure --help to find
out which flags are needed
for the required and optional dependencies and/or simple options.
Sometimes they doesn't work as they
should. That's autotools hell, and you have to go deeper in configure.ac
for example to find out
which libraries/headers does the spell really need and so on.
4. On compilation (or after with ``gaze compile $spell'') look in voyeur mode
(this option must be on in
sorcery) at specific warnings/errors during the configuration phase. Maybe
something went wrong (mostly
because of bugs in configure script) or missing some X headers, and so on.
5. There are complex spells (like ffmpeg, mpd, xine-lib, mplayer, etc.)
containing lots of deps (and subdeps,
and subsubdeps) but for simplicity print the summary after configure like:

--
----------------
* input plugins:
- file - net
- stdin_fifo - rtp
- http - mms
- pnm - rtsp
- dvb
...
--

This might be helpful to detect do the flags you've just added work properly
or not.

6. recheck compilation log and go to installation one with ``gaze install
$spell''. create a diff to an
install log of the previous version of this spell and see if something is
missing and check why (reading
changelog, etc.)

7. Make sure (via ``gaze install $spell'') the spell doesn't execute
update-mime-database on install stage,
when all stuff in /usr/share/mime/* had been touched and would be removed
on dispelling the spell. Look
at ardour2/xine-ui/seahorse spells for the different types of possible
fixes.

8. If you update something that is regularly updated (maintained) by another
developer and don't know what to
do with some extra/new dep -- drop him (or to sm-discuss@) a mail for
information. IRC is also a good option.

I hope these simple steps will help us to make our code better. Feel free to
comment/expand this list.

Thanks in advance.

--
Dont wait to die to find paradise...
--
Cheerz,
Vlad "Stealth" Glagolev

Attachment: pgpAjtwuHFNPh.pgp
Description: PGP signature



  • [SM-Discuss] Getting better in quality, Vlad Glagolev, 07/21/2010

Archive powered by MHonArc 2.6.24.

Top of Page