Giter VIP home page Giter VIP logo

apacman's People

Contributors

bruenig avatar creshal avatar falconindy avatar johnnybubonic avatar justin8 avatar keenerd avatar lectrode avatar oshazard avatar ritze avatar schuay avatar yoo avatar

Stargazers

 avatar

Watchers

 avatar  avatar

apacman's Issues

Please Read!

I mainly have the "Issues" tab enabled so I can keep track of my goals. I do not yet know if I am going to make this a big project for myself. In most cases, I do not have the time to work extensively on a project like this. I already have a full-time job, in addition to classes, which limits the amount of free time I have significantly.

However, as this is a script that I use very frequently, I want to contribute in various small ways. At the very least, I want to fix issues that affect me personally as they arise. The fixes may not be pretty (though I'll try to make them as efficient/clean as possible).

If you find an issue, please test the original
If that has the same issue, please post the issue there.

If the issue only affects the latest version in my fork, feel free to create the issue here instead.

apacman doesn't support packages with '@' or '+'

Original issue reported here

Current supported package attributes/definitions:
https://wiki.archlinux.org/index.php/PKGBUILD#Package_name

When regex mode was implemented, it was made with the assumption that packages did not have these symbols (to be fair, it looks like there is only one package that uses '@', and it is in the official Arch repos). The suggested (accepted?) resolution in the original issue thread is to remove the regex mode entirely.

However, I believe the solution does not have to be that drastic. Instead of supporting Extended Regex, it can be simplified to Basic Regex (see differences here). This would resolve the issue of current unsupported characters, as well as retain the functionality from the original wildcard request.

This seems like another relatively simple change, especially if I introduce static variables to easily define the "valid" characters in the PKGBUILD variables throughout the script.

apacman crashes when width variables not defined

Original issue reported here

This small issue is easy enough to fix. Just define the width variable if it is not already defined before trying to use it in an equation. I'll have a commit pushed to fix this shortly.

pickone() not displaying package choices

I'm not sure if this also affects Arch Linux. It affects Manjaro, so I tend to assume it affects Arch as well, but I have not tested on Arch.

Both regular and regex mode make use of the pickone() function if there are multiple sources that meet the search criteria. As an example, see sudo apacman -S linux-headers

The cause of this issue is discussed in this stackexchange thread. Basically, in BASH the echo statement will only "work" to a certain function depth, which is kind-of annoying. After that point, it does technically "work", but the text to be displayed will only get displayed after the entire function call is complete.

There are a couple solutions stated in that thread that I've tested and found to work:

  • echo some text here >&2
  • echo some text here >/dev/tty

The first solution is to redirect the output to stderr. While this works, stderr is generally reserved for actual error output, so I'd want to avoid using it as a hack to display regular text.
The second solution, while not as highly voted, seems to do the trick nicely, even when in a non-interactive mode (for example, yes | sudo apacman -S --noedit blahpackage). The text is displayed as expected.

tests.bats failures

The following are the test failures from the latest release of apacman:

~snip~
 ✗ invoke with '-S' parameter fails to build broken package from AUR
   (in test file tests.bats, line 74)
     `[ "$status" -eq 8 ]' failed
~snip~
 ✗ invoke with '-G' parameter download AUR package source
   (in test file tests.bats, line 97)
     `[ ${lines[-1]} = "$pattern" ]' failed
 ✗ invoke with '-G' parameter download old AUR package source
   (in test file tests.bats, line 105)
     `match=$(grep -o -e pkgver.* -e pkgrel.* ${fakedir}/${histpkg}/.SRCINFO | awk '{printf $NF"-"}' | sed 's/-$//' | grep -o "$pattern")' failed
   grep: /tmp/testing/jbxkb/.SRCINFO: No such file or directory
 ✗ invoke with '-G' parameter choose download old AUR package source
   (in test file tests.bats, line 114)
     `[ ${lines[2]} = "$pattern" ]' failed
 ✗ prepare proot environment
   (in test file tests.bats, line 122)
     `[ "$status" -eq 0 ]' failed
 - invoke with '-S' parameter install package group (skipped)
 ✗ invoke with '-S' parameter install virtual package
   (in test file tests.bats, line 136)
     `result=$(proot -b "${fakedir}/var:/var" $APACMAN $testing -S $virtualpkg --noconfirm --buildonly <<< $(echo -e "\n") 2>&1)' failed with status 255
~snip~

22 tests, 6 failures, 1 skipped

There are 2 additional failures from after changes I made. I will need to look at the two new ones. I may look at some of the other ones as well.

 ✗ interactive search install package
   (in test file tests.bats, line 59)
     `[ "$status" -eq 0 ]' failed
 ✗ interactive search install nonexistant package
   (in test file tests.bats, line 64)
     `[ "$status" -eq 4 ]' failed

Unsupported PKGBUILD features

There are still elements that are officially supported in PKGBUILDs that do not work with apacman. Things like:

  • architecture-specific arrays for depends, optdepends, makedepends, and checkdepends (as used in teamviewer)
  • split packages (as in libc++)

I'll add more to that list as I come across more.

I will look more into this issue after pushing commits fixing the smaller, easier issues.

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.