[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: SPEC and BUILD dirs not created



On Tue, Feb 13, 2001 at 09:55:26AM -0600, Ian Alexander wrote:
> When installing a srpm, the _spec dir is not created, if necessary;
> however the _src dir is.  And when building, the _build dir is not
> created if necessary.  Is this behavior considered proper, and if so
> why?  If not, I'll try to work on a patch; just let me know.
> 

The directories used at the end of a build (i.e. RPMS/<arch> and SRPMS) are
dynamically made because I got read the riot act by someone who blamed rpm
for wasting a couple of hours of their time building XFree86.

I typically build with everything in a single directory, and I use
the macro expansion of %{name} in the target directory path, as in
    %_topdir        /X
    %_ntopdir       %{_topdir}/%{name}
    %_builddir      %{_ntopdir}
    %_rpmdir        %{_ntopdir}
    %_sourcedir     %{_ntopdir}
    %_specdir       %{_ntopdir}
    %_srcrpmdir     %{_ntopdir}
    %_rpmfilename   %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
IIRC sources are installed before spec files, so that explains why
%{_sourcedir} but not %{_specdir} is made dynamically, for me, the
directories are the same.

That leaves %{_builddir} and %{_specdir} unmade during a build.

You can argue either way, that it's up to the packager to configure the
build system, or that rpm should make the directories dynamically. If
rpm, then rpm is implicitly "responsible" for making those directories, not
necessarily A Good Thing, YMMV.

There are other directory paths, like %{_tmppath} and %{_dbpath}
and ..., that might (or might not) be made dynamically as well. After
getting burned by doing an install with rpm --root that failed massively
because the directory %{_tmppath} dinna exist, that too is now made
dynamically.

OTOH, it's more than a little annoying cleaning up crud from a misconfigured
rpm making directories dynamically in various secret places, so I've been
cautious about making all directories on the fly. There's also the lurking
issue of making remote directories across FTP and such, but let's not go
there yet.

Put a patch in bugzuilla and I'll take a look.

It's not that big a deal. <shrug>

73 de Jeff

-- 
Jeff Johnson	ARS N3NPQ
jbj@jbj.org	(jbj@redhat.com)
Chapel Hill, NC





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []