Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

FS#7462 - makepkg should remove src dir

Attached to Project: Pacman
Opened by Alex Heck (nesl247) - Tuesday, 19 June 2007, 02:48 GMT
Last edited by Dan McGee (toofishes) - Tuesday, 26 June 2007, 18:39 GMT
Task Type Bug Report
Category General
Status Closed
Assigned To Aaron Griffin (phrakture)
Dan McGee (toofishes)
Architecture All
Severity Medium
Priority Normal
Reported Version 3.0.4
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Summary and Info:
Sometimes a build will fail, and when you run makepkg again, it'll fail because the src dir wasn't cleaned.

makepkg should check if the package is git or svn or any of the other supported rcs systems, and remove src/$_rcsname-build (depends on the var for svn/git/etc).

If it's not an rcs build, it should remove the src dir completely, so that the build process is clean.

For those that don't want to re-extract, there is -e.

P.S. Please bump the reported version to 3.0.5...

Steps to Reproduce:
This task depends upon

Closed by  Dan McGee (toofishes)
Tuesday, 26 June 2007, 18:39 GMT
Reason for closing:  Won't fix
Additional comments about closing:  Closing at request of opener. It seems like the '-c' option should work in most cases, if not, use a 'rm -rf src/'.
Comment by Roman Kyrylych (Romashka) - Tuesday, 19 June 2007, 10:41 GMT
Isn't this a feature request for versionpkg?
Comment by Roman Kyrylych (Romashka) - Tuesday, 19 June 2007, 10:44 GMT
I think -c switch should work if build fails (if it does not work - then it should :-P but I guess this will be solved in 3.1 do_cleanup() anyway)
Comment by Dan McGee (toofishes) - Tuesday, 19 June 2007, 13:17 GMT
"makepkg should check if the package is git or svn or any of the other supported rcs systems..."

Guess what? makepkg supports ZERO of these. Why? KISS. Sure, you can write a PKGBUILD to use them, but that isn't our issue. This sounds like a versionpkg deal or something else, but not ours. Removing the src/ directory all the time is also a bad idea, as recompiling after changing one configure flag would require you to rebuild a whole project, even if some cached files could still be used, etc.
Comment by Alex Heck (nesl247) - Tuesday, 19 June 2007, 16:09 GMT
Oops, meant this as a feature request, and no, not for versionpkg. I was asking more for the removal of the src dir. But figured if you're going to do that, add a conditional to see if it's an rcs setup, so that the user doesn't have to recheckout through the rcs system.

And removing src directory is usually a good idea. It always provides a clean build environment, and if people DON'T want to remove it, that's why there is the -e --noextract option anyways. Quite useless IMO if nothing removes the directory.

And there are a lot of pkgbuilds which patch a directory, thus it should remove the directory. Look at any of the kernels for example. They'll fail when you go to rebuild them if you stop a compile, or if it fails. At least they have for me the 5 or 6 times I've build them.
Comment by Dan McGee (toofishes) - Tuesday, 19 June 2007, 16:18 GMT
The patch program has an -N option which should probably be used in most PKGBUILDs. If I want to rebuild a kernel with one new patch, should I really have to throw away the thousands of other object files that didn't change?

I might be playing devil's advocate a bit here, but I also don't see 'rm -rf src/' as being all that worthy of being added to makepkg.
Comment by Alex Heck (nesl247) - Tuesday, 19 June 2007, 16:23 GMT
It is added to the kernels, yet I still have issues if I don't remove the src dir.

At least if you won't make it by default, how about an option to remove it. Can't hurt, would solve the feature request. If you're set against it though, close the bug, no reason for further discussion. I can only request, it's up to you to grant it or not.
Comment by Dan McGee (toofishes) - Tuesday, 19 June 2007, 16:40 GMT
Is there anyway you can provide a proposed patch for this fix? I guess my biggest issue here is twofold:
1. I'm not sure adding it will please everyone- I think there are a lot of people that like that src/ dir sticking around at times.
2. Doing this probably isn't a simple one line addition to makepkg, and I want to make sure I understand exactly what you are looking for here.

Once again- it isn't that I am completely against this feature, but I'm not sure why the -c flag, as Roman mentioned, doesn't do what you want. Take a look at the makepkg in GIT which calls do_cleanup() on every failure, and should take into account the use of this flag whether cleaning up in the end or after a failure.

http://projects.archlinux.org/git/?p=pacman.git;a=blob;f=scripts/makepkg.in;h=001179d08abf7302032be0f99271990e61628f95;hb=HEAD
Comment by Alex Heck (nesl247) - Tuesday, 19 June 2007, 16:45 GMT
I guess there's no true purpose in the end.

-c works if you're not expecting and bugs in the build, but if you do, you can't look at the source, until you start and build it again without it.
On the other hand, you wouldn't use -c unless you knew it was going to build properly.
Comment by Dan McGee (toofishes) - Tuesday, 26 June 2007, 16:09 GMT
Are you proposing this can be closed then?
Comment by Alex Heck (nesl247) - Tuesday, 26 June 2007, 18:21 GMT
Yes

Loading...