Planet maemo: category "feed:d657281da8f1046af5c5fb58128972cc"

2008-03-06 12:34 UTC
0
0

Interesting less trivial than expected problem (solved): sorting package version numbers:

import re
import rpm

def get_package_version(name):
    """Return version string of installed package."""

    # note: ts can take an argument that is the root of the installation
    #       typically with a var/lib/rpm directory underneath it.
    transaction_set = rpm.ts()

    versions = [header['provideversion'][0]
                for header in transaction_set.dbMatch('name', name)]
    versions.sort(cmp_versions)
    return versions

def version2sortable(version):

    parts = re.split(r'(d+)', version)
    fields = []
    for part in parts:
        try:
            part = int(part)
        except ValueError:
            pass
        fields.append(part)
    return tuple(fields)

def cmp_versions(a, b):

    return cmp(version2sortable(a), version2sortable(b))

if __name__ == '__main__':
    print get_package_version('kernel')

Output:

['2.6.23.8-63.fc8', '2.6.23.9-85.fc8', '2.6.23.14-107.fc8', '2.6.23.14-115.fc8', '2.6.23.15-137.fc8']

Note: Wordpress is screwing up the markup on the code blocks above. If you have any tips on how to fix this please drop me a line.
Update: Using pre/blockquote hack for now and will try out a code highlighter plug-in when I get the chance. Thanks Tim and Lindsay! :-)

Categories: fedora
2008-02-09 14:04 UTC
0
0

I finally got around to looking at the problem tonight. The fix was very simple. My apologies for not addressing this sooner!

Get the updated .deb.

The problem was due to the volume range on the original Exaile going from 0-1. For some reason on maemo (OS2008) the volume range is 0-10. According to the gstreamer volume control docs the range should be 0-10, so I’m not sure why the original Exaile works properly on my desktop machine.

Anyway, I mainly use Kagu and Vagalume for music on my N800 these days. As a result I haven’t done anything on maemo Exaile for ages. I hope to one of these days, though.

Categories: exaile
2007-12-11 13:56 UTC
0
0

It’s lovely to see Nokia embracing “Web 2.0″…

You can participate too, with a related issue. Help convince Nokia to provide out-of-the-box support for Ogg Vorbis:

  • Vote for bug 176
  • PledgeBank (* I haven’t pledged - sticking with my N800)
  • The organization responsible for the Ogg formats have provided a template for writing a letter to Nokia

According to Nokia’s Ari Jaaksi, some time ago, “There’s nothing technical that prevents it. However, the 770 is a consumer device. The challenge is that there is not much [Ogg Vorbis and Ogg Theora] content right now.“.
I hope Wikipedia qualifies as “content”, not to mention personal music collections.

Meanwhile, the intrepid Tuomas Kulve has released a new version of ogg-support for maemo that enables the built-in media player to play Ogg Vorbis files. He notes, “It’s untrivial to get everything working properly as the FileManager, the Metalayer Crawler, and the Media Player are all close source applications and their behaviour is not really documented anywhere.” Hopefully this situation will change.

See also:

Categories: maemo
2007-12-08 14:05 UTC
0
0

Here are my notes from updating to OS2008 for getting root access via ssh and taking an early snapshot of the image filesystem with rsync:

Click to read 1090 more words
Categories: N800
2007-12-05 13:08 UTC
0
0

I’ve made a new release of Exaile for maemo 4.0 (i.e. OS2008, chinook). This drops a bunch of backward compatibility patches needed for OS2007, and takes advantage of some gtk 2.10 features. Also, there was a bug in the gtk shipped with OS2007 that prevented activating items in the sidebar. This has gone away, so now there are more playlist actions available.

Exaile on N800 (OS2008) screenshot

Note that the previous release won’t work on OS2008 because the id3lib gstreamer element is called id3demux in OS2008.

If you are in need of a player that handles Ogg Vorbis, m4a and mp3 (among others) on OS2008 and has decent playlist management features and you are willing to put up with a slightly slow and fat app then Exaile for maemo may be for you. :-)

Categories: exaile
2007-12-03 12:39 UTC
0
0

I’ve updated the maemo port of Exaile to version 0.2.11. There are not many visible changes, apart from alphabetic separators in the collection list. I now include the bytecode-compiled pyc files, so startup time should be reduced slightly. It still takes a bit long to start up though. I’ve been using this for about a month now and it seems to be stable enough.

This will probably be the last release for OS2007. I’ll make a release for OS2008 once I have that installed and working on my N800.

Categories: exaile
2007-11-30 12:57 UTC
0
0

A few weekends ago I updated my system from Fedora 6 to Fedora 8. I did a fresh install, as opposed to doing an upgrade. Here are a few of the problems I encountered, along with solutions:

Click to read 1142 more words
Categories: fedora
2007-08-12 05:10 UTC
0
0

The officially recommended way to create .deb packages for the maemo platform is to use dpkg-buildpackage within Scratchbox. For me, Scratchbox is a pain to install for two main reasons. First, there is no RPM package of the scratchbox environment, so apparently I need to run some scripts as root, let my system get a little messier, which I am not willing to do. Second, the docs advise to turn off SELinux in order to get the Scratchbox environment to work, which again I am not keen to do.

If you are using Debian or Ubuntu, there is probably a cleaner approach, but I am currently using Fedora, so I just rolled my own method using the command line. Copy the following files to your project directory:

Then rename deb_hand_example.mak to Makefile, and adjust the variables in this file to match your project.

Setup the required files (referenced in these makefiles) for packaging. There some pointers on this in the Python Maemo howto in the packaging section.

Note the ${PACKAGE_DIR}/data: ${SOURCE_DIR} target in the makefile. This must be modified to layout all files as you wish them to be installed on the target system. The example makefile rule should be a reasonable guide.

Then once you are ready, do ‘make PACKAGE_DIR= deb’ and if all goes well a shiny new deb package should be sitting in release_dir. If not, fix your settings in the Makefile, run ‘make clobber’ and then try again.

Categories: N800
2007-08-01 12:32 UTC
0
0

I’ve whipped up a webpage for the Exaile N800 port. This has the latest packages, screenshots, todo list, etc.

I’ve also made a new release with the following changes:

  • Basic Hildon-ization: window, menus, full-screen support, file dialogs
  • Icon now appears in taskbar
  • Fixed default OSD background colour
  • Made track info in title bar briefer

Double-clicking the playlist items in the sidebar doesn’t work. This is due to this bug in maemo gtk. Vote for it if you want this fixed.

There is plenty still to be done. I don’t have stacks of time to work on it at the moment. Send me some encouragement and I may work a bit faster. :-)

Categories: exaile
2007-07-22 13:26 UTC
0
0

I’ve rebased the N800 port of Exaile to the latest upstream release. In the process, I tidied up my existing patches and it is marginally more stable now. Here are some of the more noticeable changes:

  • the track position is now a progress bar and looks much nicer (upstream)
  • the plugin loader works now (upstream)
  • the volume slider works better (upstream)
  • turned off a lot of my debug output from the previous release
  • fixed a bug where a playing track would occasionally stop out of the blue

.debs are here:

Next, I’ll probably work on making the interface a bit prettier, starting with hildon-izing the menus. I’d also like to add Replay Gain support to Exaile at some stage. And of course there are still a few bugs to iron out. There is a TODO file tucked away somewhere in the package with more details on things that need to be done.

BTW, make sure you change the foreground color in the preferences for the OSD notifications. There is some problem setting the background color at the moment which results in the notifications appearing blank. I’ll fix this (at least the default setting) soon.

Categories: exaile

sponsored by Nokia Corporation