Arch List Packages Installed From Aur

  1. Debian List Packages Installed

Because flex is a part of base-devel which is expected to be installed on any Arch Linux system that wishes to build packages from the AUR. AUR helpers are written to automate certain tasks for the Arch User Repository. PkgBrowser — Application for searching and browsing Arch packages.

Arch List Packages Installed From Aur

EDIT- Changed the name of the script from pacsearch to pacdot. Apparently yaourt -Ssaq does this, so this script isn't as necessary as I thought. Although, I still find using pacdot -w to open the results in a text document helpful./EDIT- This isn't a question, but I thought someone else might find this useful.

Someone may end up on stackoverflow trying to find a solution like this. On Arch Linux, I keep finding myself searching with pacman or yaourt and wishing I could get just the package names, not all of the extra stuff. For example, I'd love to be able to run yaourt -Sa $(yaourt -Ssa package). Oddly enough, pacman and yaourt don't seem have this option (not that I can tell, at least), so I wrote a python script to do it.

Debian List Packages Installed

Packages

Copy it if you'd like. You can name it what you want, but I'll refer to it as pacdot.py. Pacdot.py package will be like yaourt -Ssa package but only list the package names. I added a few extra options:. pacdot.py -o package will only list results from the official Arch repositories, not the AUR. pacdot.py -i package will install all the found packages.

If you've ever thought about running something like yaourt -Sa $(yaourt -Ssa package), that's what this command does. pacdot.py -w package will:. Create a file called 'the-package-you-searched.txt',. Write an example command that would install the found packages, (yaourt -Sa all-of-the-results),. Write each result on a new line, and.

Open the file for you (with your default text editor). Here's the code: #!/bin/python3 import argparse import re from subprocess import Popen, PIPE, call from collections import deque desc = '.join(('Search the official Arch and AUR databases ', 'and return package names only. ', 'e.g.: `pacdot.py arch` will return 'arch', ', 'whereas `$ yaourt -Ssa arch` will return ', 'community/arch 1.3.5-10', ' A modern and remarkable revision control system.' ' )) parser = argparse.ArgumentParser(description=desc) parser.addargument('package', help='Package to search with pacman') parser.addargument('-o', '-official', action='storetrue', help='Search official repositories only, not the AUR') parser.addargument('-i', '-install', action='storetrue', help='Install found packages') parser.addargument('-w', '-write', action='storetrue', help='Write to file') #Set args strings. Args = parser.parseargs pkg = args.package officialonly = args.official install = args.install write = args.write # Do yaourt search.

Aur

Packagesearch = Popen('yaourt', '-Ssa', '%s'% pkg, stdout=PIPE).communicate # Put each found package into a list. Packagetitlesdescs = str(packagesearch0).split(' n') # Strip off the packages descriptions.

Packagetitles = packagetitlesdescsi for i in range(0, len(packagetitlesdescs), 2) # Remove empty item in list. Del(packagetitles-1) # Make a separate list of the non-aur packages. Packagetitlesofficial = deque(packagetitles) packagetitlesofficial.remove(p) for p in packagetitles if p.startswith('aur') # Strip off extra stuff like repository names and version numbers.

Packagesall = re.sub('(^/+)/(^ s+) (.)', r' 2', str(p)) for p in packagetitles packagesofficial = re.sub('(^/+)/(^ s+) (.)', r' 2', str(p)) for p in packagetitlesofficial # Mark the aur packages. # (Not needed, just in case you want to modify this script.) #packagesaur = packagesalllen(packagesofficial): # Set target packages to 'all' or 'official repos only' # based on argparse arguments. If officialonly: packages = packagesofficial else: packages = packagesall # Print the good stuff. For p in packages: print(p) if write: # Write results to file. Filename = '.join((pkg, '.txt')) with open(filename, 'a') as f: print('.join(('Yaourt search for ', pkg, ' n')), file=f) print('To install:', file=f) packagesstring = ' '.join(packages) print(' '.join(('yaourt -Sa', packagesstring)), file=f) print(' nPackage list:', file=f) for p in packages: print(p, file=f) # Open file.

Call(('xdg-open', filename)) if install: # Install packages with yaourt. For p in packages: print('.join((' n 0331;32m ', ' 0331;37m', p, ' 0330m'))) Popen('yaourt', '-Sa', '%s'% p).communicate.

Glyfx delphi