You are not logged in.

#1 2006-07-10 10:06:38

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

confused about location of files in sources array

Recently i made a simple looking package for a binary application (sfarkxtc) .

No license was included, so i had to find the license on the website and copy it to a textfile.

I put that file in the same folder as the pkgbuild and it got installed fine.
Snowman pointed out i should put the file in the sources array, and i did.

let's see what happens when you want to install this package :
you download the tarball from the AUR and extract it to a folder
this is what's in that folder

PKGBUILD  license

after executing makepkg you see this :

PKGBUILD  filelist  license  pkg sfarkxtc-1.03-3.pkg.tar.gz  sfarkxtc_lx86.tar.gz  src

let's look at the src folder

license  sfarkxtc  sfarkxtc_lx86.tar.gz

In other words, all files in the sources array are now present in both
$startdir
and $startdir/src

the main difference is that $startdir holds the original files, $startdir/src holds (possibly changed) copies with the same name.

This takes up extra hdd space for these files and is confusing.


Would it be possible to avoid this through a change in makepkg or should we just add an explanation of this to the Wiki entries for makepkg ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#2 2006-07-10 20:10:17

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: confused about location of files in sources array

I'll try to clarify.
The source array should contain everything that is needed to create the package except the .install file because it's a special file handled by the install field. When you run makepkg, it will first look in /var/cache/pacman/src for the files in the source array. BTW, I will usually move the source there as it's more convenient. If the files are not there, it will the look in $startdir (not sure about the order). If the files are not there they will be downloaded if they have an url.
After, it will copy them in $startdir/src where they will be uncompressed and where the compilation will take place. So the source in $startdir and $startdir/src are identical.

Of course, you will have 2 copies of the compressed source and it takes extra hd space. When compiling, you create object files and other temporary files and they will take hd space also. In fact, after a successful build, you will have 3 copies of the apps/libs: one in $startdir/src, one in $startdir/pkg and one compressed in the package. It can take a lot of hd space to build a package but the $startdir/src and the $startdir/pkg directories are temporary directories that can be remove after the build.
Makepkg even has a switch to remove them after a successful build.

Let me know if you still have questions. Feel free to wikify this.

Offline

#3 2006-07-14 11:42:40

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: confused about location of files in sources array

I've checked makepkg and this is the order it uses :
1st         Build dir 
2nd        /var/cache/pacman/src
3rd        download remaining files if necessary

Thanks for the explanation snowman, i intend to wikify it this weekend.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB