Search Results: "codehelp"

2 October 2007

Neil Williams: 2038 overflows

Adrian (also sent by email):
Re: 2038 issues on mobile platforms.

It is possible to handle 64bit time on 32bit systems. I got disillusioned with the libglib2.0-0 support (GDate) and I already had a library capable of 64bit mathematics (libqof1) so I wrote QofDate and QofTime that can handle true 64bit date and time calculations, formatting and scanning on 32bit or 64bit installations. I estimate that this gives us enough capacity to handle time for a couple of dozen times the age of the universe to nanosecond precision. The maths can also go backwards as far as it can go forwards so it could handle the date of the Big Bang with nanosecond precision too - if anybody actually works that out.
:-)
I'll be using this library in Emdebian to provide support for 64bit maths for gpe-expenses and the pre-alpha gpe-cash (stripped out gnucash for embedded devices) so at least your financial records will be safe.
http://cashutil.sourceforge.net/gpecash.php
http://gpe-expenses.sourceforge.net/

"QofTime is a lot like the unix 'struct timespec' except that it uses a
64-bit signed int to store the seconds. This should adequately cover
dates in the distant future as well as the distant past, as long as
these are not more than a couple of dozen times the age of the
universe. Values of this type can range from -9,223,372,036,854,775,808
to 9,223,372,036,854,775,807."


http://qof.sourceforge.net/doxy/group__QOFTIME.html#gb93e930907d0e2eba07b1fa7496e7822

http://qof.sourceforge.net/doxy/group__QOFTIME.html

QofTime is defined as 64bit on all systems and will not overflow until
the year 292,471,208,679 (not counting leap years). i.e. approx.
9223372036854775808 / (60*60*24*365). This also means that some values
of QofTime cannot be converted to a time_t on systems where time_t is
defined as 32bit.

http://qof.sourceforge.net/doxy/group__Date.html

A QofDate is theoretically able to go forward to the year
292,471,206,707 AD and back to the year 292,471,206,708 BC. Whether
such dates actually exist is outside the scope of this documentation.

http://packages.debian.org/sid/libqof-doc
http://packages.debian.org/sid/libqof1

Adrian von Bidder: 64bit Mobile Platforms

So we finally need 64 bit CPUs in all our gadgets! (After having seen OpenXchange's SyncML code fail horribly on dates that are beyond 2038, which is something you quickly arrive at if people enter birthdays as repeating appointments until infinity.) Update: Neil Williams has some related information.

28 September 2007

Neil Williams: Associating events with contacts

This is more of a reminder to myself to investigate this within GPE. The basic problem is that many events recorded in applications like gpe-calendar have a direct relationship with a specific person in the contact database and can also be linked to records in the expenses database. Expenses are relatively easy if the time of the expense occurring can be related to the duration of the event but a formal link may be more useful for extra granularity.
Relating an event to a person would typically involve the event being a work placement, a project name, a customer name or the name of an organisation. It could link an event to the organiser of the event or provide a quick lookup for the location of the event to eliminate entry duplication. (Why have the address of the event in the event record if the address is already in the contacts database? Equally, why have the dates of an event in the contact record for the organiser of the event when the same organiser may well be putting on a similar event again in the future?)
I'm thinking that gpe-calendar and equivalent applications could have a field within the event record for an ID in the contact database and a preference setting for the "category" of contacts to be shown in that field, e.g. Business or Conferences. Entry of the association would simply be a drop-down box of contacts that have the appropriate category set. A similar associative field can be implemented in expenses.
This all makes creating an invoice much more reliable. The current pilot-qof method depends on the user specifying the name of the contact as the description of the event and the "vendor" or "city" of the expense.
I'm sure there are other uses for associating events with contacts and/or expenses.
No time to investigate this just yet but it is another essential step in migrating PIM into a business-friendly format, SBIM (for want of a better name).
Small business support is lacking in current free software programs, IMHO. The applications that do exist do not work together to ease the administration burden of a small business the way that the system tools work together to ease the sysadmin burden. Understandable, yes, but small businesses need this kind of support to migrate to free software. "Joined-up thinking" is the buzzword but it's basically eliminating duplication in data entry/retrieval, associating business data across disparate data sources and enabling queries and data mining to support tax calculations, business plans, time management, project management, customer data handling ... the usual small office/home office workload.
I'm inevitably concentrating on data integration in an embedded devices like iPAQs, smart phones or blueberry-type handhelds but similar requirements need to be met within the rest of the free software world too. Once I've got time to investigate this, expect some threads on debian-devel looking at how Lenny could be made more business-friendly; not seeking an "Enterprise" version but simply making it easier to administer a small business using Debian.

19 September 2007

Neil Williams: gpe-cash developments

If anyone was wondering why I've been quiet / claiming to be busy for the last week or so:
gpe-cash finally has a stable "main window" that supports creating new accounts along with the transactions and splits necessary to support an opening balance in the gnucash objects.
Current SVN requires current QOF CVS, accessible via the respective SourceForge repositories. gpe-cash is nowhere near release right now - the actual balances don't show up for one thing and I still need to write the window that will allow the creation of transactions within the accounts - but one step at a time. I'll see about some screenshots eventually but the gpe-cash main window is quite similar to that of gpe-expenses.
The main side-effect of all this is a much improved SQLite backend for QOF that is closer to being able to properly support double-entry financial data.
Note this does not mean that GnuCash itself will be able to use the QOF SQLite backend - the GnuCash currency/commodity handling is incompatible with QOF so gpe-cash uses the currency handling from gpe-expenses which in turn came from pilot-qof and the range of currencies supported by the Palm Expenses applet. The currencies are directly equivalent to the respective GnuCash currencies but not all GnuCash currencies are supported by pilot-qof, gpe-expenses or gpe-cash. The biggest change in gpe-cash is that this conversion is now working so that the gnucash code sees a gnucash currency when actually it is handling a pilot-qof currency.
gpe-cash is GPL-3+ and single-user (== single-file or single-book) as well as single-currency. Adding multi-currency support is possible but not a priority.
Once gpe-cash is closer to release, the codebase will be able to support gpe-invoice using the GnuCash business objects which will interface with gpe-cash to create invoices from other GPE data and store the payments and charges in gpe-cash.
If multi-currency support can be achieved, it would be possible to create "gpe-shares" as a different add-on to gpe-cash, although that is only theoretical at this stage.
The SQL-type query support inherent in QOF, together with perl support for the XML backend data via libxml-qofqsf-perl and XSL support for same XML backend via datafreedom-qsfxsl should make report generation trivial. I may also be able to add QOF support to the still experimental quicklist. I also plan to include support for import/export from all the datafreedom packages with HomeBank data which is returning to a NEW queue near you quite soon . . .
Overall, I'm getting closer to having a full range of individual applications that achieve a long term goal - the breakup of GnuCash source code into small, individual tools in the Unix tradition, all built on SQL-type queries, multiple backends and generic data handling. (See data-freedom.) Down with bloat!
:-)
<rant>
It's about time users had free financial data as well as merely free financial software. The lack of data interchange between existing free software "financial solutions" is a scandal, IMNSHO.
The rest of the "Office" dataset have a range of file formats and a range of filters. Financial data relies on the horribly broken QIF file that was never designed to be a standard and OFX where support is horribly patchy and doesn't provide data interchange between programs on the same machine.
</rant>

13 September 2007

Neil Williams: apt-cross moves to Cache::Apt:: and GPL-3 or later

Just completed the migration of the next version of apt-cross that is due to be uploaded once dpkg-cross pre2 can be uploaded to experimental. (This in turn is waiting for dpkg to support removal of the dpkg-cross diversions: #439979.)
AptCross:: has gone, replaced by Cache::Apt:: and the Cache.pm from NorthernCross is now called Lookup.pm for clarity.
This update solves a lot of niggles with the old apt-cross behaviour when dealing with non-standard repositories, CDROM archives, proxied mirrors and various other stuff that apt can cope with but which wget found difficult. (#440929, #442012)
Also, the entire package has migrated to GPL v3 or later - all the code was GPL v2 or later.
This means that emdebian-tools will also be migrating to GPL v3 or later when that is updated to use the new apt-cross and dpkg-cross code.
Sometime after Lenny, Cache::Apt:: will migrate into a source package of its own (on CPAN), allowing the apt-cross functionality to be merged into apt and the module to support other tasks in Emdebian.
In other news, gpe-cash is coming along and highlighting a few issues in libqof1, libqof-backend-sqlite and libqofexpensesobjects so there are improvements due there too. gpe-cash and gpe-expenses are also GPL v3 or later, as are deb-gview, quicklist (experimental) and pilot-qof now too.
Most have some machine-operable fields in debian/copyright and most have the new dpkg fields in debian/control.
Got a fix for gpe-bluetooth to upload tonight as well as (hopefully) the last go at getting homebank through NEW.

10 September 2007

Neil Williams: Homebank vs gnucash - round 1

Homebank has had a few problems getting through NEW due to legacy problems from the original Amiga version (and it isn't ready yet) but I've been trying it out anyway and comparing to gnucash. Bearing in mind that I have done upstream work in gnucash (i.e. I like gnucash enough to tackle the massively scary gnucash source code) and have (almost) got used to the regular dependency hell that it imposes on my sid installation, I'm finding homebank quite friendly.
(See #441110, #441103, #441129 and #441363 for recent examples of gnucash causing dependency hell - again.)
(1:0 to Homebank).
Homebank is closer to the Quicken model with categories but internal transfers between accounts are supported to give some impression of double-entry. (1:1) My main interest is in data import/export because I've long been looking for a way to create invoices from PIM data e.g. in a Palm Pilot or similar. Homebank supports a CSV data import for data that can be handled as an invoice. OK, there's no fancy invoice printing but that doesn't bother me (I never used the gnucash invoice print support) (2:1 to Homebank) - my invoices are all electronic and I have to use the client system (MSDOS!). What I need is to create my own records of the invoices within my financial accounts and Homebank may be able to do that with far greater ease than gnucash. My data exists primarily in my Palm because I take and change my bookings on-the-move. I want to be able to HotSync my Palm through a query interface (pilot-qof) and XSL (datafreedom-qsfxsl) direct into a financial application that can correlate that data with the payments made into my bank by the client and thence with data from my bank statements to prepare data suitable for my tax report.
I'm thinking that if I can get half of the ease-of-use of Homebank into the rigorous double-entry support of gnucash in a small program (gpe-cash), I'll be doing very well.
One limitation of Homebank is the "wording" - the translations appear awkward and unfamiliar but that can be easily fixed. The link between "Archives" and "automated transactions" isn't clear - I think it means "templates" and "scheduled transactions". (2:2)
Homebank can't do all the things that gnucash can do but that is a weakness in gnucash, not homebank. (3:2 to Homebank) IMNSHO, GnuCash tries to do too much and that leads to an oversized and overly complex codebase as well as a dependency list that puts OOo to shame. The graph support in homebank is a lot better than gnucash and that is not the fault of libgoffice, it is entirely down to the choices made by gnucash upstream developers. Homebank graphs are fast, simple, intuitive and informative, displaying useful info at the first attempt instead of having to wade through the Options dialogue in gnucash. (4:2 to Homebank).
If I can work out some simple scripting that combines these external tools into 'HomeOffice' support in Homebank, everyone wins.
I've never liked CSV as a data format and the homebank main files are XML (like gnucash). Unlike gnucash, the XML appears sane and usable for XSLT - raising the prospect of creating reports directly from the homebank data files.
Homebank upstream have been very supportive of the various requests to assist getting Homebank through NEW so I'm hopeful that if an XML import/export method was proposed it could be included in future - especially if the donkey work is done by external tools.
This would tie in well with datafreedom-qsfxsl and datafreedom-perl. Initially, I'll look at XML->CSV - ugly, I know but at least Homebank can import data to be used as invoices; gnucash cannot. (5:2 to Homebank).

At the end of round one:
Homebank : 5 GnuCash: 2.

9 September 2007

Neil Williams: GPE updates

OK, gpe-bluetooth updated and migrated to unstable from experimental.
gpe-calendar updated (after getting it into testing finally) so libsoundgen can actually have a useful role.
gpe-shield updated in experimental.
Also begun discussions with GPE upstream about avoiding common names for library names (along the lines of existing policy on application names) and arranged to send all my .desktop file patches upstream too. That should make future updates easier.
gpe-expenses has also been updated in Debian to fix a problem building against the new library. gpe-expenses is already GPL-3+ and now deb-gview and pilot-qof have also migrated and the second pre-release of quicklist in experimental is also GPL-3+.

8 September 2007

Neil Williams: g-wrap breaks gnucash in unstable

Just trying to get some data "out-there" on this issue because I'm seeing duplicate bugs being filed and I can't get any response from GnuCash Bugzilla - probably because bug-buddy is busy filing lots more duplicate bugs upstream about a problem that is entirely within Debian.
The latest upgrade of g-wrap is borked and this leads to the g-wrap binary being installed at version 1.9.9-1 when the rest of the g-wrap package is held back due to the transition from libgwrap-runtime0 to libgwrap-runtime2.
This broken transition breaks gnucash. A simple error message if only g-wrap is upgraded, a complete seg fault crash if guile-g-wrap is upgraded too.
So far, we have 3 bugs in Debian:

Please don't add any more. The real bug is 441103 in the g-wrap package and the fix is described in my response to 441248 as:

GnuCash is usable if you can revert to the version of g-wrap in
testing. I'm running it now with:
$ cat /etc/apt/preferences
Package: g-wrap
Pin: version 1.9.6-3.2
Pin-Priority: 1001

Package: guile-g-wrap
Pin: version 1.9.6-3.2
Pin-Priority: 1001

i.e. there isn't anything wrong with gnucash and if g-wrap had
transitioned properly, the g-wrap binary would not have been upgraded
to 1.9.9 on your system until gnucash could use libgwrap-runtime2
instead of libgwrap-runtime0. With the correct dependencies set in
g-wrap, this whole gnucash problem would have been avoided cleanly.


There is a separate RC bug against gnucash because of this transition: gnucash: FTBFS due to g-wrap transition. which does NOT affect the currently installable and usable version of gnucash in sid.

Thanks.

4 September 2007

Neil Williams: time for quicklist development again

I've found some time for quicklist, finally, to move the port on to a second pre-release. New additions include a Recent Files submenu and GtkHTML report engine but the Sort and Filter options are not complete and adding a new report is problematic.
quicklist is now ready for some translations (the first one identified a problem in pre1 that prevented certain strings from showing up as translated). Also added a prototype manual using docbook that I've made available as HTML for dwww and making the docbook file itself available to yelp.
Currently, I'm undecided just where QuickList will fit between pure-Gtk2 and pure-Gnome2. pre2 uses libgnomeprint and libgnomevfs but yelp would bring in the main gnome libraries so yelp is just a Recommends and only as an alternative to dwww:

Recommends: www-browser, dwww yelp

I hope to find some time to fix the remaining bugs but if anyone fancies helping out, see http://quicklist.sourceforge.net/ and take a look at the current CVS prior to the pre2 upload. CVS provides a method to build the updated code docs for developers (rather than the Manual which is aimed at users) using doxygen - the version on the website is out of date. This includes a list of bugs and ToDo items - most of which are centred on removing the last vestiges of the original QuickList code and refactoring to make full use of libglib2.0-0 functions like GList and GHashTable instead of fixed length multi-dimensional arrays.

22 August 2007

Neil Williams: Moving away from gedit to geany

gedit can be a real pain sometimes - mainly through what it still lacks: code folding, bookmarks and the ability to run two instances of gedit side by side (each with their own tabs) without having to start the second in a different workspace and then move it. Of these, code folding and bookmarks and the biggest problems with how I wanted to use gedit - for Perl source code.
Anjuta is overkill for perl (and doesn't support perl particularly well) and bluefish perl syntax highlighting is plain broken - it gets the syntax wrong frequently (especially when using copy and paste and then requires you to edit the line at which the syntax failed before it will move on and fail a few lines later. Bah!
So I've turned to geany - never used it before but it's great for Perl. It identifies all the objects in a Perl script or module and allows me to click on any object to go to that part of the file. It has code folding (and it works). It has bookmarks (although it would be nice to be able to click on a button to go from one mark to the next). It handles "projects" quite well too. It also makes no complaints about running in a second instance. This is really helpful because I can have apt-cross in one instance of geany - with all the relevant files in tabs - and dpkg-cross in another, with its files.
There's a 'scribble' area in geany too which is neat - no need to have an "untitled document" tab that takes up more space on the tab bar than it deserves AND nags you when you eventually close gedit.
I'll still use gedit for some things but I guess it's about time that I moved away from a simple but powerful text editor and used a proper IDE that can cope with Perl. For me, that is geany.

Neil Williams: dpkg-cross 1.99+2.0.0pre1 in NEW

(I had to omit some of the smaller changes - it should all be in the ChangeLog but ask if you spot something major that I haven't mentioned here.)

IMPORTANT! dpkg-cross_1.99+2.0.0pre1 will BREAK things!
(hence it is going into experimental)

  1. BREAKAGES!
    The changes in dpkg-cross are so extensive that apt-cross and emdebian-tools are broken. Current SVN for emdebian-tools builds 0.3.9 which works with pre1. There is a branch of apt-cross (apt-nc-cross) that builds 0.2.9 which works with dpkg-cross pre1. HOWEVER apt-cross 0.2.9 has VERY limited functionality (even --get is incomplete) so dpkg-cross pre1 should only be installed in a chroot or on a system that does not need apt-cross or emdebian-tools. There's little point adding a NEWS.Debian comment on this because it would be too late but Conflicts: are in place:
    Conflicts: apt-cross ( 0.2.9), emdebian-tools ( 0.3.9)
    (The watchful will note that the previous Conflict on pkg-config has been dropped because the conflicting version is no longer in stable or oldstable.)
    The dpkg-cross pre-releases will all go into experimental and no upload will be made to unstable until apt-cross 0.2.9 is available as a package in Emdebian and is also ready to go into Debian as v0.3.0. emdebian-tools needs less changes, some of which can be done AFTER dpkg-cross 2.0.0 reaches unstable.
    I anticipate at least three pre-releases, maybe more.

  2. REMOVED PERL FILE:
    /usr/share/perl5/dpkg-cross.pl
    Replaced by:
    use Debian::DpkgCross;
    There are some functions not universally exported but which can be brought in manually:
    gccross : use Debian::DpkgCross qw(simplify_path);
    dpkg-shlibdeps : use Debian::DpkgCross qw(dpkgcross_application);
    dpkg-buildpackage : use Debian::DpkgCross qw(setup_cross_env);
    The universally exported functions are:
    read_config setup get_architecture create_tmpdir convert_path get_keepdeps get_removedeps get_config get_version detect_arch convert_ld_library_path get_tool rewrite_pkg_name dump_debug_data check_arch

  3. Perl changes:
    use strict;
    use warnings;

    All scripts and the new module are now fully strict and -w compliant. Some perl modules have also been added to the dependency list.

  4. MAKEFLAGS are no longer exported!
    This is a big change and could affect a lot of packages but the honest
    reason is this:
    We should not be exporting MAKEFLAGS ourselves. (in the context of debian-embedded) Packages that were buggy with MAKEFILES are now non-buggy and packages that relied on MAKEFLAGS are now buggy.
    CDBS packages have a single line fix in debian/rules:
    DEB_CONFIGURE_SCRIPT_ENV =
    I'll be filing a bug in due course.
    This allows packages like libx11-6 to build internal tools using CC_FOR_BUILD (set to gcc) and run them to make certain generated source files during the cross-build. I expect it to also work for fontconfig. This method is far preferable to either creating patches for the generated content or trying to replicate the generation process in an interpreted language.

  5. New function:
    &read_config();
    &setup();


    $config = &get_config;
    get_config is new because the configuration is now an internal variable within the module and is not in scope for the scripts. It is a hash table:
    $config 'crossbase' = $crossbase;
    $config 'crossprefix' = $crossprefix;
    $config 'crossdir' = $crossdir;
    $config 'crossbin' = $crossbin;
    $config 'crosslib' = $crosslib;
    $config 'crosslib64' = $crosslib64;
    $config 'crossinc' = $crossinc;
    $config 'crossroot' = $crossroot;

    The values from the two config files:
    $conffile = "/etc/dpkg-cross/cross-compile";
    my $home = File::HomeDir->my_home;
    $private_conffile = "$ home /.dpkg-cross/cross-compile";

    are read in using Config::Auto which removes all the syntax problems of the previous bespoke parser. Comments are ignored as before.
    Everything you specify in either of the config files is now available within the module but only "recognised" options are exported. Config file values are merged - data from /etc/ is read first and data from /home/ is overlaid so that any data not in /home/ comes from /etc/ and any data from /etc/ is overwritten if it also exists in /home/
    @removedeps and @keepdeps need to be sorted out still.

  6. REMOVED CONFFILES:
    /etc/dpkg-cross/cross-config.common obsolete
    /etc/dpkg-cross/cross-config.gnu obsolete
    /etc/dpkg-cross/cross-config.linux obsolete
    /etc/dpkg-cross/cross-config.w32 obsolete
    /etc/dpkg-cross/crosstools obsolete

  7. TESTING
    Ah, yes, testing. So far, only two packages have been tested. I plan to test more tomorrow. Please check for regressions and other brokenness and report via the BTS. (I may forget if it's only done via the debian-embedded list.) Please tag all pre1 issues 'experimental'. Ta.

  8. Speaking of bugs - 6 closed so far, a few more possible. I would like
    to close all but one of the current dpkg-cross bugs. (I'm not sure how
    to fix #285569 )

  9. Debian::DpkgCross.3 manpage - new but horribly incomplete.

  10. %pkgvars - currently disabled. I will merge scope: into the existing %config which then leaves no place for %pkgvars or crosstools but this is pending for pre2.

  11. debug output.
    You now get two debug files in /tmp/:
    gccross2.log : Details the environment, %config and check process of the last call (the last failed call if the build breaks).
    dpkg-cross2.log : Actually misnamed, this is a dpkg-buildpackage log file that contains %config, PATH changes, $ENV changes and the contents of the gccross temporary directory for the last build, including variables set and modified via the module. I'll change the name in pre2.
    The debug output is meant for debian-embedded, not other users. To this end, I'm experimenting with debian/buscript which could go into /usr/share/bugs/ to prompt users reporting bugs for the content of these logs and other configuration details, exactly as with apt. If this works, I'll ditch the idea of turning --debug off and leave it enabled for all builds.
    debian/bugscript is not enabled in pre1. There again, because the module is a new package, pre1 will spend some time in the NEW queue. All changes for pre1 are now in CVS so it should be easy for everyone to build their own packages until pre1 clears NEW and enters experimental. Just be careful where you install dpkg-cross_1.99+2.0.0pre1_all.deb !!!
    (And remember: install libdebian-dpkgcross-perl_1.99+2.0.0pre1_all.deb)

16 August 2007

Neil Williams: dpkg-cross/apt-cross changes

Making progress here - courtesy of apt-rdepends and Simon Law. The Depends handling in libapt-pkg-perl is fraught with difficulty. Self-referencing arrays mean that I can't use my normal use Data::Dumper; print Dumper($foo); because Dumper quickly descends into an infinite loop and if you don't catch it fast, you lose X.
Hopefully, using a simpler interface will help develop other scripts to use the apt cache directly.

Neil Williams: gpe-expenses moves to GPLv3

I actually should have done this at the last release as that already includes some files licenced under GPLv3 but now I'm ready to make an upstream release (including an updated German translation that missed the original string deadline). The only real change is that debian/copyright has grown to the extent that each package is 10kb larger than before!
One day, when GPL3 goes into /usr/share/common-licences, I'll get back to the small packages. Still, Emdebian won't need the extra bloat so it's only a Debian issue.

8 August 2007

Neil Williams: Requesting adoption of glipper

RFA: glipper -- A clipboard manager for GNOME #436550.

Glipper is currently my package in Debian at 0.95.1-3 and that version
is written in C and uses a binary data file which has raised one bug
(#436078 - wishlist severity). It currently has no other bugs.

There is now a
new release
that closes this bug, my problem is that
v1.0 is a ground-up rewrite in Python! Essentially, glipper v1.0 is a
completely different package internally. (Previous translations have
also been lost.)

I have no python experience, no python packages and no ability to do
anything if (when) python code goes wrong. I don't want to have to
learn python just for glipper (don't have time).

So - I don't see what I can do except request adoption of glipper, it
just seems so weird to leave a package which is active while I am also
active.

Anyone fancy taking on glipper?

I don't think there's any point retaining the old C package - that code
is already dead upstream.

Currently, there is no RCS for the debian packaging for glipper - I was
using CDBS and the current watch file needs editing to look for a
tar.bz2 instead of the previous tar.gz.

There are two issues with migrating from 0.95.1 to 1.0:
  1. the ~/.glipper directory needs to be removed.

  2. Glipper v1.0 is also now GNOME only, support for other window managers
    has not been implemented in the python version.


7 August 2007

Neil Williams: translation support script

Just a little script that I've found useful when working out which packages contain translations needing an update - WITHOUT regenerating the POT file unnecessarily and thereby messing up CVS/SVN/RCS status of the PO files themselves. (You still need to regenerate the POT file when the strings actually change but this script is useful when receiving updated PO files.) The script checks each PO file and omits those that are up to date.

Add your own set of working directories.


#!/usr/bin/perl -w
use strict;

print "emdebian-tools\n";
chdir "/opt/working/emdebian/svn/current/host/trunk/emdebian-tools/trunk/debian/";
&check
print "deb-gview\n";
chdir "/opt/working/deb-gview/";
&check
print "pilot-qof\n";
chdir "/opt/working/pilot-qof/";
&check

sub check

opendir (PO, "po") or die ("Cannot open po directory. $!\n");
my @files = grep(/\.po$/, readdir PO);
closedir (PO);
foreach my $po (@files)

my $msg= msgfmt -c --statistics po/$po 2>&1 grep "[fuzy]" ;
print "$po: $msg" if ($msg ne "");
undef($msg);

unlink ("messages.mo");


1 August 2007

Neil Williams: epiphany-browser extensions

Baby mentions using epiphany-browser as the default Gnome browser.
I did this a few weeks ago (when I had problems with Galeon). The most important thing to do with epiphany is:
$ sudo apt-get install epiphany-extensions

That gives epiphany a whole new lease of life. Galeon bookmarks can be imported and there are wonderful things called Smart Bookmarks. Like Galeon, these can be put on the toolbar with input boxes so that an entry in the input is substituted into the URL of the bookmark. Firefox/iceweasel has these for searching but epiphany allows a much more useful customisation. I use them to create several very useful smart bookmarks:

That makes it easy to look up particular packages and buildd status - just enter the package name or bug number in an input box on the toolbar! Lovely. You can add as many as you can fit into your window.
Well worth installing - and customising. Thanks epiphany.

31 July 2007

Neil Williams: pilot-qof and gpe-expenses new releases

Minor bug fix and translation update release for pilot-qof and what was originally going to be a similar upload for gpe-expenses - until I decided that the PO files should really be split because apps using the expenses object library didn't need translated strings from the gpe-expenses application.
So what I learnt on gpe-cash has been put into place for gpe-expenses. A few consequences:

Neil Williams: More on multiple po directories

Further to problems with
gettext and split po files, glib_gettextize turns out not to be usable with more than one po/ directory. I've just converted gpe-expenses to multiple POT files (for the same reasons as gpe-cash) and I'm due to make the upstream release and upload later. glib_gettextize needs to be replaced by gettextize but this is not problem free. gettextize is noisy and keeps tampering with my build, putting in things like config.rpath and forcing -I m4 additions when that is already included elsewhere. So ./autogen.sh now supports gettextize but stops it running twice. I'm storing the gettextize support files in CVS just to allow the post-gettextize environment to be retained without needing to deal with the aftermath of gettextize --force.
Also, one tweak is needed to the Makevars file in the new directory - change the subdir po location to po-lib or whatever you use.
The changes will show up in gpe-expenses CVS later.

29 July 2007

Neil Williams: Multiple po directories in a single upstream package

I've been struggling with gettext most of the day but I've finally got the solution! gpe-cash builds an application and a shared library (with API, -dev, -dbg and -doc). Source files for the application contain translatable strings, as do source files for the shared library. Unable to find documentation for how this should work with gettext, I got no end of path related errors.
Here's the clue: Keep ./po/ for the $PACKAGE.pot file, add ./po-foo/ for the second POT file. My mistake was to try to use po/ and src/po or src/po and src/foo/po.
Then, remove the symlinked Makefile.in.in from po-foo/ and copy the file from po/ so that the po-foo/Makefile.in.in can be edited to change the value of GETTEXT_PACKAGE to the alternate file.
Then, add the LINGUAS file to each po directory.
Add po-foo/ to the configure.ac output.
I also switched from glib_gettextize to gettextize (switching the configure.ac macros at the same time). I'm not sure if this is strictly necessary (and it added quite a lot of stuff to both po/ directories) but I'm not keen on breaking what I've just spent all day fixing!

Committed to cashutil SVN: r619.

24 July 2007

Neil Williams: Use quilt in emdebian-tools?

I've only taken a quick look at the quilt documentation but the
following thoughts occur to me:
  1. emsource / emdebuild are similar to quilt and in some ways, I have
    reimplemented a subset of quilt in these scripts.

  2. emsource handles 'quilt add' provided that changes are confined to
    files in debian/ (including new patches added to debian/patches).
    However, I was unable to find out how quilt handles unchanged files.
    e.g. emdebuild skips creating the patch if the diff is empty - does
    quilt do the same for files that have been added?

  3. quilt is targetted at "upstream builds" and it will require various
    config settings to get quilt to both keep patches outside the package
    source directory AND handle situations where the package itself uses
    quilt with a different series of patches. emsource and emdebuild are
    completely separate from any existing patch method.

  4. quilt does NOT make autobuilding emdebian packages easier. Conflicts
    are meant to be resolved by hand (e.g. emdebian-changelog.patch). A
    bespoke method can embed specific logic on handling such issues that a
    general method like quilt cannot.

  5. quilt could be *almost* as transparent as the current method (which
    hides nearly all patch management within emsource and emdebuild) but
    would still require a wrapper to add support for keeping the patches in
    SVN.



Hmm. Think I'll stick for now. You can have too many nested tools.

Next.

Previous.