[pacman-dev] Bug or feature? Nonexistent SRCDEST or PKGDEST

Allan McRae allan at archlinux.org
Tue Jan 7 03:58:28 EST 2014


On 07/01/14 18:33, William Giokas wrote:
> On Mon, Jan 06, 2014 at 10:37:22PM +0900, Emil Lundberg wrote:
>> Hello!
>>
>> While playing around with a package of mine, I noticed that the command
>>
>> $ SRCDEST=/tmp/emil/foo/src makepkg
>>
>> fails with error message "You do not have write permission to store
>> downloads in /tmp/emil/foo/src." if the directory does not already exist.
>> Likewise, setting PKGDEST to a nonexistent directory causes failure with
>> error message "You do not have write permission to store packages in
>> PKGDEST".
>>
>> I patched /usr/bin/makepkg to create the directories if necessary, and now
>> it works fine. Since it was so easy, and I imagine others have experimented
>> with the above environment variables, I am lead to ask: Is this behaviour
>> by design, or should I submit my patch?
> 
> I believe that it is a feature. It also does it with a few of the other
> 'DEST' variables, namely SRCPKGDEST and LOGDEST, as well as BUILDDIR. I
> consider this a feature. These directories are something that the user
> should keep maintained, and should not be dismantled or removed on a
> whim, with the exception of BUILDDEST. Even if you are using a directory
> in /tmp or some other temporary filesystem, you can use tmpfiles.d(5) to
> guide you on how to auto-create a directory or directories. I currently
> do this to save some disk activity on my SSD.
> 
> You can still submit the patch, however this has a -1 from me already.

I'm +/-0 on whether makepkg should create these, but there error message
in the case the directory does not exist could be changed.

Allan





More information about the pacman-dev mailing list