pkgin (probably not weekly) news 3

Tags: ,
No Comments »

I’ve just commited 0.5.2.1. As the version shows, it is a bugfix release; is@ got a very nasty bug that took me a while to figure out. For 3 years, the only pkg_summary(5) format I’ve seen was:

PKGNAME=foo
[...]

or, in case of conflicting packages:

CONFLICTS=bar
CONFLICTS=baz
PKGNAME=foo
[...]

Well it turns out that we can also find:

PKGNAME=foo
CONFLICTS=bar
[...]

which is pretty annoying when it comes to stick to an anchor. Until now, I did the following:

static int
chk_pkgname(char *field)
{
        if (strncmp(field, "PKGNAME=", 8) == 0 ||
                strncmp(field, "CONFLICTS=", 10) == 0)
                return 1;

        return 0;
}
[...]
                /* browse entries following PKGNAME and build the SQL query */
                while (*psum != NULL && !chk_pkgname(*psum)) {
                        update_col(sum, pkgid, *psum);
                        psum++;
                }

But with that new case, I had to check a little bit further:

static int
chk_pkgname(char *field, char *last_field)
{
	if (strncmp(field, "PKGNAME=", 8) == 0)
		return 1;
	/* in some very rare cases, CONFLICTS appears *after* PKGNAME */
	if (strncmp(last_field, "PKGNAME=", 8) != 0 &&
		/* never seen many CONFLICTS after PKGNAME, but just in case... */
		strncmp(last_field, "CONFLICTS=", 10) != 0 &&
		strncmp(field, "CONFLICTS=", 10) == 0)
		return 1;

	return 0;
}
[...]
		/* browse entries following PKGNAME and build the SQL query */
		while (*psum != NULL && !chk_pkgname(*psum, *(psum - 1))) {
			update_col(sum, pkgid, *psum);
			psum++;
		}

I really don’t like the way it’s done but I’ve no sexier way in mind at the moment. Maybe after some glasses of wine…

pkgin 0.5.1 released

Tags: ,
No Comments »

Finally, here comes a release ! Read the full announcement and changelog on pkgsrc-users.

pkgin (probably not weekly) news 2

Tags: ,
No Comments »

And here we are for week 2 !

There have been some fixes last week, issues were mainly spotted by orgrim, thanks to him !

The big one concerns a type of dewey/glob I’ve never been through before:

libao-[a-z]*-[0-9]*

Until now, I was able to handle the following (from pkg_str.c)

/*
 * AFAIK, here are the dewey/glob we can find as dependencies
 *
 * foo>=1.0 - 19129 entries
 * foo<1.0 - 1740 entries (only perl)
 * foo>1.0 - 44 entries
 * foo< =2.0 - 1
 * {foo>=1.0,bar>=2.0}
 * foo>=1.0<2.0
 * foo{-bar,-baz}>=1.0
 * foo{-bar,-baz}-[0-9]*
 * foo-{bar,baz}
 * foo-1.0{,nb[0-9]*} - 260
 * foo-[0-9]* - 3214
 * foo-1.0 - 20
 */

As there was no “easy” way of handling those double-globs dependencies, I took a simple approach: resolve dependency with a matching package when the pattern is too complex (sqlite_callback.c):

    /* map corresponding pkgname */
    if ((pkg_map = map_pkg_to_dep(plisthead, deptree->depend)) != NULL)
        XSTRDUP(deptree->name, pkg_map->name);
    else
        /* some dependencies just don't match anything */
        XSTRDUP(deptree->name, DEPS_PKGNAME);

Only drawback, this takes a bit more time, but at last, there’s no possible error on dependency resolution. Maybe there’s some more optimizations I can do to reduce time taken with this mapping.

As planned, pkgin now depends on pkgsrc’s pkg_install, and the latter is pushed on top of the upgrade-list if there’s a new version.
I also fixed the many-versions-of-the-same-package problem with the following query (pkgindb_queries.c)

const char DIRECT_DEPS[] = /* prefer higher version */
    "SELECT REMOTE_DEPS_DEWEY, REMOTE_DEPS_PKGNAME "
    "FROM REMOTE_DEPS WHERE PKG_ID = "
    "(SELECT PKG_ID FROM REMOTE_PKG WHERE PKGNAME = '%s' "
    "ORDER BY FULLPKGNAME DESC LIMIT 1);";

Needs to be done:

  • Tests, tests, tests !
  • reproduce and fix 2 different bugs two users had; I’ve been unable to reproduce them at the moment
  • test Minix 3.2.0

pkgin (probably not weekly) news

Tags: , , , ,
1 Comment »

Foreword: this post will be written in english as many pkgin users don’t speak french. Sorry to my french readers then, and sorry also to my english readers as i’m not as fluent in english as i am in french :)

I subscribed to jmmv’s blog, The Julipedia, a while ago and found his idea of the “Kyua: Weekly status report” very inspiring, that’s a good way to keep your users informed on how the project is moving and keeps you focused on your TODO (although i hate TODO’s…). I doubt i’ll have the time to write a weekly report, but at last i’ll try to write a post whenever important updates are made to my beloved project.

So let’s begin !
As you, pkgin users, may be aware of, i’m working on the future 0.5 release, which includes massive internal changes plus some features that have been asked and i found interesting. So, in addition to the features i already listed in this mail sent to pkgsrc-users@, here are some hilights on recent changes:

  • pkgin now has a new logo !
  • it is now possible to export / import your keep-list, pretty much like dpkg‘s get/set-selection. The exported list is in pkg_chk‘s format. Thanks wiz@ for the idea
  • pkgin install can now take a “blob” as an argument, i.e. pkgin in 'mysql-server<5.5', thanks filip@ for the idea
  • pkgin now uses pkgsrc’s pkg_install for NetBSD also
  • added the -t modifier, mostly for debugging purposes, in order to trace the dependency tree and impact lists
  • pkg_install error logs are handled in a nicer way
  • enlisted pkgin’s code to ohloh (click on “i use this” !)
  • plus usual bugfixes

Yeah, these were fairly productive holidays :) Of course most of these changes are only available in CVS, see http://pkgin.net for details. Some of them have already made their way to pkgsrc-wip, i try not to insert big changes now, so wip and CVS should be sync’ed quite often.

Needs to be done:

  • make pkgin’s pkgsrc package depend on pkgsrc’s pkg_install
  • reproduce and fix 2 different bugs two users had
  • optimize the dependency loop regarding packages that exists in many versions (i.e. bash)
  • check if pkg_install is to be upgraded and then push it on top of ordered list
  • test Minix 3.2.0

Hope i’ll make it to pkgsrc 2011Q4 !

Un logo en carton

Tags: , , ,
2 Comments »

J’aime aussi les vacances parce qu’elles me donnent des idées, et ce matin, alors que j’attendais que la piscine se réchauffe, j’ai pondu ça:

pkgin 0.5, faster pussycat kill kill

Tags: ,
No Comments »

Avant de partir me dorer la pilule à la maison, je vous jette en pâture une toute nouvelle pre-release de pkgin, j’ai nommé 0.5.0.

Fruit des conseils avisés du sieur Bapt, fort de son experience avec son fâmeux pkgng, ainsi que des multiples feedbacks d’horizons très differents, le code de pkgin 0.5.0 est plus rapide, plus simple et embarque un certain nombre de features requests.

Dans l’ordre d’implémentation:

  • Migration silencieuse d’une base 0.4 vers 0.5
  • Fonction check_yesno() plus souple
  • “Yes” par defaut pour pkgin install / remove / upgrade
  • Une unique structure pour toutes les formes de listes de packages
  • Nettoyage de dizaines de calculs de listes inutiles (perfs x10)
  • Introduction du champs FULLPKGNAME, accélération des recherches
  • unique_pkg(): plus de “many versions of foo available”, le plus récent est toujours choisi
  • Import du progressmeter d’OpenSSH

Cette version restera en gestation dans wip le temps qu’elle soit correctement testée, les changements sont nombreux et profonds, je dois m’assurer que tout fonctionne comme il se doit.
Vous l’aurez compris, il faut tester, TESTER, TESTER !
Je vous invite à rapporter les problèmes potentiels sur la liste de developpement de pkgin, à pkgin-devel-at-lists-point-sourceforge-point-net.

pkgin upgrade

WP Theme & Icons based on GlossyBlue by N.Design Studio
Banner from www.trynthlas.com
Entries RSS Comments RSS Log in
Performance Optimization WordPress Plugins by W3 EDGE