FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

LinkBack Thread Tools
Old 11-13-2009, 06:21 AM
"Ciprian Dorin, Craciun"
Default makepkg enhancements: globstar and variable expansions in PURGE_TARGETS, MAN_DIRS, etc.

Hy everybody!

While building some custom packages for a stripped down Linux
server, I've hit the following problems:
* the cause of the problems is from the pact that my packages are
each in it's own folder like: /packages/bash--4.0--1,
/packages/busybox--1.15.2--1, etc., and thus,
as I have no way to use ${pkgname}, etc in there;
* in PRUNE_TARGETS there is no way to specify file patterns (like
'*.a', or '*.la'), but only from certain folders; (for example I can
say '*.a', but not '../lib/*.a'; also I can not specify unknown number
of parents, like '.../lib/**/*.a';

As a consequence, I propose (and if accepted I also have the
patches for) the following enhancements:
* allow the patterns in MAN_DIRS, etc. to be evaluated at the
proper time execution time (when we access MAN_DIRS), not at
configuration time (when we define MAN_DIRS); this can be achieved by
(single) quoting the patterns like:
'package/${pkgname}--${pkgver}--${pkgrel}/{,share/}man' and then
expansion by using eval;
* allow enhanced pattern types for PURGE_TARGETS, like:
* the same lazy evaluation as above;
* if a pattern starts with '=' then it must exactly match a file name;
* if a pattern starts with '+' then it is a glob pattern (or
globstar), like:
* if a pattern ends with '/' then we use `rm -Rf`, else we use `rm -f`
* maybe if a pattern starts with '@' then it is a regular
expression, etc. (this I have not implemented);

Any comments?

Also one more question: just before packaging we remove the pkg
folder. Shouldn't we also do the same with src when rebuilding a
package? (We are re-extracting the contents of archives, but some
packages leave garbage behind when building, and this garbage could
interfere with a new build...)


Thread Tools

All times are GMT. The time now is 06:47 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org