FS#10559 - makepkg ignores SRCDEST when running 'makepkg --source'

Attached to Project: Pacman
Opened by Vlad George (DonVla) - Monday, 02 June 2008, 00:22 GMT
Last edited by Allan McRae (Allan) - Wednesday, 09 September 2009, 10:40 GMT
Task Type Bug Report
Category makepkg
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 3.1.4
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Summary and Info:
makepkg ignores SRCDEST when running 'makepkg --source'

Steps to Reproduce:
set PKGDEST and SRCDEST; run 'makepkg --source' in build directory; src.tar.gz file is copied to PKGDEST.
solution:
in "create_srcpackage" function line 967 set
"local pkg_file="$PKGDEST/${pkgname}-${pkgver}-${pkgrel}${SRCEXT}""
to
"local pkg_file="$SRCDEST/${pkgname}-${pkgver}-${pkgrel}${SRCEXT}""
This task depends upon

Closed by  Allan McRae (Allan)
Wednesday, 09 September 2009, 10:40 GMT
Reason for closing:  Not a bug
Additional comments about closing:  See comments
Comment by Dan McGee (toofishes) - Monday, 02 June 2008, 00:32 GMT
This isn't really a bug, but an unfortunate naming conflict if you ask me. SRCDEST is meant for package sources (aka the stuff not built by makepkg, but downloaded). PKGDEST is meant for the stuff built by makepkg. In the --source case, a src.tar.gz just happens to be a bit different than a pkg.tar.gz, and both end up in PKGDEST.

Does anyone else have thoughts? When I originally wrote this I definitely did this (put the built source package in PKGDEST) on purpose.
Comment by Vlad George (DonVla) - Monday, 02 June 2008, 00:33 GMT
hello again,

or change it to
"local pkg_file="${SRCDEST:-$PKGDEST}/${pkgname}-${pkgver}-${pkgrel}${SRCEXT}""
vlad
Comment by Vlad George (DonVla) - Monday, 02 June 2008, 00:40 GMT
src.tar.gz is significantly different than a pkg.tar.gz file since it contains only PKGBUILD, install file and, if source code is in local directory, the source code;
pkg.tar.gz is the package.
"... and both end up in PKGDEST."
then why two different directories (SRCDEST, PKGDEST)?
Comment by Dan McGee (toofishes) - Monday, 02 June 2008, 00:41 GMT
That doesn't address my point, however. This is how I see the two variables:
SRCDEST: the destination for files makepkg needs to build packages (aka downloaded source)
PKGDEST: the destination for archives built by makepkg (aka binary & source packages)

I define both in my makepkg.conf, and that doesn't mean I want my src.tar.gz *built* packages to end up in SRCDEST.
Comment by Vlad George (DonVla) - Monday, 02 June 2008, 00:45 GMT
ok, then i misunderstood the meaning of SRCDEST.
i'll close this since it's no bug at all.
thanks,
vlad
Comment by Dan McGee (toofishes) - Monday, 02 June 2008, 00:47 GMT
The alternative would be to add another (optional) variable to makepkg that would act similar to your comment: SRCPKGDEST or something, which would be used for the src.tar.gz destination if defined, or we would just fall back to PKGDEST and then the local directory otherwise.
Comment by Vlad George (DonVla) - Monday, 02 June 2008, 00:53 GMT
No,no
I think it's ok the way it is.
Though the name SRCDEST is misleading, CACHEDIR will fit better.

vlad
Comment by Dan McGee (toofishes) - Monday, 02 June 2008, 00:56 GMT
SRCDEST has been around forever, that isn't changing. --source is new with 3.1.x.
PKGDEST has also been around forever, so that isn't changing.
I think a third variable would be OK if people actually used this --source option. Any thoughts? So far we are +1/-1.
Comment by Vlad George (DonVla) - Monday, 02 June 2008, 01:00 GMT
I'm using '--source' all the time.
I think it's very useful. Is it so "controversial"?
Comment by eliott (cactus) - Monday, 02 June 2008, 01:03 GMT
> The alternative would be to add another (optional) variable to makepkg that would act similar to your comment: SRCPKGDEST or
> something, which would be used for the src.tar.gz destination if defined, or we would just fall back to PKGDEST and then the
> local directory otherwise.

This seems like a good idea to me. I especially like the fallback option for simplicity when you don't need/want alternate target directories.
Comment by Allan McRae (Allan) - Tuesday, 03 June 2008, 08:57 GMT
I am not against adding the extra variable, if only to clarify the naming conflict. I can see some use for this, but I doubt it will be widespread.
Comment by Allan McRae (Allan) - Saturday, 27 December 2008, 06:03 GMT
I'm flagging this as a good patch for first time contributors. I have no motivation to implement this but won't reject a patch that does...
Comment by Gavin Bisesi (Daenyth) - Tuesday, 08 September 2009, 22:10 GMT
Is this still an issue with pacman 3.3?
Comment by Allan McRae (Allan) - Tuesday, 08 September 2009, 22:21 GMT
No-one submitted a patch so...
Comment by Vlad George (DonVla) - Tuesday, 08 September 2009, 22:38 GMT
Hi all,
afais there is no bug at all.
Dan McGee described this in his second post:
"
This is how I see the two variables:
SRCDEST: the destination for files makepkg needs to build packages (aka downloaded source)
PKGDEST: the destination for archives built by makepkg (aka binary & source packages)
"
I think a third variable would not change or help much here.

Loading...