You are not logged in.

#1 2011-12-27 01:55:53

prash
Member
Registered: 2011-08-18
Posts: 57

[solved] a "permanent" home for srcdir, via makepkg

I use a very low-bandwidth connection at home... it is as good as dial-up. When updating packages from AUR, I see many of them get a lot of data via git and hg. Some remember to limit the data using --depth=1, and some don't -- but that's beside the point Currently, I see that it is all downloaded to a directory in /tmp, and deleted soon after the package is installed. Some other packages download the source tar, and build from it. If there is any error in building it, it deletes all that it has done, and I have to download it again to attempt to fix it.

3 questions:
1. In makepkg, if I set the srcdir to /usr/src, and remove the rm -rf $srcdir, are there any downsides to doing this? (... besides the fact that I would have to clean up /usr/src for old and/or deleted packages myself, and that an update to pacman will over-write my changes.)
2. Can the pacman source be changed to make this a configuration option? (... defaulting to srcdir in /tmp.)
3. Or even better... can yaourt be changed to have an --import option for updates?

I could have gone ahead and made the change (in 1) on my own system... but I am quite new to Arch, and am not aware of the various interdependencies. I did not want to risk running ahead with this and cluttering up (or nuking)  my system beyond repair.

Last edited by prash (2011-12-30 04:36:17)

Offline

#2 2011-12-27 02:23:51

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] a "permanent" home for srcdir, via makepkg

I'm not sure I get what you mean, let's see ...
#1. Do you mean SRCDEST? You can keep these files in ~/<somedir> too. Why would update to pacman overwrite your changes? What changes do you mean?
#2. pacman deals with binary packages, makepkg is used for building them. I think the makepkg option is all you need.
#3. What would that option do? https://bbs.archlinux.org/viewtopic.php … 9#p1003419 ?


Maybe related: https://wiki.archlinux.org/index.php/Us … S_overhaul

Last edited by karol (2011-12-27 02:27:45)

Offline

#3 2011-12-27 02:59:48

prash
Member
Registered: 2011-08-18
Posts: 57

Re: [solved] a "permanent" home for srcdir, via makepkg

#1b. I meant it will overwrite changes I make to makepkg... because makepkg is part of the pacman package. But I am not too worried about that. I don't mind making these changes (to makepkg) myself every time.

#1a. Is it SRCDEST? I looked into makedeps only today... I have no idea. At the moment, updating libsvg from AUR, I see that I have the folder /tmp/yaourt-tmp-prash/aur-libsvg. Aborting the install when I had to enter the password deleted all that it had downloaded and all that it had built. Yaourt had to download it and build it afresh. I guess that both yaourt and makepkg are invloved in deleting all that was downloaded and built. I would like it to retain all the contents of /tmp/yaourt-tmp-prash. Yaourt gives me the option of using something other than /tmp, but there is not much point to it because it gets deleted anyway.

#2. I agree... I mentioned pacman because makepkg is part of that package. It would be nice if I didn't have to modify makepkg every time.

#3. No... I did not mean the --devel option to yaourt: that will only check if there is something fresher on the source repository. What I want is a way to get only the deltas... instead of the whole repository (albeit depth=1) each time -- and this would be possible only if a previous install had not deleted the older download.

Offline

#4 2011-12-27 03:10:35

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] a "permanent" home for srcdir, via makepkg

It won't overwrite your changes because makepkg.conf is in the backup array ('Backup Files' at the bottom)

[karol@black ~]$ pacman -Qii pacman
Name           : pacman
Version        : 4.0.1-1
URL            : http://www.archlinux.org/pacman/
Licenses       : GPL
Groups         : base
Provides       : None
Depends On     : bash  glibc>=2.14  libarchive>=2.8.4  curl>=7.19.4  gpgme
                 pacman-mirrorlist
Optional Deps  : fakeroot: for makepkg usage as normal user
Required By    : expac-git  nosr-git  package-query-git  packer  pacman-contrib
                 pacmanxg-bin  pkgstats  yaourt-git
Conflicts With : None
Replaces       : None
Installed Size : 3412,00 KiB
Packager       : Dan McGee <dan@archlinux.org>
Architecture   : i686
Build Date     : pon, 21 lis 2011, 05:04:37
Install Date   : pon, 21 lis 2011, 21:24:59
Install Reason : Explicitly installed
Install Script : Yes
Description    : A library-based package manager with dependency support
Backup Files:
MODIFIED	/etc/pacman.conf
MODIFIED	/etc/makepkg.conf

so the new config will be created as makepkg.conf.pacnew - https://wiki.archlinux.org/index.php/Pa … save_Files


Yaourt has its own configs. You can tell yaourt to build somewhere else, use --tmp commandline switch or edit /etc/yaourtrc, uncomment and change
#TMPDIR="/tmp"
to somewhere else.

Offline

#5 2011-12-27 03:18:59

prash
Member
Registered: 2011-08-18
Posts: 57

Re: [solved] a "permanent" home for srcdir, via makepkg

I missed the final link to the Makepkg overhaul... that is quite related to what I meant smile. Especially FS#8890... what I had in mind was a bit more offliney than that... libsvg, for example, provides a tarball... which was deleted when I hit Ctrl-C instead of entering the password to install the newly built package. The next time around, the tarball had to be downloaded again. FS#19459 talks about a unified VCS mechanism... where they say "If vim already exists, pull new revisions from the source and update the repository to rev 1290"... I don't see how this would work unless the checkout directory is in some kind of "permanent" place.

But, I get the impression that this is being worked on... that's good news for me! In the mean time, I'll play with makepkg and yaourt and see how things go. Thanks!

Offline

#6 2011-12-27 03:32:13

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] a "permanent" home for srcdir, via makepkg

As I'm sure you've noticed FS#8890 has just turned four, so don't hold your breath for it to be resolved anytime soon. As Dan (our dev) said in the comments to that report: patches welcome. Seems no one cares enough for this feature to work on it.

Offline

#7 2011-12-27 03:35:29

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [solved] a "permanent" home for srcdir, via makepkg

prash wrote:

I missed the final link to the Makepkg overhaul... that is quite related to what I meant smile. Especially FS#8890... what I had in mind was a bit more offliney than that... libsvg, for example, provides a tarball... which was deleted when I hit Ctrl-C instead of entering the password to install the newly built package. The next time around, the tarball had to be downloaded again. FS#19459 talks about a unified VCS mechanism... where they say "If vim already exists, pull new revisions from the source and update the repository to rev 1290"... I don't see how this would work unless the checkout directory is in some kind of "permanent" place.

But, I get the impression that this is being worked on... that's good news for me! In the mean time, I'll play with makepkg and yaourt and see how things go. Thanks!

This all wreaks of you not actually using makepkg, but some sort of perverted wrapper around it. makepkg won't delete anything like you're describing.

Offline

#8 2011-12-27 03:42:49

prash
Member
Registered: 2011-08-18
Posts: 57

Re: [solved] a "permanent" home for srcdir, via makepkg

I hadn't noticed the date neutral. I can see why no one cares enough to make it work... I too have been taking the easy way out with a few packages... checking them out (independent of PKGBUILD) to my own src directory and updating them en masse.

Last edited by prash (2011-12-27 03:47:44)

Offline

#9 2011-12-27 03:45:39

prash
Member
Registered: 2011-08-18
Posts: 57

Re: [solved] a "permanent" home for srcdir, via makepkg

@falconindy
I see! I will look into that soon. Thanks for the pointer.

Offline

#10 2011-12-27 08:08:46

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: [solved] a "permanent" home for srcdir, via makepkg

@falconindy: I had to read it three time for not reading "perverted rapper"

@topic: I don't see where yaourt deletes it's sources in /tmp. /tmp gets flushed on every reboot (either because it's /tmp or because it's in tmpfs).

Offline

#11 2011-12-27 09:55:25

prash
Member
Registered: 2011-08-18
Posts: 57

Re: [solved] a "permanent" home for srcdir, via makepkg

@Awebb and @falconindy: Looking through yaourt scripts, I do get the impression that yaourt does not delete it and I did find ' rm -rf "$pkgdir" "$srcdir" ' in makepkg clean_up function. I wasn't talking about what goes away on each reboot... I was talking about what goes away each time I finish installing a package (aur-libsvg in my example above). I have tried assigning the TMPDIR to a something on my disk -- makes no difference.

But, I admit, I haven't done a PKGBUILD only (sans yaourt) install ever since I installed Arch for the first time a few months ago. I still have to look into that.

Last edited by prash (2011-12-27 10:13:42)

Offline

#12 2011-12-29 00:14:11

prash
Member
Registered: 2011-08-18
Posts: 57

Re: [solved] a "permanent" home for srcdir, via makepkg

Installs without yaourt, and directly from makepkg+pacman has solved my problem. Thanks guys!

Offline

#13 2011-12-29 23:16:49

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] a "permanent" home for srcdir, via makepkg

Please remember to mark the thread as solved.

Offline

#14 2011-12-30 04:00:11

prash
Member
Registered: 2011-08-18
Posts: 57

Re: [solved] a "permanent" home for srcdir, via makepkg

Who, me? I don't see anything I can click to do that. Sorry... I'm still quite new to these forums.

Offline

#15 2011-12-30 04:31:21

headkase
Member
Registered: 2011-12-06
Posts: 1,986

Re: [solved] a "permanent" home for srcdir, via makepkg

prash wrote:

Who, me? I don't see anything I can click to do that. Sorry... I'm still quite new to these forums.

Edit your first post and that will let you edit the title as it is seen in the forum.  Pre-pend "[solved]" to it in the title.  This will not only help Archer's here know that they can focus elsewhere but also really helps people who are googling an answer and see your "solved" pointing them the way.. wink

Offline

#16 2011-12-30 04:38:17

prash
Member
Registered: 2011-08-18
Posts: 57

Re: [solved] a "permanent" home for srcdir, via makepkg

Thanks!

Offline

#17 2011-12-30 14:19:31

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] a "permanent" home for srcdir, via makepkg

@prash
Welcome to the forums.
Please read the forum rules https://bbs.archlinux.org/viewtopic.php?id=130309 :-)

Offline

Board footer

Powered by FluxBB