Request for automatic alias and connection for icdiff


#1

Hi there!

I’ve packaged icdiff a while ago. Now I’m wanting to also package a helper that makes it work together with git, git-icdiff. For this, I need

  • icdiff.git-icdiff to get aliased to git-icdiff, and
  • the personal-files interface to auto-connect.

This is how I’m using it (from the snapcraft.yaml):

# personal-files won't auto-connect without going through the "Process for
# aliases, auto-connetions and tracks", https://docs.snapcraft.io/455
# During testing, "snap connect icdiff:gitconfig" should work
plugs:
  gitconfig:
    interface: personal-files
    read: [$HOME/.gitconfig]

apps:
  git-icdiff:
    # We'll want to request an automatic alias for this to work seamlessly.
    # During testing, "snap alias icdiff.git-icdiff git-icdiff" should work
    command: usr/bin/git-icdiff
    environment:
      # there's perl somewhere in the pipeline, and it gets shouty without this
      LC_ALL: C.UTF-8
    plugs:
      - home            # so it can acess files under the user's home
      - removable-media # so it can access things in /media, etc
      - gitconfig       # so it can access ~/.gitconfig :-)

and the store doesn’t like that right now.


#2

Should I have mentioned @reviewers?


#3

+1 to the alias, having a git helper requires the git-$NAME

Can you explain some more why you need to read ~/.gitconfig ?


#4

Because git-icdiff uses git config to get the pager and other bits and bobs,

Without that connected,

$ git icdiff
warning: unable to access '/home/john/.gitconfig': Permission denied
warning: unable to access '/home/john/.gitconfig': Permission denied
warning: unable to access '/home/john/.gitconfig': Permission denied
warning: unable to access '/home/john/.gitconfig': Permission denied
fatal: unknown error occurred while reading the configuration files

#5

Thanks, +1 to autoconnection of the personal-files interface to read ~/.gitconfig


#6

+1 for the alias. Since icdiff as a snap is extending git, it seems to make sense that personal-files should be autoconnected.


#7

2 votes for, 0 against for the alias. Granting use of the alias. This is now live.

2 votes for, 0 against for the use of personal-files. Could not grant due to https://bugs.launchpad.net/snapstore/+bug/1814592


#8

@pedronis - fyi, I subscribed you to this bug in case you had input.


#9

I’m glad I’m the one kicking the tires :slight_smile: thank you for the +1’s!


#10

@jdstrand I answered in the bug, afaict things work as expected and there is misunderstanding.


#11

What’s the status of this?


#13

Can I add $HOME/.config/git/config to the personal-files list? (newer gits might start using $XDG_CONFIG_HOME/git/config which defaults to that)


#14

Fyi, I granted the snap declaration but the store does not yet have the new review-tools in production to make them pass automated review. You can request a manual review or upload a new revision and we can accept it.


#15

I uploaded a new revision and requested a manual review.

My next step was to make this build automatically; is that going to work, or should I hold off until the new review-tools are in production?


#16

It will work but will fail review until the tools are in prod. I thought that might happen yesterday/today, but it apparently hasn’t yet. @roadmr - do you have an estimate?


#17

hi!

We ran into some infrastructure trouble last week, which delayed things.
I’ll try to have this out today or tomorrow.

Cheers!

  • Daniel

#18

The updates are in production now and your r4 passed automated review.