Installing gbrainy with zypper (compiled with libzypp + metalink support)

Written by Gerard on 1 01UTC July 01UTC 2008 – 16:08 -

Right now, with libzypp hacked version than I have in my laptop, I can do this:

./zypper install gbrainy
Reading installed packages…

The following NEW package is going to be installed:
gbrainy

Overall download size: 127,0 K. After the operation, additional 472,0 K will be used.
Continue? [YES/no]: YES
Downloading package gbrainy-0.61-31.1.noarch (1/1), 127,0 K (472,0 K unpacked)

——————–
getFile ( /media.1/media )
doGetMetalinkFileCopy –> http://download.opensuse.org/distribution/11.0/repo/oss/media.1/media.metalink
\ Downloading: media.metalink [starting]Metalink file exists – We can parse it ;-)
We have 69 mirrors for this file
Downloading from http://mirror.switch.ch/ftp/mirror/opensuse/distribution/11.0/repo/oss/media.1/media
HTTP response: 200
done: /var/adm/mount/AP_0×00000003/media.1/media{- 0644 0/0 size 42}

——————–
getFile ( ./suse/noarch/gbrainy-0.61-31.1.noarch.rpm )
doGetMetalinkFileCopy –> http://download.opensuse.org/distribution/11.0/repo/oss/suse/noarch/gbrainy-0.61-31.1.noarch.rpm.metalink
| Downloading: gbrainy-0.61-31.1.noarch.rpm.metalink [starting]Metalink file exists – We can parse it ;-)
We have 69 mirrors for this file
Downloading from http://mirror.switch.ch/ftp/mirror/opensuse/distribution/11.0/repo/oss/suse/noarch/gbrainy-0.61-31.1.noarch.rpm
/ Downloading: gbrainy-0.61-31.1.noarch.rpm [starting]HTTP response: 200
done: /var/adm/mount/AP_0×00000003/suse/noarch/gbrainy-0.61-31.1.noarch.rpm{- 0644 0/0 size 129095}
Downloading:  [done]
Installing: gbrainy-0.61-31.1 [done]

All seems well and correct but… right now begins a new problem :-( If the server responds with HTTP code 304, I get this error message:

Can’t provide ./suse/noarch/gbrainy-0.61-31.1.noarch.rpm : Can’t copy /var/adm/mount/AP_0×00000003/suse/noarch/gbrainy-0.61-31.1.noarch.rpm to /var/cache/zypp/packages/repo-oss
Repository ‘repo-oss’ is out of date. Running ‘zypper refresh’ might help.

Really, this error is caused because this file (/var/adm/mount/AP_0×00000003/suse/noarch/gbrainy-0.61-31.1.noarch.rpm{does not exist}) NOT exists :-(

Post updated 02/07: In effect, we receive 304 response code because we send “If-Modified-Since: Thu, 01 Jan 1970 00:00:00 GMT” in the header.

GET /distribution/11.0/repo/oss/media.1/media HTTP/1.1
User-Agent: ZYpp 5.0.0 (MediaMetalink – with curl 7.18.1 & libmetalink )
Host: opensuse.mirror.solnet.ch
Accept: */*
If-Modified-Since: Thu, 01 Jan 1970 00:00:00 GMT

HTTP/1.1 304 Not Modified
Content-Type: text/plain
Accept-Ranges: bytes
ETag: “3592996126″
Last-Modified: Wed, 02 Jul 2008 02:42:38 GMT
Date: Wed, 02 Jul 2008 13:31:06 GMT
Server: httpd/1.4.x

I’m thinking in this actions:

  • Disable “If-Modified-Since” in our petition via libcurl, or,
  • Try the next mirror when libzypp receives 304 HTTP code response.

Updated: We can disable “If-Modified-Since” header in our petition, simply commenting these lines:

curl_easy_setopt(_curl, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE);
curl_easy_setopt(_curl, CURLOPT_TIMEVALUE, PathInfo(target).mtime());

Good solution :-) ?

Subscribe to my RSS feed

Primera versió de l’extensió per al Firefox DownThemAll! en català

Written by Gerard on 20 20UTC June 20UTC 2008 – 09:54 -

Tinc traduïda ja una primera versió de l’extensió per al Firefox DownThemAll! al català. Com que l’he estada traduïnt des d’ubicacions públiques, entre examens i moltes vegades sense tenir ni instal·lada l’extensió original per a contrastar els textos, segurament contindrà força errades :-(   Per aquest motiu, deixaré doncs l’extensió en fase de Testing/QA per a anar-la revisant millor en els propers dies ;-)

He deixat l’extensió amb la versió catalana en la URL següent, per a qui li vulgui donar una ullada ;-)

http://www.softcatala.org/~gerard/dTA/downthemall!-1.0.3-fx+tb+sm.xpi

I, com sempre, qualsevol suggerència i/o crítica (constructiva), serà més que benvinguda :-)

Subscribe to my RSS feed

DownThemAll!: Potent gestor de descàrregues per al Firefox

Written by Gerard on 14 14UTC June 14UTC 2008 – 18:39 -

DownThemAll!, una extensió per al Firefox que implementa un potent gestor de descàrregues.

Permet, entre d’altres coses, descarregar tots els enllaços o imatges contingudes en una pàgina web, aturar i reprendre les descàrregues i, el que m’ha semblat ara mateix més interessant i, el motiu pel qual m’he topat amb ell: Que suporta la gestió de fitxers de tipus metalink :-) (a partir de la versió 1.0).

Veig que no hi ha la traducció al català, malgrat sí n’està ja al castellà o al gallec així que… m’he apuntat a traduir-la via BabelZilla ;-)

Subscribe to my RSS feed