[pacman-dev] pkgsum - Checksum package files against installed files

Nezmer git at nezmer.info
Mon Nov 8 16:12:16 CET 2010


On Mon, Nov 08, 2010 at 02:11:52PM +0100, Andre Osku Schmidt wrote:
> On Sat, Nov 6, 2010 at 10:06 PM, Nezmer <git at nezmer.info> wrote:
> > 1) Use another name than pkgdir as It's used in makepkg. Also use
> > localstatedir instead of hard-coding /var.
> 

Note: I'm just a user. I'm not an authority here. And what I say is not
necessarily accurate.

> yeah, but how do i find out which global variable names i cant use?
> (btw. i didn't even think on using this while makepkg runs)
> 


I suggested this merely to avoid any confusion.

> should i rather do this as function and use local variables?
> (i assume $tmpdir is too generic an probably used by someone else too)
> 
> what is 'localstatedir'? here its not a command nor a variable.
> 

If your script is going to be included in the pacman tree. People would
expect it to just work no matter what platform/settings they use.

localstatedir is a variable like prefix,libdir ...etc

localstatedir is '/var' in Arch. But It might be '/usr/local/var' or any
other dir elsewhere.

Using '@localstatedir@' instead of '/var' in your script should suffice.
Of course you would have to add the script to a dir in the pacman tree
(maybe contrib) and edit Makefile.am to include your script.



> 
> > 2) Use openssl for getting the md5sums.
> 
> why?

* Used in makepkg and repo-add.
* Portable (e.g: In FreeBSD the command is md5 not md5sum).


> 


More information about the pacman-dev mailing list