[wpkg-users] Disable download switch and config options

Marco Gaiarin gaio at sv.lnf.it
Mon May 16 12:29:04 CEST 2011


Mandi! Rainer Meier
  In chel di` si favelave...

> Thanks for your analysis.

I'm proud to contribute to WPKG! ;-)


> I will have a look at the issues. Unfortunately the
> download feature is not very widely used and therefore I fully believe that
> there are some bugs with it.

As many things, only when used get broken and fixed. ;-)


> I personally rather think about extending the download feature slightly instead
> of providing a switch to disable downloads globally but keeping them in package XML.
> - WPKG might support a flag in a download tag to disable removal after
>   installation.
> - WPKG might by default not re-download files which already exist on download
>   target.

Ok. a doubt on the first one, see later.


> (- WPKG might verify MD5/checksum of downloaded file to check whether download
>    was successful; requires some more effort)

I remember vaguely that (w|c)script have no hash function
implementation internally, so it is need to use an external program or
a pure script hash implementation (that probably get sloooooowwww....).

But consider that implementing a 'check if just download' function
without hash can be really dangerous... and hash check are generally
useful, not only on download.


Anyway, because was easy and i need that, i've implemented the master switch.
Patch attached.
It is my first wsh exercise, and really i've not understood if
isNoDownload() function are needed or not.

Not to master my dumb work, but i think that a master switch is still
useful. On sites where i propagate updates by the way of other mean, i
know that there's no need for download... so it make little sense to do
checks.

Generally speaking, download/nodownload for me are a ''site switch'',
not a package switch; so disable or enable checks as a package level
can be useful in theory, but i think in practice the decision to
download (and check) are taken at ''site'' level (eg, config.xml or
wpkg.js switch).


> For sure the exit code shall be dependent on the install state, not on download
> state. I will verify it too.

Many thanks!

-- 
dott. Marco Gaiarin				    GNUPG Key ID: 240A3D66
  Associazione ``La Nostra Famiglia''                http://www.sv.lnf.it/
  Polo FVG  -  Via della Bontà, 7 - 33078  -  San Vito al Tagliamento (PN)
  marco.gaiarin(at)sv.lnf.it	  tel +39-0434-842711  fax +39-0434-842797

		Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA!
	   http://www.lanostrafamiglia.it/chi_siamo/5xmille.php
	(cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wpkg.diff
Type: text/x-diff
Size: 1801 bytes
Desc: not available
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20110516/036c8585/attachment-0002.diff>


More information about the wpkg-users mailing list