Search Results: "Julian Andres Klode"

3 January 2009

Julian Andres Klode: python-apt: Deprecation of mixedCase names, re-organisation of apt.progress, and more


[as sent to deity@lists.debian.org] Hello, while hacking a bit on python-apt in the last days, I formulated some
proposals which I want to present to you. I have already implemented proposals I and VII, started with the implementation
of proposal II, and have partially implemented proposal III, all in
my local branch. I could implement the rest next week, and this could
result in python-apt 0.7.9~exp2 (at least this is my wish, I do not
have commit access to the python-apt repository, and this mail is not
discussed yet :) ). My local branch is not online yet, but I m working on it. It is based
off debian-sid revision 202 (which is 0.7.9~exp1). I would have also suggest to (at least partially) follow PEP 7 (C code),
but re-indenting the whole extension code is not a good idea. Before I go on, I would like to know your opinions about these proposals,
what you like and what not, your suggestions, etc, etc List of Proposals
 I   Deprecation of mixedCase naming conventions in apt module
 II  Re-organisation of the apt.progress module
 III Language updates
 IV  Unification of testing code
 V   Cleanup of the code
 VI  Using unique variable names throughout the modules
 VII Some other changes
 
I. Deprecation of mixedCase naming conventions in apt module In order to comply with PEP 8, we should start to change our names
from mixedCase to lowercasewithunderscores style. This style is
more common in the Python world, and used eg. in the Python library. I hereby propose that:
  1. a new module apt.deprecate is introduced, which provides functions
    for compatibility and a class named DeprecateMixedCase
  2. Most classes are changed to subclass DeprecateMixedCase instead of
    object.
  3. All methods, attributes and variable names are changed from the
    mixedCase style to the lowercasewithunderscores style.
  4. apt_pkg will be changed to call the new methods on progress objects,
    and fall back to the old names if methods with new names are not
    available.
How backward compatibility is implemented: The DeprecatedMixedName class provides the methods getattr()
and setattr(). These classes will forward all access to attributes
with mixedNames to the ones with lowercasewithunderscores names. In case of methods, the getattr() method returns a helper function
which fixes all keyword arguments with mixedCase names and than calls
the right function. As this only works for methods with mixedCase names, methods which have
mixedCase-named args, get the argument **kwds, and its content will be
checked for mixedCase-named arguments. [On the other side, given that
the API is marked as not stable, we could also drop that level of
compatibility.] Schedule:
  1. Implement all the changes in an experimental version of python-apt
    as soon as possible.
  2. (A) Once all packages have been adjusted to use the new names, remove
    the old ones (about 50 binary packages, and I would write the needed
    patches). This would Breaks: about 50 packages.
    or
    (B) After the release of Debian Squeeze, remove the compatibility
    functions (and the deprecate module from apt). This is the same
    as (A), but does not require Breaks on 50 packages.
Known Issues:
  1. The methods will not be available using their oldName at class
    level, only at object level. This means that some code subclassing
    apt.* classes may fail. Most code will not break, however.
II. Re-organisation of the apt.progress module The apt.progress module is not very consistent in the way classes
are named. For example, there is OpTextProgress but TextFetchProgress. Therefore, I hereby propose that:
  1. For each of the for types of progress ( Cdrom , Fetch , Install , Op ),
    a new class is introduced with the name: Abstract%sProgress % progress
  2. For each type of progress a class Text%sprogress % progress is introduced,
    which subclasses Abstract%sProgress and provides textual output
  3. For further classes, a general naming scheme is introduced, which is
    %(outputtype)s%(progresstype)sProgress [whereas (1) and (2) implement
    this naming scheme]
Schedule: Same as in proposal I. III. Language updates The apt package has been written some time ago, and has not been updated
to make use of the latest language features. Therefore, I propose that:
  1. all code using old language features is adjusted to use language
    features as of Python 2.5.
    1.1 Examples include the use of decorators, and the use
    of str methods instead of functions of the string module.
  2. The with statement will be used where appropriate, and that
    apt_pkg.*Lock() gain support for being used as context managers.
Schedule: Implement as soon as possible. IV. Unification of testing code Most modules ship test code which will be called when the module is
run as a script. Therefore, I propose that:
  1. All testing code in the apt module is removed
  2. All the tests in the tests directory of python-apt
    are converted to a unified testing suite.
  3. Testing code which has been removed as part of (1) is
    reintroduced in the relevant test module, if appropriate.
Schedule: Implement as soon as possible. V. Cleanup of the code In accordance to PEP 8, which is also named as a rule in apt/README.apt,
code will be reformatted where needed. This includes 2 lines between module-level definitions, spaces after
, , comparing to None using is instead of = , and more. Schedule: Implement as soon as possible. VI. Using unique variable names throughout the modules I hereby propose the following names:
 cache    - An apt.cache.Cache() object
 pkg      - An object returned by cache[str()] (in special cases)
 pkg      - An apt.package.Package() object
 cand     - An object returned by depcache.GetCandidateVer()
This would remove some confusion for developers, especially
if you see that apt.Package() objects are named cand in debfile,
but pkg everywhere else. Schedule: Implement as soon as possible. VII. Some other changes Here is a list of other changes I have already made in my branch:
  • Remove apt.package.Record(), it behaves exactly like the
    object it is wrapping (apt_pkg.ParseTagFile() result)
  • Move the Origin class out of the Package() class and at
    the module level.
  • If a package should be marked for upgrade, but is not upgradable
    raise an exception (which will be apt.package.NotUpgradableError)
Schedule: Implement as soon as possible. Posted in Debian

20 December 2008

Julian Andres Klode: Filesystems


In the last months, I noticed that it was a bad decision to use XFS as my filesystem; and before I realized that ext3 was a bad choice as well. File systems have problems. I can t use ext3 on my laptop, because it would check the whole disk (120GB) every 30 boots. And this check takes a very long time (15 or 30 minutes, I do not know it exactly). XFS is better, but also problematic because deleting a big directory with a deep hierarchy takes a very long time like 1.5 minutes , whereas ext3 needs a few seconds. Also I still wonder why XFS needs no checks. Therefore I might go with ext4. The time needed to check the partition seemed to be much shorter and the speed is about the same as with ext3. The installation will probably be: Install Lenny on a ext3 partition, install kernel with ext4 support (which is kernel 2.6.28), add ext4 to /etc/initramfs-tools/modules, tar the partition, format it as ext4, and untar the contents again; because converting does not bring the advantags of ext4 to already existing files. BTW, I did some benchmarking with bonnie++, and XFS had about 20,000 operations per second, whereas ext3 had 60,000. ext4dev from Kernel 2.6.27 was a bit slower than ext3 I also tested BTRFS, but BTRFS is 1) not stable enough 2) as slow as XFS. It also shows horrible write performance of 19MB/s using dd, whereas XFS reached 42MB/s. BTW, benchmarking btrfs with bonnie++ only works using -s 0 , i.e. without I/O performance test, else you receive a kernel bug. I subscribed to the btrfs mailing list, and sent my bug report email 4 times, but it never reached the list it seems. This bug also happens in other cases. Posted in General

19 December 2008

Julian Andres Klode: Dear WordPress.com users, Planet does not understand your post titles.


If you use wordpress.com, and added a Gravatar, always use the Atom feeds for Planet installation. There seem to be some problems with parsing the code, i.e. planet seems to understand media:title from your gravatar in the rss feed as the title of the post (therefore, the title of this post would be juliank). The URL of the feed is http://juliank.wordpress.com/feed/atom/, replace juliank with the name of your blog. Posted in General

Julian Andres Klode: Short review: Fedora 10 and Ubuntu 8.10


After I tried OpenSolaris 2008.11, I also tried Fedora 10 and Ubuntu 8.10, each for almost one day. Creation of bootable USB stick: For both distributions, I created a bootable USB stick because it is faster to install from USB than from CD/DVD. The creation was easy in both cases. Fedora ships a shell script and Ubuntu a graphical program for this task. Both very equally easy to use. Booting from USB: Both distributions booted perfectly from USB. But there was a big difference in boot speed: Fedora 10 booted in about the same time Ubuntu needed to find the USB stick. Installation from USB to HDD: Installation of both systems went very well, without any problems. Fedora s installer is far more powerful than Ubuntu s, e.g. it allows to use LVM or encrypted partitions. To setup LVM and encrypted volumes with Ubuntu, you need to use the text installer on Ubuntu s alternate disk (It s debian-installer). Ubuntu s graphical installer received a new partioning screen. Boot: Fedora s boot time seems to have improved a lot since the last release. Ubuntu s boot time seems to be roughly the same as in 8.04. Both distributions provide a progress bar, whereas Ubuntu s usplash looks better. But this may change once kernel-based modesetting works on Intel cards in Fedora, because Fedora s splash program needs it for graphics. Else, it only displays ASCII progress bar. Login: Fedora 10 shipped with GDM 2.24, which means that there are no themes yet. But this was no problem, as the non-themed design of GDM has improved a lot. I even like it more than any themed GDM I have seen. It reminds me a bit of OSX. Desktop: Both distributions ship with GNOME 2.24. The default themes look good, whereas Fedora s uses more GNOME-like icons, whereas Ubuntu uses Human, which is based on Tango. And that is important for me, since I normally do not change any aspect of my desktop, except for adding cpu frequency and tomboy applets to the panel. Hardware support: Both distributions provide good hardware support. Ubuntu leads here, at the cost of having non-free drivers included on the disk.For users needing windows wireless LAN drivers, Ubuntu is the right choice, as it ships ndiswrapper and the graphical frontend (ndisgtk) on the installation medium. Fedora does not include ndiswrapper, because of what it is used for (installing non-free Windows drivers). Both distributions ship firmware, and consider firmware images as free enough, as they do not run on the CPU. EXT4: Fedora 10 ships with patches for EXT4 backported from Kernel 2.6.28. It also supports the installation on ext4 partitions, but only using the DVD and if booted with the ext4 option. The Live discs do not support installation to ext4. Package management: Both distributions ship with good package managment software. YUM really improved since the early times, where it downloaded an extra metadata file for every package. Nowadays, yum and apt seem to be on a nearly equal level, but aptitude lets Ubuntu win, because it can handle problems much better (ie. it proposes ways to solve problems) than YUM. Graphical package management: Ubuntu wins here. Fedora only ships PackageKit for package managment, which, in my opinion, is not able to really compete with Synaptic and gnome-app-install. Conclusion: Both distributions are very solid. Ubuntu still has the better package managment, and a bigger selection of packages. This has only been possible due to Debian, which is the base of Ubuntu. I tried to write this blog post not as an Ubuntu member. I always liked Red Hat and Fedora, and one of my first Linux distributions was Red Hat 9. Links: Posted in General, Ubuntu

Julian Andres Klode: Short Review: OpenSolaris 2008.11


The installation was fast and easy, comparable to the installation of Ubuntu. OpenSolaris seems to have big problems in terms of wireless LAN. I am using a WPA/WPA2 encrypted wireless LAN, and it asked to me to enter my passphrase. I entered it, and nothing happened. I was able to get wireless working via commandline, but this lead me to the problem that domain names were not resolved. I could solve this, too. But none of this was permanently, and it should work the graphical way or tell me it does not work. Maybe this whole thing happened because I have a space in the name of my Wi-Fi network. Another problem is suspend/resume, which is not yet working for most laptops; whereas recent Linux distributions support suspend/resume out-of-the-box. OpenSolaris ships non-free components, e.g. NVIDIA display drivers, or Java 6 Update 10. Hopefully, there will be an option in future to install it without this stuff. Talking about the desktop, there is GNOME 2.24 with a custom theme. In my opinion, the theme looks quite good, although I do not like the colours of the minimize,maximize,close buttons of the windows sometimes. One feature introduced with this release is Time Slider. Time slider worked very well, although for reasons I do not know, I do not really like it. The integration with nautilus is good, but I would still like to see an interface using a calender widget instead of this slider. I remember that the slider sometimes did not work as I expected, e.g. it jumped from left to right. The package management is interesting, but it is to hard to use in my opinion. Debian and derived distributions provide far better package managment in my opinion. Especially the graphical part needs a lot of work in order to compete with Debian. The overall speed was quiet good, and memory usage was 512MB. There is one problem with measuring memory consumption in gnome-system-monitor: I installed netbeans 6.5 and started it, and gnome-system-monitor showed a memory usage of around 20MB, while the program used more than 200MB (according to top). All in all, OpenSolaris gets closer to modern Linux distributions like Fedora 10 or Ubuntu 8.10, but it is not there yet. But with improvements in the area of Wi-Fi and Suspend/Resume, future releases of OpenSolaris might become a good alternative to Linux distributions, at least if you do not really care about the ideas of free software. Posted in General

25 October 2008

Julian Andres Klode: aufs 0+20081023-1 uploaded to experimental


I just uploaded a new upstream snapshot of aufs (another unionFS) to experimental. But it is really more than just a new upstream snapshot: First of all, this release includes patches written by Jeff Mahoney <jeffm@suse.com>. These patches enable the usage of NFSv2 and NFSv3 file systems as branches, even on the standard Debian kernel. The package does not support NFSv4 yet, but will support it at a later point (but only with a patched kernel) - the code exists, it’s just not enabled yet. This release also removes support for pre-lenny Kernels (<2.6.26) and uses quilt instead of dpatch. It also removes any AppArmor support for the moment, but this may be added back later. Posted in Debian      

13 October 2008

Julian Andres Klode: I am a Debian Developer now!


14 months after applying for the NM process, I’m a Debian Developer. On Mon, Oct 13, 2008 at 10:51:43PM +0000, Martin Zobel-Helas wrote:
> [ This is a long mail with important information, so please read it all
> carefully. ]
>
> Dear Julian Andres Klode!
>
> Your account ‘jak’ has just been created in the central LDAP
> database of the Debian project. [...] Thank you everyone (in chronological order):
  • Daniel Baumann (daniel) - Sponsored my first packages
  • Joerg Jaspert (joerg) - The first DD who signed my key
  • Niv Sardi-Altivanik (xaiki) - Advocated me for NM
  • Martin Zobel-Helas (zobel) - My first AM
  • Alexander Reichle-Schmehl (tolimar) - The second DD who signed my key (at CeBIT)
  • Bernd Zeimetz (bzed) - Took over in June, because zobel was very busy
  • Christoph Berg (myon) - For checking the AM report and requesting the account creation
  • Jonathan McDowell (noodles) - For adding me to the keyring
  • Martin Zobel-Helas (zobel) - This time for creating my account
And many thanks to Google - for helping me to find answers to important questions. Without you, I would know nothing. And of course all the others who helped to make this possible. Posted in Debian      

10 October 2008

Julian Andres Klode: Gentoo destroying earth?


I worked a bit with some Gentoo systems the last days and it was no fun. The whole compiling thing is no fun. In fact, it is a danger for the environment. If every computer in the world run Gentoo, power consumption would increase dramatically. There would also be no netbooks, as they are almost unusable for running Gentoo on it, compiling software. The path chosen by binary distributions like Debian is much better. Packages are compiled centrally and users download and install these pre-compiled packages. But it is also much less flexible in terms of which functionality is supported. We, as package maintainers, have to decide which functionality is likely to be used by the users. In Contrast, Gentoo has USE flags, which allows the user to enable the specific functionality he/she wants. Should we combine the advantages of both technologies? Provide a normal binary distribution as we do now, but also provide a framework for users to easily recompile their packages, adding new functionality. Imagine a combination of all these technologies: User wants to install software X with feature F. The package maintainer has not enabled F in the binary. The user opens the website for his personal archive, selects the F flag and the software and clicks on build. The server builds the software and notifies the user once the binary is ready. At Ubuntu, the first step has been made into this direction. While the package format is still the same, Launchpad allows users to create so-called PPAs (Personal Package Archives), where users can upload their source packages, which are then compiled and made available to other users. Let’s say Project A releases version X of their software. They can create a source package for it, upload it to the PPA, and provide the binary packages to the users. Prior to PPAs, most users would have used an old version, compile their own version or use tarballs containing pre-compiled software (mozilla does this). And sorry for the title. I respect the Gentoo community and the Gentoo developers, they are doing great work there. And ebuilds and Gentoo’s boot system (with this runscript stuff) is really easy. BTW: I also like the way Gentoo displays its boot messages. It looks much more organized than Debian’s boot process. (In terms of the message logging, where Debian writes “done” when something is done, and Gentoo writes “[OK]” to the right side of the screen, in green letters. (This is partially possible in Debian using lsb-base-logging.sh, but not all init scripts use these functions, or they use the wrong ones.) Posted in Debian, General, Ubuntu      

29 September 2008

Julian Andres Klode: juliank


The most important birthdays in the FLOSS world this year (where age mod 5 = 0):
  • 10 years: Google (September), Open Source Initiative (February)
  • 15 years: Debian, FreeBSD, NetBSD
  • 25 years: GNU
  • 35 years: Ian Murdock (April), Mark Shuttleworth (September)
  • 55 years: Richard Stallman (March)
Posted in General      

14 August 2008

Julian Andres Klode: Now SPI contributing member


I’m now an SPI contributing member.

13 August 2008

Julian Andres Klode: Joined Software in the Public Interest (SPI)


On Monday, I joined Software in the Public Interest (SPI). I’m currently a non-contributing member and have already applied for contributing membership. MJ Ray asked why people do and dont join SPI, and received answers. Not knowing SPI is no good reason, at least if you are participating in Debian’s development, and you should really know SPI if you are a Debian Developer. For me, personally, not joining the SPI would not make any sense. The existance of other organizations is no good reason. Look at me, I am also a Fellow of the Free Software Foundation Europe. There is only one reason which seems to be a bit right: It’s hard to join SPI. The membership information is located at ‘About -> Membership’ in the menu. Maybe this should be made a top-level menu-item and a big link “JOIN!” should be put on the homepage. I see no reasons for anybody to not join SPI. All you need to join is a valid email address and interest in free software.

10 August 2008

Alexander Reichle-Schmehl: Bits from the DPN editors

It's more or less four months since I proposed to resurrect our newsletter. We already released eight issues of the Debian Project News and work for the ninth issue has already started. So I guess it's time for a small "state of the DPN" speech, but since I'm not attending DebConf, you will have to read this mail instead ;) After having a rough start (and in fact missing some self-set deadlines and completely underestimating how much work is involved in such a kind of newsletter) we finally developed a - more or less - working flow of work (Which is by the way documented here). Speaking of the current state sadly means to confess, that our hopes to draw a lot of help from the community by using a system for drafting the news with a low entry barrier were not fulfilled. We actually had a good start, with good participation, but due to (I assume) the aforementioned initial difficulties participation in the creation of the DPN dropped considerably. Currently the workload of creating our bi-weekly newsletter is shared by only two people (that being Meike Reichle and myself), which is barely enough :( While we at least get a hint from time to time, what we should mention in the next issue, it rarely happens, that someone contributes by drafting a text -- which is the real work. (At this point a BIG "Thank You" to those who did! (See list bellow.) It's much appreciated!) We suffer especially, since although we are a two people team, we have in fact no redundancy, since real live issues affecting one of us will most likely affect the other one, too. Therefore we mostly concentrated our work on creating the next issues and getting them out in time, and didn't have time to answer all mails considering suggestions for changes and improvements (yet?). We are sorry, but at least we tried to read them briefly and keep them in mind when drafting the next issue. As a result of this we re-added the list of DSAs, WNPP and new and noteworthy packages due to popular demand. There are still a lot of unanswered mails not dealing with content, but with workflow issues / proposals (including changing from wiki.debian.org to a special ikiwiki instance). We are sorry, that we couldn't yet act on them and take appropriate measures, but be assured, they are not forgotten. Other issues the DPN currently have are "unwritten guidelines" regarding editorial choices of DSAs to be published and which packages to list in the "new and noteworthy package" section. Both is more or less done by our gut feeling. Speaking of problems the DPN are facing, we also need to mention translations of the DPN. The current workflow makes it difficult for translators of the DPN, since we often fail to get the final draft of the DPN ready in time to give translators a "head start" so the translated DPNs can be released together with (or at least with a as small as possible delay to) the English DPN. So here is a big call for help! We really need your help writing the DPN. (Monitoring lists and newstickers we don't monitor ourselves would be nice, too, but only add more work to us if you only give us pointers.) We will both be very busy with our real live the upcoming month, and are not sure how much time we can dedicate to the DPN. So please help us! The current draft for the next issue of the DPN is always available here . There should already be a todo list with pointers to interesting topics, which need to be written out. Some guidelines about style and content are available here. Last but not least, we would like to thank the following people who have contributed to the DPN so far: (Unfortunately we can't list those people, who contributed by translating the DPN, nor do we have a complete list of the native English speakers, who helped by proofreading. But we thank them nonetheless!)

23 May 2008

Julian Andres Klode: Ubuntu hardy: swfdec0.7 and swfdec-mozilla0.7 in the PPA


As promised, i have built a few development snapshots of the swfdec git branch for hardy. They are available in my PPA. To use it, add the following line to /etc/apt/sources.list and install swfdec-mozilla0.7.
deb http://ppa.launchpad.net/juliank/ubuntu hardy main
Please note that these packages are experimental and are only for experienced users.

22 May 2008

Julian Andres Klode: The future of dir2ogg - gstreamer?


After playing a bit with gst-launch, I found out that it can convert music files and keeps the tags. Therefore, I think it would be great to rewrite dir2ogg using gstreamer (the python bindings). This version of dir2ogg will be much much smaller, and is really easy to extend. It will also support multiple output formats and does not need to know about the input files (use -i ‘SHELL PATTERN’ to include other files). But it will not really replace dir2ogg. The old dir2ogg will still be supported.

Julian Andres Klode: swfdec working perfectly with gstreamer


After the trouble with swfdec and gstreamer, I found out the source of the issue (the fluendo mp3 plugin, see below), and can now use swfdec with gstreamer. Warning: Do not use the mp3 plugin from fluendo.com swfdec does not always work with the binary mp3 plugin from fluendo.com, at least not in Ubuntu 8.04 64bit. It works with the version shipped in Ubuntu (gstreamer0.10-fluendo-mp3) and with the mad plugin in gstreamer0.10-plugins-ugly. An example is http://youtube.com/watch?v=CSp7jsV7oG0 Installation of missing gstreamer plugins This works on both, Debian and Ubuntu, provided gnome-app-install is installed (default in Ubuntu). Simply open a youtube video, and you will be asked for searching the missing codecs. This also works in almost any other gstreamer application, like rhythmbox or totem. Builds of the development branch I will provide builds of the 0.7.1 git versions of swfdec and swfdec-mozilla in my PPA soon. This version even supports fullscreen mode in youtube! The PPA will build versions for hardy and intrepid.

Julian Andres Klode: Ubuntu: swfdec using ffmpeg in PPA


I created a version of swfdec 0.6.6 using mad and ffmpeg instead of gstreamer, because with gstreamer it failed to play multiple videos on youtube.com. The release is available in my PPA at:
deb http://ppa.launchpad.net/juliank/ubuntu hardy main
deb-src http://ppa.launchpad.net/juliank/ubuntu hardy main
I will also provide some builds of the development branch (0.7.1) soon. Update:Maybe it was not clear, but the videos crashed the browser. It also didn’t really work in totem and I’m still looking for the source of the problem. I have every available gstreamer plugin package installed. Try it yourself, http://de.youtube.com/watch?v=CSp7jsV7oG0. It works with gnash, but gnash does not work with wordpress stats page. Update 2: I now found the real problem: I had an binary version of fluendo’s mp3 plugin installed (from fluendo.com), which caused the crash. After removing the file, everything works. (using fluendo-mp3 shipped with Ubuntu). Update 3: I removed the ffmpeg version from my PPA, as it is not needed.

6 May 2008

Julian Andres Klode: News on debimg


Well, you may have noticed that debimg 0.1 is still not released. But a lot of work happened over the weekend in my local branch. First of all, debimg’s set support is almost finished. I uploaded a tarball containing the differences between the official lenny weekly build from yesterday and a build created today by debimg, using the tasks of debian-cd 3.0.4 (after manual conversion to a format supported by debimg). Look at http://jak-linux.org/cdimage/tests/ for the tarball. Secondly, the dependency resolver has been rewritten. It’s a bit slower now (0.72 seconds for main), but creates much better results. Resolving the dependencies of all packages in Debian Lenny i386 in alphabetical order, debimg 0.0.X resolved 206 dependencies differently than apt. Now, these have been decreased to 15 dependencies, whereas 13 dependencies are false-positive (some packages were not installed because they were already installed). This means that only two ones were different, in this caseachims-guestbook and chdrv, which both depend on virtual-only packages (achims-guestbook: apache httpd, chdrv: console-utilities). The third big change is the addition of the hooks module. This module allows you to hook in custom functions, which have access to the Configuration object (ConfigObj) and the MediaSet. There are currently three types of hooks: pre_hooks (run before fetching packages, adding files to the disk), mid_hooks (run after the packages have been fetched) and post_hooks (run after the image has been built). Hooks can be added based on project and architecture, using a simple syntax which support shell patterns. (It’s ‘project/arch’). The hooks module uses python decorators to register functions. debimg 0.2 will switch to hooks for internal functions, too, like bootloaders and other stuff. The code has not been merged into the master branch, but I will hopefully be able to merge it tomorrow. The release of debimg 0.1 is now planned for this weekend.

29 April 2008

Julian Andres Klode: What will be in debimg 0.1


debimg 0.1 will be the first major milestone in the development of debimg. I will now list some changes compared to the current release, debimg 0.0.3 (Please note that the following text is from an internal NEWS file and may not be correct in some aspects, as it is already some days old) Support for disk splitting This release of debimg adds support for creating media sets, i.e. splitting the packages over multiple disks. This is achieved by providing a new class called MediaSet, which passes all calls to methods to all medias. When a package is added to a MediaSet, MediaSet tries to find the first disk where it can be added, by checking if all dependencies of the package are provided on the disk (or previous ones). This dependency checker does no recursive dependency checks, and can be disabled via OptimizedDiskSplitting = False (or no, n, 0…) in the configuration file. The MediaSet classes are also lists, so you can access disk one via the index 0. BaseMedia has been modified to also support being accessed via index, using disknumber-1 in order to have both classes share the same API. New data lists This release of debimg brings users a more powerful way to include packages. Instead of various keys to include packages, debimg now uses the Include key. To include packages, you have to use the ‘Include’ field. The value is a list of items, separated by commas. An item may either be the name of a package or a special form written as key:value. In this case, the following keys are supported: Task/Priority:
This includes all packages belonging to the specified task or priority. In
case of tasks, debimg first includes all Key packages, then the other
packages. Configuration files are easier This release of debimg makes it possible to build multiple architectures using the Architectures option. This option replaces the previous Architecture option, which is now set automatically by the script for each architecture. It also enables the Projects option, in case you want to build multiple projects. (All need to have the same MediaType and same NumberOfDisks). The project may also be cd-set, dvd-set, dvd9-set, netinst or businesscard. In these cases, MediaType is set automatically. [MediaType may also be moved in to data files]. This release also allows you to prefix any configuration value with path: in order to automatically convert the value to an absolute path. This is needed for many file options, but should not be used for some other stuff. Improved Jigdo Support debimg 0.1 allows you to define the public path (name) to (of) the image file and the template file that is written to the Jigdo file. Use urlgrabber for file downloading Starting with this release, debimg uses urlgrabber to download all kinds of files (except packages). A urlgrab call has been added to BaseMedia.addFile() which now understands http:// and ftp:// urls. Plugins (maybe) debimg 0.1 may introduce support for registering custom functions. This feature is low-priority, although required for easy development of Ubuntu-related code. About debimg debimg is a GPL-3 licensed software designed to replace debian-cd, a tool to create Debian images. For further information about debimg, visit the Wiki page. For more information about Debian, visit the website at www.debian.org.

Julian Andres Klode: Python Speed: x in list vs x in set


Well, this is my second post about speed in Python. Today, I noticed that debimg’s dependency resolver was much much slower than before. I thought what the problem could be and finally realized that the problem was that I switched from sets to list. This is fixed now in commit d0fd700080de5c19cb5fd66918d14c5ffa26e805 Now, some benchmarks (using IPython): In [1]: a = range(10**6) In [2]: b = set(a) In [3]: %timeit 10**6 in a
10 loops, best of 3: 31.8 ms per loop In [4]: %timeit 10**6 in b
10000000 loops, best of 3: 98.6 ns per loop 1ms are 1 million ns. Therefore, using sets is about 322515 times faster than using lists (or tuples). debimg can now calculate dependencies in 0.5 seconds again, instead of 1 minute with lists.

25 April 2008

Julian Andres Klode: Responding to e-mails with Evolution


Every time I receive an email at my ubuntu.com address, and respond to it, Evolution uses my jak@jak-linux.org e-mail address. It should be noted that the e-mails are fetched with a single account, as they are on an imap server, and because ubuntu.com is a forward address. Is there any way to make Evolution respond with the e-mail address at which I received an email? BTW, work on debimg 0.0.4ubuntu1 (previously 0.0.3ubuntu1) has reached the first milestone: Support for selecting packages based on the output of Germanite. This weekend, I will release debimg 0.0.4 and debimg 0.0.4ubuntu1 (or I merge it directly, let’s see). Update: This was just some mistake on my side. I get emails from an Ubuntu mailing list and want to send emails to it using the ubuntu.com address. It works for normal emails.

Next.

Previous.