Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Jun 28, 2011
  1. -S: Colorize and block print final targets

    Signed-off-by: Pang Yan Han <>
  2. Style cleanup

    Signed-off-by: Pang Yan Han <>
  3. Remove deprecated functions

    Signed-off-by: Pang Yan Han <>
Commits on Jun 9, 2011
  1. Preliminary -S functionality

    The -S functionality which includes dependency resolution used by -Su and
    --crawl is in the works. While this may seem like a mega patch, most of it
    is actually removing legacy code from the former -S
    Due to the change in -S code, many functions are removed. Most notably,
    print_pkginfo is removed due to it not being used.
    Previously, print_list took in a list of strings and a prefix as an argument
    and proceeds to print the list of strings on the same line as the prefix, until
    it ran out of lines, then continued the indenting print.
    Now, we introduce a print function solely for printing lists until column space
    runs out. It should be named print_list but print_list already exists. So
    print_list is renamed to the more apt print_list_prefix and our new function
    can use print_list as its name.
    Signed-off-by: Pang Yan Han <>
  2. util.c: add strtrim_ver

    strtrim_ver will remove any version related substring from a given string.
    For instance, given something like "pacman>=3.5", strtrim_ver will reduce the
    given string to "pacman"
    Signed-off-by: Pang Yan Han <>
  3. util.c: add sdbm string hashing function

    Signed-off-by: Pang Yan Han <>
  4. Add preliminary -Su for AUR packages

    An initial version of -Su is available which checks for outdated AUR
    A new --check flag is available to be used with -Su. The current behaviour
    of -Su and -Su --check is exactly the same since dependency resolution is
    not completed.
    Signed-off-by: Pang Yan Han <>
Commits on May 30, 2011
  1. Properly setup colorized printing functions

    Previously, non-colorized and colorized printing made use of the same
    pw_*print family of functions.
    Since we do most of the setup after we parse the user supplied arguments,
    the user may supply the "--debug" option. This will cause a segmentation
    fault as the color struct has not been initialized but a NULL string in it
    is printed.
    The pw_safe_*print family of functions is introduced to solve this.
    Now, the pw_*print family of functions are just function pointers to the
    pw_safe_*print family of functions until we confirm whether the output is
    colorized. If so, then we call color_print_setup() to switch the pw_*print
    function pointers to pw_c*print family of functions to support colorized
    Otherwise, the pw_*print family of functions will still point to the original
    pw_safe_*print family of functions.
    When we destroy the color struct, color_print_restore() is invoked to switch
    the pw_*print pointers to the pw_safe_*print functions.
    Signed-off-by: Pang Yan Han <>
  2. Beautify questions for -S

    Signed-off-by: Pang Yan Han <>
  3. Colorized output for -Q and -S

    Complete colorized output for -Q and -S (hopefully).
    A major refactoring was done with regards to how packages are printed.
    enum dumplvl_t is introduced to indicate the appropriate level at which
    to dump entire pacman databases to stdout.
    pacman_db_info is renamed to pacman_db_dump to better reflect the purpose
    of the function. pacman_db_info handles a NULL target list for:
    -Q, -Qi, -Qs, -Si, -Ss
    by dumping the relevant database(s).
    which_db is a new helper function that returns a string indicating which
    database a given package comes from. It can be either one of the sync
    databases or "local".
    print_pkg_pretty prints colorized output of -Q, -Qs and -Ss packages.
    Signed-off-by: Pang Yan Han <>
  4. Introduce colorized output for -Q and -S

    There is now colorized output available for -Q and -S, with a color scheme
    similar to those of yaourt.
    A --nocolor option is added to switch off colorized output.
    Signed-off-by: Pang Yan Han <>
Commits on May 25, 2011
  1. Add error functions and wrapper functions

    Previously, we used to return errors by:
    ASSERT(some_condition, RET_ERR(SOME_ERR, return_val));
    Which looks pretty ugly. Now, there is an "error" function which serves the
    purpose of setting pwerrno, outputting the error message to stdout and has a
    return value of -1. This suffices to replace almost all instances of RET_ERR
    return error(some_error);
    if the function returns -1 upon failure.
    In addition, wrapper.c and wrapper.h are new files which provide very simple
    wrapper for the following functions:
    These wrapper functions will cause the program to exit immediately upon memory
    allocation error.
    Signed-off-by: Pang Yan Han <>
Commits on May 24, 2011
  1. Add verbose flag and clear up downloading msgs

    Signed-off-by: Pang Yan Han <>
  2. Initial commit.

    Signed-off-by: Pang Yan Han <>
Something went wrong with that request. Please try again.