You are not logged in.

#1 2018-08-14 08:04:57

soylens
Member
Registered: 2018-08-12
Posts: 8

Questions on the reusage of the ABS repos

I have recently come across a problem considering the reusage of ABS repos.
I personally use git along with asp for this task.
After a complete cycle as mentioned by the wiki (in my case the linux package),

$ asp checkout linux && cd linux/trunk
$ makepkg --verifysource
$ <several customization>
$ makepkg

There now exists several directories containing the sources and side product of the build process, which unsurprisingly gets in the way of updating the repo, git won't pull for the existent unstaged changes.
Now the case is that I do not want to discard the repo and start over because the kernel source tree is huuuuuuge and the is also capable of performing an incremental update.
The thing I would like to ask is that which of the following solutions is preferred by the Arch Build System, and whether it is preferred to reuse the repo instead of discarding it and check out a new one.
1. Use a .gitignore file that includes the source repo and *.pkg.tar.xz
  I do not know if this screws with the source tree and prevent it from updating itself, for .gitignore in parent directories are also processed by git
2. Move the excessive stuff elsewhere, pull the ABS repo ,move/link the source tree back, do the modifications all over again.
  This is the most safe way I can come up with
3. Do not pull ABS repos whose source is managed by git as they update themselves
  I've seen it done by systemtap-git(AUR) when it updates its version in PKGBUILD automatically after pulling the source tree, but I am not sure how it is done and it is probably not safe.

Last edited by soylens (2018-08-14 08:15:22)

Offline

#2 2018-08-14 13:31:15

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Questions on the reusage of the ABS repos

several directories containing the sources and side product of the build process, which unsurprisingly gets in the way of updating the repo, git won't pull for the existent unstaged changes.

What???

This has absolutely nothing to do with each other.

`git add -u` will only add your modifications to be checked into git. `git pull --rebase` will revert your commits, pull updates, then re-apply your commits on top. git checkout HEAD PKGBUILD will revert local modifications to the PKGBUILD to allow git pull to work in the event that a pkgver() function modified the PKGBUILD, but this is only relevant to AUR packages as repository packages are not permitted to change their pkgver like that.

gitignore files serve no purpose other than to prevent `git add .` from blindly adding even more things blindly than you originally intended to... but it still won't get in the way of `git pull --rebase`.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#3 2018-08-14 13:39:43

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,530
Website

Re: Questions on the reusage of the ABS repos

Eschwartz wrote:

This has absolutely nothing to do with each other.

Or with the ABS.  This is just git usage 101.

But something esle doesn't add up: soylens, you mentioned the linux source being a lot to download.  But all your comments are about changes that might conflict with a new `git pull`.  `git pull` will get the newest PKGBUILD and  a couple hooks and patches.  These are quite small.  Are you modifying these files, or are you making changes to the kernel source that is downloaded and extracted by makepkg?  The latter is not managed by git at all (for the package in question at least).


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2018-08-14 13:42:51

soylens
Member
Registered: 2018-08-12
Posts: 8

Re: Questions on the reusage of the ABS repos

What I mean is that I do not know if I should move the source tree away, pull, and move it back, or get a .gitignore for it. Since both are viable, I wonder which one is recommended.
I admit that I do not know git very well.

Last edited by soylens (2018-08-14 14:08:01)

Offline

#5 2018-08-14 14:01:19

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,530
Website

Re: Questions on the reusage of the ABS repos

soylens wrote:

What I mean is that I do not know if I should move the source tree away, pull, and move it back, or get a .gitignore for it. Since both are viable ...

What I mean is that you haven't clarified what you are modifying.  Are you modifying just the build files from the ABS, or the kernel source itself?

As for "both being viable" that's not true at all.  .gitignore for the source tree would have no impact at all on whether a git pull would succeed.  The kernel source is not tracked by git.

Describe what you are actually doing and show the actual errors you are seeing.

Last edited by Trilby (2018-08-14 14:02:34)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2018-08-14 14:04:28

soylens
Member
Registered: 2018-08-12
Posts: 8

Re: Questions on the reusage of the ABS repos

Trilby wrote:

What I mean is that you haven't clarified what you are modifying.  Are you modifying just the build files from the ABS, or the kernel source itself?
Describe what you are actually doing and show the actual errors you are seeing.

I am only modifying the configurations and PKGBUILD yet, and I have not yet encountered any error other than git pull saying untracked files and unstaged modification, because I cannot yet decide what I should do with the files generated during the makepkg process.

Last edited by soylens (2018-08-14 14:07:13)

Offline

#7 2018-08-14 14:05:50

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,530
Website

Re: Questions on the reusage of the ABS repos

There is no need to quote everything on every reply.  Quote to reply to a specific statement, or for emphasis - for example:

Trilby wrote:

show the actual errors you are seeing.

https://bbs.archlinux.org/viewtopic.php?id=57855

Last edited by Trilby (2018-08-14 14:08:13)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB