Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add -A suboption that allows /src folders to be preserved somewhere #20

Closed
fosskers opened this issue Sep 12, 2012 · 11 comments
Closed

Comments

@fosskers
Copy link
Owner

For people who have slow internet and don't want to be cloning git hub repos over and over. This request comes from zxo0oxz on reddit.

@hkupty
Copy link
Contributor

hkupty commented Nov 27, 2012

Wouldn't it be better if this was the default behaviour? AFAIK this is what pacman does.
In this case, the suboption would make the source not persisted...

@fosskers
Copy link
Owner Author

Note that aura already preserves built packages in the pacman package cache. He wanted this option so that aura could save and then sense already cloned git repos, so that when rebuilding something the cloning wouldn't have to occur again.

@hkupty
Copy link
Contributor

hkupty commented Nov 28, 2012

I, personally, have encountered many situations where I need to re-download files over and over again through builds using aura (specially when building nvidia bumblebee drivers, which has even the same file). I wouldn't complain if it's a suboption instead of the default behavior.

In any case, I would like to do this patch.. Note that I'm starting to handle Haskell and, since this is a low priority request, I find it both educationally challenging and rewarding to help with this task :)

@fosskers
Copy link
Owner Author

If you can figure everything out, then by all means! I'd be happy to have your contribution.

@fosskers
Copy link
Owner Author

It might be a good idea to create a directory for each cloned repo, named by its package name and version number, then store that somewhere in /var, perhaps? Upon the use of the -A suboption, it'll check for the appropriate folders and then just build out of there, or copy to the cache first and then build.

Normal building occurs within temporary directories within the pacman package cache. It's probably a good idea to be consistent.

@hkupty
Copy link
Contributor

hkupty commented Nov 30, 2012

Well, I just cloned the repo. I've got some questions before start working:

  1. If I stick to pacman's cache dir, when cleaning cache will this files be deleted? If so, I can put this folder below pacman cache dir and have it auto-cleaned by -Scc.
  2. I see this feature as a 'persist package' suboption - not only for git repo but also for any package, am I right?

Anyway, I'm starting to read the code to figure out how to implement it.

@fosskers
Copy link
Owner Author

  1. Those temp files in the package cache are automatically deleted after building.
    If you're going to be manually copying the src folders somewhere, I'd recommend:
    /var/cache/aura/source or something similar. I'm creating new features that will be saving things in /var/cache/aura so it might be handy for you to use that as well.
  2. Packages built by aura (the .pkg.tar.gz files) are automatically copied to the package cache, but the source files are all deleted. I suppose you could implement the option to save all source files, yeah.

Aura is getting bigger all the time and the code is pretty split up. You'll probably want to check out Aura/AuraLib.hs. There is a section titled THE WORK which has functions named buildPackages and build. Understanding those could be key to the enterprise.

Also note that I'm planning a major break up of AuraLib.hs, because it's a huge beast. I'm going to split it into Aura/General.hs and Aura/Build.hs. This split may or may not occur for version 1.1.

@fosskers
Copy link
Owner Author

fosskers commented Dec 1, 2012

@hkupty I had a pretty free day today and got a lot of work done. One of the things I got done was the break up of Aura/AuraLib.hs. It's now three separate libraries, General Build and Dependencies. Where you'll want to be looking now is probably in Build.

@hkupty
Copy link
Contributor

hkupty commented Apr 3, 2013

I beg you pardon for this huge gap between my last contact and now... Life had been pretty tough and a bit messed up in the last months... I'll probably be able to develop this feature from this weekend on..

Once again, I sorry for leaving you waiting for so long.. I feel pretty bad about it..

@fosskers
Copy link
Owner Author

fosskers commented Apr 4, 2013

Don't worry man. I'm not mad or anything, haha. If you have any questions about the code, let me know.

@nc6
Copy link
Contributor

nc6 commented Apr 10, 2013

It would be useful to have this also for the upcoming 'M' option to build from the ABS, although I was thinking of using the --allsource option to makepkg to generate full source packages. These could then be untarred next time around, though.

nc6 added a commit to nc6/aura that referenced this issue Apr 10, 2013
This option causes makepkg to generate complete source packages
for any built packages, as if using the '--allsource' option to
makepkg directly. Source packages are stored in /var/cache/aura/src.

This could potentially be useful for issue fosskers#20, although that would
need the other side as well - spotting that an old source package
exists and decompressing it for use when rebuilding.

There's also some bits of necessary support for invoking makepkg's
'-S' flag, which creates a source tarball suitable for upload to the
AUR, but I don't see this as especially useful for AURA, so at the
moment it's not complete.
@fosskers fosskers added Aura2 and removed Outsourced labels May 22, 2014
@fosskers fosskers removed the Aura2 label Jun 27, 2018
@fosskers fosskers closed this as completed Jul 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants