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?