[Mageia-sysadm] [295] - properly set each rpm macros at import

Olivier Thauvin nanardon at nanardon.zarb.org
Fri Jan 14 18:40:16 CET 2011


* Olivier Blin (mageia at blino.org) wrote:
> nicolas vigier <boklm at mars-attacks.org> writes:
> 
> > On Fri, 14 Jan 2011, root at mageia.org wrote:
> >
> >> - properly set each rpm macros at import
> 
> [...]
> 
> >>      def unpack(self, topdir):
> >> -        execcmd("rpm -i --define '_topdir %s' %s" % (topdir, self.filename))
> >> +        execcmd("rpm -i --define '_sourcedir %s/SOURCES' " + 
> >> +        "--define '_specdir %s/SPECS' --define '_patchdir %s/SPECS' %s"
> >> +        % (topdir, topdir, topdir, self.filename))
> >
> > _patchdir in SPECS dir now ?
> 
> And why not keep using topdir ?

Because:

[olivier at volantis trunk]$ grep _sourcedir ~/.rpmmacros
%_sourcedir %(echo `pwd`/SOURCES)

Which make the mgarepo to fail and writing where I don't want.

But in this case, why is it used in the same software elsewhere ? :)
MgaRepo/rpmutil.py:    sourcedir = "--define '_sourcedir %s/%s'" % (tmpdir, "SOURCES")
MgaRepo/rpmutil.py:            (sourcecmd, topdir, builddir, rpmdir, sourcedir, specdir,

Regards.

> 
> -- 
> Olivier Blin - blino
> _______________________________________________
> Mageia-sysadm mailing list
> Mageia-sysadm at mageia.org
> https://www.mageia.org/mailman/listinfo/mageia-sysadm
-- 

Olivier Thauvin
CNRS  -  LATMOS
♖ ♘ ♗ ♕ ♔ ♗ ♘ ♖
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: </pipermail/mageia-sysadm/attachments/20110114/e1ef4ec6/attachment.asc>


More information about the Mageia-sysadm mailing list