oshazard / apacman

ArchLinux User Repository (AUR) helper and pacman wrapper
https://aur.archlinux.org/packages/apacman/
GNU General Public License v3.0
70 stars 11 forks source link

Target not found - works with packer #6

Closed rbellamy closed 9 years ago

rbellamy commented 9 years ago
2015-02-04 19:12:08
rbellamy@eanna i ~ % apacman --noedit --noconfirm -S atom-editor-git
error: target not found: atom-editor-git
No pacnew files to update.
2015-02-04 19:12:35
rbellamy@eanna i ~ % packer --noedit --noconfirm -S atom-editor-git

Aur Targets    (1): atom-editor-git

Proceed with installation? [Y/n] 
==> Making package: atom-editor-git 0.177.0.r55.gcbe5eff-1 (Wed Feb  4 19:12:50 PST 2015)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Cloning atom git repo...

2015-02-04 19:05:34
rbellamy@eanna i ~ % pacman -Qi apacman
Name           : apacman
Version        : 1.2-2
Description    : AUR wrapper forked from packer
Architecture   : any
URL            : http://github.com/oshazard/apacman
Licenses       : GPL
Groups         : None
Provides       : packer
Depends On     : bash  binutils  ca-certificates  curl  fakeroot  file  grep  jshon  sed  tar  wget
Optional Deps  : apacman-deps: Required AUR build depends [installed]
                 customizepkg: Tool to auto-patch AUR PKGBUILDs [installed]
                 rsync: Built-in ABS support [installed]
Required By    : None
Optional For   : None
Conflicts With : None
Replaces       : None
Installed Size :  73.00 KiB
Packager       : G. Richard Bellamy <rbellamy@pteradigm.com>
Build Date     : Wed 04 Feb 2015 12:18:06 PM PST
Install Date   : Wed 04 Feb 2015 12:18:13 PM PST
Install Reason : Explicitly installed
Install Script : Yes
Validated By   : None
oshazard commented 9 years ago

That's weird. Unable to reproduce.

oshazard commented 9 years ago

By the way, something seems to be wrong with the atom editor UI (unable to actually use it): atom-editor_screenshot

rbellamy commented 9 years ago

I just remembered I have pacman aliased to pacmatic... that's probably the problem here.

have pacmatic && alias pacman=pacmatic && export PACMAN=/usr/bin/pacmatic

As for that view of Atom, that's the developer panel. See that red circle-X? That shows that there's an error in the console - go there and you'll likely see what is borking out during launch.

oshazard commented 9 years ago

Yeah it's definitely pacmatic. I'll try to isolate the issue and then either make changes to apacman or file a bug report with pacmatic if I'm unable to.

rbellamy commented 9 years ago

Seemed to me that pacmatic wasn't issuing the correct exit code when it couldn't find a package, so I made quick modification to it (exit $exit_code rather than exit 0), but that didn't do the trick... thanks for looking at this.

oshazard commented 9 years ago

Yup, haha I noticed the same and I was going to mention it but that's not the only difference. That is a problem with using a wrapper inside of a wrapper - layers upon layers. I am a bit surprised that it works with packer, so it's definitely one of the changes I've made.

oshazard commented 9 years ago

I did a git bisect and the problem commit is v0.9 (caa3cbe696629e2e6bcc039fa08d164168730962). The breakage was changing hard-coded instances of pacman to use the environmental variable $PACMAN. Reverting non-install instances fixed the issue.

oshazard commented 9 years ago

Fixed in v1.3

rbellamy commented 9 years ago

I'm not convinced ignoring the $PACMAN env variable is the "right" way to go...

oshazard commented 9 years ago

I compared against packer and all I did was revert my changes.

Though instead of hard-coding in pacman I used the $pacmanbin variable, you can change that at the top and see that the pacmatic script will not work because it's a quick and dirty hack.

Furthermore pacmatic can only wrap: -Syu|-Su|-S|-Sy|-Syyu|-Syy. I'm not sure what you expect

rbellamy commented 9 years ago

Actually, I think you've gone above and beyond here... I really don't expect it to work with pacmatic, but think it should support $PACMAN. I went ahead and removed pacmatic in favor of using this tool.