You are not logged in.

#1 2016-11-02 19:59:29

greyseal96
Member
Registered: 2014-03-20
Posts: 31

[SOLVED] Manually installing a package after makepkg install fails

Hello all,

I've been using Arch for a while now but I've never had occasion to install something from the AUR so I don't know if the issue that I'm about to explain is because of my ignorance of AUR or because something actually went wrong.  Consequently, I'm not sure if this is should go in the AUR forum or Newbie Corner so if it needs to be moved, that's totally cool and I apologize in advance for any inconvenience.

Like I said, I've never installed something from the AUR before but I wanted to try out Visual Studio Code to see what it was like on my Arch box.  I downloaded the visual-studio-code-oss PKGBUILD and followed the instructions on the AUR page in the wiki.  I finally ran $> makepkg -sri and waited while the package was built.  When I came back a while later, I saw that it finished making the visual-studio-code-oss-<ver> package but that when makepkg went to install it with "pacman -U" it failed to install the built package.  It also failed to remove the dependency on gulp which was installed as part of the makepkg process. 

I looked in the pacman log for any errors but I couldn't find any so I figured that I'd try manually running "pacman -U" to install the package so that I could see any errors that occurred in pacman and try to figure out what went wrong.  To my surprise the package installed without any problems.  At the same time, I thought I might as well manually clean up the gulp dependency which was installed as part of the makepkg process.  No problems with either step.

I'm able to open and use Visual Studio Code so I'm wondering how to tell what went wrong.  Is there a way to tell if the package is OK?  Or is the fact that it installed and runs evidence enough?

Last edited by greyseal96 (2016-11-02 21:09:28)

Offline

#2 2016-11-02 20:06:03

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Manually installing a package after makepkg install fails

Makepkg will prompt for your password via sudo to install the built package. If this request times out (if for example you're away from the computer) it can't install the package.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2016-11-02 20:17:45

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [SOLVED] Manually installing a package after makepkg install fails

A workaround for that behaviour is to disable the time-out, so sudo will wait until you typed in the password.

example :

Defaults: your-user passwd timeout=0

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#4 2016-11-02 20:30:04

greyseal96
Member
Registered: 2014-03-20
Posts: 31

Re: [SOLVED] Manually installing a package after makepkg install fails

Just to clarify and make sure we're all on the same page.  When I first started makepkg, I was prompted by sudo for my password, which I supplied.  Makepkg went through its process and created the package.  Are you guys saying that makepkg prompts the user a second time before installing the package?  I just assumed that supplying the password once was sufficient. 

Also, just to make sure I understand how the whole process works, it's not really makepkg that needs higher permissions, right?  It's really pacman that needs the sudo to install the dependencies, the final package and then to remove the dependencies?  Since makepkg is running from a directory in my home directory, this seems to make the most sense to me.  That would explain why the user is prompted again for the password at the end of makepkg.  Is that kind of on the right track?

Offline

#5 2016-11-02 20:42:31

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [SOLVED] Manually installing a package after makepkg install fails

you're close. with the -sri flags makepkg needs to call pacman 3 times .

The order is however slightly, different :
1. install dependencies
1a. build package
2.remove dependencies
3. install resulting package

Once you auth'ed there is a grace period (5 minutes ? not sure) in which the sudo access stays vaild .
If the package builds fast, you may only need to enter the password once.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#6 2016-11-02 21:02:02

greyseal96
Member
Registered: 2014-03-20
Posts: 31

Re: [SOLVED] Manually installing a package after makepkg install fails

Awesome.  Thanks so much (to slithery as well) for explaining that and clearing it up for me.  And also thanks for the hint in your other post for how to disable the time-out.

Offline

Board footer

Powered by FluxBB