GithubHelp home page GithubHelp logo

pbrisbin / aurget Goto Github PK

View Code? Open in Web Editor NEW
68.0 68.0 17.0 439 KB

A simple pacman-like interface to the AUR

License: GNU General Public License v2.0

Makefile 4.64% Shell 66.25% Perl 23.08% Turing 6.04%

aurget's People

Contributors

aragon999 avatar bafain avatar ehird avatar falconindy avatar fernandobasso avatar glenntanner3 avatar mychris avatar pbrisbin avatar regdoug avatar z33ky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aurget's Issues

Unable to resolve dependencies for split packages

(See #39 for example case)

Scenario

  • Given some package p which is a split package for building (at least) q
  • Given p (and therefore q) has an AUR dependency x
  • Given the user invokes aurget -Sy --deps q

What happens

  • Aurget attempts to download the PKGBUILD for q to resolve dependencies
  • This PKGBUILD does not exist (only the PKGBUILD for p does)
  • Aurget considers a missing PKGBUILD as "no dependencies" and continues with the build
  • The build will fail when makepkg can't satisfy x (because it's in the AUR)

What should happen

  • Aurget should download p's PKGBUILD and use it to resolve dependencies
  • Aurget should find x and add it as a dependency target
  • Building should succeed

Proposed fixes

  • I wonder if not finding the PKGBUILD should blow up
  • We probably need to hit the AUR API to know that we need p's PKGBUILD to resolve dependencies for q

Workaround

In general, manually resolve the dependencies:

aurget -Sy --deps --asdep x
aurget -Sy --deps q

Note that

aurget -Sy --deps x q

Will also work, but x will be installed explicitly and therefore would not be removed automatically with pacman -Rsn q, or be show in pacman -Qdt output when/if q were uninstalled.

Pull pkgbuilds before building any sources

Hi,
I just used aurget for the first time just now. Previously I'd been manually building aur packages.
Presently when there are a few packages to upgrade, aurget -Su works like the following:

  1. download tarball1
  2. build tarball1
  3. install tarball1
  4. download tarball2
  5. build tarballl2
  6. install tarball2

This means that I have to interact, wait, interact, wait (assume that I inspect pkgbuilds / need to enter sudo password etc.)

It would be nice to be able to to the majority of interaction upfront like:

  1. download tarball1
  2. download tarball2
  3. build tarball1
  4. build tarballl2
  5. install all tarballs

I'm not sure whether this should be an optional approach, or the default. Thoughts?

aurget -Sb - why is there no package in the current directory afterwards?

does -Sb leave behind a compiled package after exit, if yes where, and if not, why?

the documentation says to -Sb:
"Download and build the given package."
it does this, but it seems to discard the package it has build, or to save it in a non-obvious location.
this behaviour might be ok for quick testing for users, but i would expect the main use case of -Sb to be automating building from the aur (not having to navigate to the aur site, downloading a tar.gz, extracting it, changing directory, makepkg, moving the result out of the directory, changing directory, deleting the source directory).
for example, i would like to be able to make a quick build and then install with the root user and for some reason do not want to need to configure sudo at this point, or to build for archiving reasons, or for copying to an identical arch installation.

additionally, sometimes packages take long to build and i come back later and see that a sudo timeout is over and do not find a package in the directory. then i start the build again and the cycle continues a few times.
i tried setting --builddir but the result was the same.

Feature request: Add pause before launching pacman after long builds

Per default, sudo password entry times out after a minute or so. This has the consequence that if a build process takes some time, this time window is easily missed as the user is unlikely to babysit the terminal window in the meantime. Often making the user go through the majority of the process again.

I propose adding a "Press enter to continue" prompt if a build process has taken more than a certain amount of time, say 20 or 30 seconds, to avoid having to go through the process again. This would have little consequence to the usability as user interaction is required anyways. If in a situation where a password would not be required (e.g. running as root), the pause should of course be skipped.

Stepping back from Aurget

I haven't worked on Aurget in a while. As such, it lags behind the more recent AUR helpers in a number of important ways:

  • It doesn't take full advantage of the newer AUR API
  • It doesn't build packages in a sandbox
  • It doesn't always handle split packages correctly

I have personally been using aurutils and aurto and I'm quite happy with these tools:

  • The architecture of a local repository is quite clever and works really well
  • Small, focused utilities (aurutils) with a convenience layer (aurto) work out to a really good UX that is understandable, with a powerful layer available when needed; aurutils is very well-thought-out and aurto makes smart choices in how it abstracts
  • I like the idea of maintainer "trust" (aurto) so far, we'll see how it goes. I was never one to edit PKGBUILDs before install, so this is a step up for me, even if it's not truly secure for anything, really

So I'm going to formally stop maintaining Aurget features or fixes myself. I'm happy to continue reviewing and merging PRs for now, and if anyone wants to take over as maintainer, please let me know.

Tagging any prior contributors so they hear about this, in case they're interested: @eclairevoyant @ehird @pejakm @z33ky @regdoug @mychris @falconindy @bafain @FernandoBasso.

Cheers all, it's been fun!

aurget doesn't seem to install packages

I'm a pretty new Arch user, but have used aurget < 4.0 with success.

However, on a fresh Arch install with aurget 4.0.3-1, everything appear to be built OK, but is never installed:

$ aurget -S tor-browser-en
:: Searching AUR...

Targets (1): tor-browser-en-2.3.25_6-1 

Proceed with installation? [Y/n] 
:: Retrieving taurball from AUR...
:: Building package...
Edit tor-browser-en's PKGBUILD before building? [Y/n] n
==> Making package: tor-browser-en 2.3.25_6-1 (Wed 24 Apr 16:16:50 BST 2013)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading tor-browser-gnu-linux-x86_64-2.3.25-6-dev-en-US.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
 79 37.8M   79 30.2M    0     0   596k      0  0:01:05  0:00:52  0:00:13  514 81 37.8M   81 30.8M    0     0   595k      0  0:01:05  0:00:53 83 37.8M   83 31.5M    0     0   598k      0  0:01:04  0:00:54 85 37.8M   85 32.5M    0     0   605k      0  0:01:04  0:00:55 88 37.8M   88 33.3M    0     0   609k      0  0:01:03  0:00:56  0:00:07  93 37.8M   93 35.5M    0     0   615k      0  0:01:03  0:00:59  0:00:04 100 37.8M  100 37.8M    0     0   622k      0  0:01:02  0:01:02 --:--:--  751k
  -> Downloading tor-browser-gnu-linux-x86_64-2.3.25-6-dev-en-US.tar.gz.asc...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   487  100   487    0     0    939      0 --:--:-- --:--:-- --:--:--   940
  -> Found tor-browser-en.desktop
  -> Found tor-browser-en.png
  -> Found tor-browser-en.sh
==> Validating source files with sha256sums...
    tor-browser-gnu-linux-x86_64-2.3.25-6-dev-en-US.tar.gz ... Passed
    tor-browser-gnu-linux-x86_64-2.3.25-6-dev-en-US.tar.gz.asc ... Passed
    tor-browser-en.desktop ... Passed
    tor-browser-en.png ... Passed
    tor-browser-en.sh ... Passed
==> Verifying source file signatures with gpg...
    tor-browser-gnu-linux-x86_64-2.3.25-6-dev-en-US.tar.gz ... FAILED (unknown public key 416F061063FEE659)
==> WARNING: Warnings have occurred while verifying the signatures.
    Please make sure you really trust them.
==> Extracting sources...
==> Entering fakeroot environment...
==> Starting package()...
==> Tidying install...
  -> Purging unwanted files...
  -> Compressing man and info pages...
  -> Stripping unneeded symbols from binaries and libraries...
==> Creating package "tor-browser-en"...
  -> Generating .PKGINFO file...
  -> Adding install file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: tor-browser-en 2.3.25_6-1 (Wed 24 Apr 16:18:14 BST 2013)
:: Discarding sources...

Can you help?

gzip: stdin: unexpected end of file

Recently (I'm unsure how long this has gone on), aurget has given me these errors:

$ aurget -Syu
:: Starting AUR upgrade...
:: Searching AUR...

Targets (3): aurget-4.6.0-1 chromium-pepper-flash-1:18.0.0.233-1 tor-browser-en-5.0.1-1 

Proceed with installation? [Y/n] 
:: Retrieving taurball from AUR...

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
warning: package aurget failed to download, skipping
:: Retrieving taurball from AUR...

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
warning: package chromium-pepper-flash failed to download, skipping
:: Retrieving taurball from AUR...

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
warning: package tor-browser-en failed to download, skipping

What should I do?

Provided packages not being resolved

Since I'm not entirely clear what's causing this issue, I'll give you a running example.

This pandoc package allows pandoc to be installed without Haskell dependencies. In its PKGBUILD, it lists haskell-bytestring as a dependency.

If you try aurget -S --noconfirm pandoc, you'll get:

error: haskell-bytestring: dependency cannot be met.

Indeed, searching AUR and the official repositories for haskell-bytestring manually gives no results.

If however you install pandoc using yaourt, haskell-bytestring is found. It turns out that ghc (Extra) provides haskell-bytestring (though (strangely) it isn't mentioned in its PKGBUILD).

Is this an issue of aurget (I've also noticed it happen in other AUR Helpers) or should haskell-bytestring simply be removed from pandoc as ghc provides it anyway? It's strange that yaourt would work if you agree with the latter.

Double url-encoding breaks packages with special chars

From AUR comment:

I believe there's a bug. When installing a package with a special character in the name (like bisonc++), the tarball can't be retrieved. Seems the problem is the subroutine url_encode being applied twice on the url (which causes the + character to be replaced for %%2b instead of %2b).

failed to build, skipping

Perhaps I am doing something wrong, but I am unable to use aurget to install anything from AUR. I always get this error: failed to build, skipping. I have configured aurget as best as I could which included which includes having the base-devel properly installed, creating a local builds directory, editing aurgetrc to include the system packages directory for packages to be stored and worked on, but something doesn't seem right. aurget always asks me to manually edit the PKGBUILD before installing and since everything usually appears fine I save it as-is and then it fails to install. I have a mid 2012 13" Macbook Pro model 9,2 dual-booting OS X Mavericks and Arch Linux. I only recently installed Arch and everything is fully up to date.

Here is my input and the output for trying to install mbpfan-git.
[brittany@arch ~]$ sudo aurget -Sy mbpfan-git
[sudo] password for brittany:
:: Searching AUR...

Targets (1): mbpfan-git-v1.7.1-1

Proceed with installation? [Y/n] y
:: Retrieving taurball from AUR...
:: Building package...
Edit mbpfan-git's PKGBUILD before building? [Y/n] n
/etc/makepkg.conf: line 108: /home/brittany/packages: Is a directory
==> ERROR: Running makepkg as root is a BAD idea and can cause permanent,
catastrophic damage to your system. If you wish to run as root, please
use the --asroot option.
warning: package mbpfan-git failed to build, skipping
[brittany@arch ~]$

Apparently now the setup for aurget is incorrect as it shows the makepkg.conf error for line 108.

I can't seem to figure out how to install AUR packages manually either so this is very frustrating. My MBP fan isn't working properly even with applesmc module activated. My MBP gets hot and has on occasion became hot enough to easily have shut down on it's own. I need this package among othe AUR packages but I just can't seem to get this working.

Recently moved packages cause issues

This issue can (currently) be reproduced with ruby-highline.

Although now available (only) in community, the PKGBUILD still resides on the aur server -- this tricks aurget into thinking it's an aur package and therefore fails trying to install it.

If you suspect you're bit by this issue, please note the following which identifies these packages:

$ aurget -Ssi <package> # will find nothing, but
$ aurget -Sp <package>  # will still print a PKGBUILD

The reason for this issue is that aurget attempts to locate and source the PKGBUILD during dependency resolution. Branching off of a 404 at that point is the most efficient way to know if something is available in the aur or (potentially) available via pacman. Solving this issue would mean adding additional verification for one of those at that point (something which already must occur at a later point in the process anyway). This would mean a dip in efficiency just to catch outliers like these.

I will leave this issue open for others to find until a) I come up with an efficient and simple way to code around it, b) the aur is fixed such that these PKGBUILDs are no longer left or c) I move this note to the README and leave things as-is.

Download packages to PkgCache

This would be useful with other package-related tooling, i.e. so that they appear in subsequent downgrade invocations. I wonder if it might even make a better default.

packages erroneously shows as out-of-date

When doing a search with broader terms, many packages are shown as out-of-date when they are not. However when the search is more specific (less results) the out-of-date message is no longer shown. My aurget is version 4.0.9. Heres the results:

~ > aurget -Ss elementary- aur/bmpanel2-elementary-theme 20100515-1 A matching bmpanel2 theme for elementary gtk2 & openbox themes aur/cinnamon-theme-elementary-luna 1.7-1 Elementary Luna theme for cinnamon aur/elementary-borderless-gtk-theme 0.2.5-1 modified Elementary theme which looks very slick thanks to the removal of the borders and smaller widgets aur/elementary-dark-gtk-theme 20120613-1 [out of date] A soft and subtle dark theme based on the higly popular elementary theme aur/elementary-git 1.7.99.7772.d331257-1 [out of date] EFL widget toolkit - Development version aur/elementary-gtk-theme 3.3-1 [out of date] The official elementary GTK theme designed to be smooth, attractive, fast, and usable. aur/elementary-icons 2.7.1-2 [out of date] icon theme designed to be smooth, sexy, clear, and efficient. aur/elementary-icons-bzr 1072-1 [out of date] An icon theme designed to be smooth, sexy, clear, and efficient (Development branch) aur/elementary-mod-gtk-theme 0.3-1 [out of date] Modified Elementary Theme for nautilus-elementary only. aur/elementary-scan-bzr 607-1 [out of date] Simple Scanning Utility aur/elementary-usu-icons 8.0.7-1 [out of date] Elementary icon theme from USU aur/elementary-xfce-icons 0.2-4 [out of date] Elementary icons with better Xfce support aur/elementary-xfce-icons-git 0.2_394_g246143d-1 [out of date] Elementary icons with better Xfce support aur/faelementary-icon-theme 0.10-1 [out of date] Faelementary Icon theme (Elementary feel, Faenza apps) aur/gnome-shell-theme-elementary-luna 1.3-3 [out of date] This is a GNOME Shell theme based on the Elementary GTK2 theme. aur/gnome-shell-theme-elementary-viper-luna 20111122-1 [out of date] A bright gnome shell theme by justviper aur/mint-elementary-icons 1.0.0-1 [out of date] mint elementary icon theme aur/openbox-elementary-theme 20110711-1 [out of date] Openbox theme for Elementary GTK. aur/pidgin-elementary-tray-icons 1-1 [out of date] Pidgin elementary icon theme for system tray aur/rosa-elementary-deko 0.5.1-1 [out of date] Window decorations as seen in Rosa Desktop 2012 ~ > aurget -Ss elementary-icons aur/elementary-icons 2.7.1-2 icon theme designed to be smooth, sexy, clear, and efficient. aur/elementary-icons-bzr 1072-1 An icon theme designed to be smooth, sexy, clear, and efficient (Development branch) aur/mint-elementary-icons 1.0.0-1 mint elementary icon theme ~ >

ca-certificates

If ca-certificates are not installed aurget wont be able search the aur site. ca-certificates should be a dependency.

Release of AUR v5 lacks backward compatibility, breaks aurget

There has been a change in the RPC call for AUR5. Now it needs a "v=5" flag or it returns nothing at all. Here's what I hacked in to get results to show up again:

aur_search_url() {
printf "$AUR/rpc/?v=5&type=search&arg=$(url_encode "$1")\n"
}

The docs don't mention that v is now needed explicitly. Seems like they have this version flag and broke backwards compatibility anyway >.<

Split packages result in duplicate updates

Since AUR v3.0.0, aurget currently tries to update all packages in a split package separately, resulting in duplicate updates:

0 โœ“ det@Archlinux ~ $ aurget -Su
:: Starting AUR upgrade...
:: Searching AUR...

Targets (5): linux-ck-headers-3.14.8-1 linux-ck-3.14.8-1

Proceed with installation? [Y/n]

Multiple items in ignore_packages not parsed correctly

I've got

ignore_packages='icaclient' 'spotify'

in ~/.config/aurgetrc and running aurget -Syu actually results in spotify being executed. Unless I read it wrong, the manpage says to use a space-separated list of packages.

Thanks!

PKGEXT=.tar

Hi,

could you please add an option to aurget to disable compressing packages prior to installing them? When installing large binary packages like dropbox, most of the time is spent compressing the package, which will be deleted after installing in most cases anyway.
Basically one needs set the variable PKGEXT=.tar prior to invoking makepkg. Pacman is happy with installing uncompressed packages. I kind of hacked makepkg_options for my needs, but I guess are cleaner approach would be nicer.

$ grep makepkg_options .config/aurgetrc
makepkg_options='PKGEXT=.tar --syncdeps'

Cheers,
olebowle

Aurget pacman problem

I get errror when i try to build package with aurget -Sy have require need to build from aur,it try to install it with pacman from official repos and then fails to install it.

Feature request: delete build directory

Well, that's it. I'm really liking aurget, but I miss removing the build directory, not always I'm interested in rebuilding the package immediately... is there any reason why this is not implemented?

custom editor setting

allowing use of an editor other than vi without having to create a symlink would be very nice, a setting in aurgetrc perhaps? sidenote, think aurgetrc could be explained a little better

Installing cached packages doesn't work with v4 anymore

Hey :) I really like the previous version feature that found already-built packages in my 'package_destination' directory and installed those if they matched the AUR version number. Now that 'package_destination' has been moved to the makepkg.conf 'PKGDEST', that feature no longer seems to work. Any chance of getting this functionality back? It makes sharing/installing packages between machines on the same network easier without rebuilding them for each.

Thanks!
Scott

[Suggestion] Rework default installation actions

What is the percentage of cases when an average user actually does want to edit PKGBUILD?
I'm just a casual user and I don't even know what PKGBUILD is. I just want to install the package.
If it's not only me who expects to just hit Enter couple of times, maybe we should make No the default to the following dialog?

Edit foo's PKGBUILD before building? [Y/n]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.