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

Reuse repositories when updating #36

Closed
ruuda opened this Issue Sep 3, 2015 · 9 comments

Comments

Projects
None yet
3 participants
@ruuda
Copy link

ruuda commented Sep 3, 2015

If I understand correctly, currently PKGBUILDer can only do a clone, but not a pull. For an update, an existing repository is not reused by doing a pull, but instead one has to use the -c flag to remove the old repository and clone again. It would be great if instead of

==> Cloning the git repository...
==> ERROR: Directory <package> already exists, please run with `-c` to remove it.
  -> skipping package <package>

it would simply do a pull to get the latest version.

@Kwpolska

This comment has been minimized.

Copy link
Owner

Kwpolska commented Sep 4, 2015

It certainly makes sense, I’ll get that done soon.

@Kwpolska Kwpolska closed this in ebff6ab Sep 5, 2015

@Kwpolska

This comment has been minimized.

Copy link
Owner

Kwpolska commented Sep 5, 2015

Fixed on the develop branch, will make a release soon. New behavior:

  • if no directory exists, clone as usual
  • if directory exists and is a git repository, pull it and update
  • if directory exists and is not a git repository, skip this package
@ruuda

This comment has been minimized.

Copy link
Author

ruuda commented Sep 5, 2015

Awesome!

@Kwpolska Kwpolska modified the milestone: v4.2.3 Sep 6, 2015

Kwpolska added a commit that referenced this issue Sep 8, 2015

v4.2.3: bugfixes and improvements (#36 #37)
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@AladW

This comment has been minimized.

Copy link

AladW commented Jun 13, 2018

This is somewhat inconvenient since any diffs are lost after git pull is done. I guess you could git diff / git merge manually before running PKGBUILDer...

@Kwpolska

This comment has been minimized.

Copy link
Owner

Kwpolska commented Jun 13, 2018

Are you sure about that? git pull should not remove unstaged/uncommitted changes from your working copy.

@AladW

This comment has been minimized.

Copy link

AladW commented Jun 13, 2018

Well, in particular I meant upstream changes, for example when someone else adopted an AUR package and made a bunch of changes to the PKGBUILD compared to the last checkout.

@Kwpolska

This comment has been minimized.

Copy link
Owner

Kwpolska commented Jun 13, 2018

I’m not sure I understand the problem.

@AladW

This comment has been minimized.

Copy link

AladW commented Jun 13, 2018

When I have new targets I'd run pkgbuilder -G so that I can take a look at PKGBUILDs before building them.

When I have existing targets I'd run pkgbuilder -G again, but since a git merge was run (via git pull) I'd have no way to see what changes are "new" (for example, a new maintainer changed the source to something malicious) and have to review the whole bunch anew.

@Kwpolska

This comment has been minimized.

Copy link
Owner

Kwpolska commented Jun 13, 2018

Okay, got it. IMO the current behavior is the better option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.