From 07996bfac7cf172e656f7527794512fd596a9edf Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Wed, 22 Jun 2011 14:07:27 +1000 Subject: Document group and providers selection The format required for selection of packages within the group selection dialog is not entirely obvious, so provide some documentation. Fixes FS#24134. Signed-off-by: Allan McRae (cherry picked from commit 94d22f93096e210cd00d2e9c97c65f77d49ae387) --- doc/pacman.8.txt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/pacman.8.txt b/doc/pacman.8.txt index a4d41d0e..9dd748a3 100644 --- a/doc/pacman.8.txt +++ b/doc/pacman.8.txt @@ -13,7 +13,6 @@ Synopsis -------- 'pacman' [options] [targets] - Description ----------- Pacman is a package management utility that tracks installed packages on a Linux @@ -69,13 +68,18 @@ Operations interprets ">" as redirection to file.) + In addition to packages, groups can be specified as well. For example, if -gnome is a defined package group, then `pacman -S gnome` will install every -package in the gnome group, as well as the dependencies of those packages. +gnome is a defined package group, then `pacman -S gnome` will provide a +prompt allowing you to select which packages to install from a numbered list. +The package selection is specified using a space separated list of package +numbers. Sequential packages may be selected by specifying the first and last +package numbers separated by a hyphen (`-`). Excluding packages is achieved by +prefixing a number or range of numbers with a caret (`^`). + Packages that provide other packages are also handled. For example, `pacman -S foo` will first look for a foo package. If foo is not found, packages that provide the same functionality as foo will be searched for. If any package is -found, it will be installed. +found, it will be installed. A selection prompt is provided if multiple packages +providing foo are found. + You can also use `pacman -Su` to upgrade all packages that are out of date. See <> below. When upgrading, pacman performs version comparison -- cgit v1.2.3 From 6b57118c15c6ba60fd84e72ab1ec32bad7f7f7de Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Fri, 18 Mar 2011 11:03:28 -0400 Subject: pacman/util: flush terminal input before reading response Addresses FS#20538 Conflicts: src/pacman/util.c Signed-off-by: Dave Reisner Signed-off-by: Dan McGee (cherry picked from commit 9477abc3591905a20acbfe7b8ce7832617d72701) --- configure.ac | 5 +++-- src/pacman/util.c | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index c672c66c..f6d5a2c3 100644 --- a/configure.ac +++ b/configure.ac @@ -171,7 +171,8 @@ AM_CONDITIONAL([HAVE_LIBFETCH], [test "x$ac_cv_lib_fetch_fetchParseURL" = "xyes" # Checks for header files. AC_CHECK_HEADERS([fcntl.h glob.h libintl.h locale.h mntent.h string.h \ sys/ioctl.h sys/mount.h sys/param.h sys/statvfs.h \ - sys/time.h sys/types.h sys/ucred.h syslog.h wchar.h]) + sys/time.h sys/types.h sys/ucred.h syslog.h termios.h \ + wchar.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_INLINE @@ -190,7 +191,7 @@ AC_FUNC_GETMNTENT AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK AC_FUNC_MKTIME AC_CHECK_FUNCS([geteuid getmntinfo realpath regcomp strcasecmp \ - strndup strrchr strsep swprintf \ + strndup strrchr strsep swprintf tcflush \ wcwidth uname]) # For the diskspace code FS_STATS_TYPE diff --git a/src/pacman/util.c b/src/pacman/util.c index 53dbd637..0cb6a9f4 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -37,6 +37,9 @@ #include #include #include +#ifdef HAVE_TERMIOS_H +#include /* tcflush */ +#endif #include #include @@ -100,6 +103,18 @@ int needs_root(void) } } +/* discard unhandled input on the terminal's input buffer */ +static int flush_term_input(void) { +#ifdef HAVE_TCFLUSH + if(isatty(fileno(stdin))) { + return(tcflush(fileno(stdin), TCIFLUSH)); + } +#endif + + /* fail silently */ + return 0; +} + /* gets the current screen column width */ int getcols(int def) { @@ -828,6 +843,8 @@ int multiselect_question(char *array, int count) break; } + flush_term_input(); + if(fgets(response, response_len, stdin)) { const size_t response_incr = 64; /* handle buffer not being large enough to read full line case */ @@ -887,6 +904,8 @@ int select_question(int count) break; } + flush_term_input(); + if(fgets(response, sizeof(response), stdin)) { strtrim(response); if(strlen(response) > 0) { @@ -934,6 +953,8 @@ static int question(short preset, char *fmt, va_list args) } fflush(stream); + flush_term_input(); + if(fgets(response, sizeof(response), stdin)) { strtrim(response); if(strlen(response) == 0) { -- cgit v1.2.3 From c36dbf97118d8098ccf124b6299ff958a289d3c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eric=20B=C3=A9langer?= Date: Sun, 26 Jun 2011 15:13:48 -0400 Subject: Remove -f option from ln for POSIX compliance MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes FS#24893. Conflicts: scripts/makepkg.sh.in scripts/repo-add.sh.in Signed-off-by: Eric BĂ©langer Signed-off-by: Allan McRae Signed-off-by: Dan McGee (cherry picked from commit 51ed7dff0d30a5dcb73ce271e5d02bdb0d119cb9) --- scripts/makepkg.sh.in | 13 ++++++++----- scripts/repo-add.sh.in | 5 +++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 8fa64f7b..3ace9450 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -509,7 +509,8 @@ download_sources() { local file=$(get_filepath "$netfile" || true) if [[ -n "$file" ]]; then msg2 "$(gettext "Found %s")" "${file##*/}" - ln -sf "$file" "$srcdir/" + rm -f "$srcdir/$file" + ln -s "$file" "$srcdir/" continue fi @@ -877,8 +878,8 @@ tidy_install() { # update symlinks to this manpage find ${MAN_DIRS[@]} -lname "$file" 2>/dev/null | while read link ; do - rm -f "$link" - ln -sf "${file}.gz" "${link}.gz" + rm -f "$link" "${link}.gz" + ln -s "${file}.gz" "${link}.gz" done # check file still exists (potentially already compressed due to hardlink) @@ -1087,7 +1088,8 @@ create_package() { fi if (( ! ret )) && [[ ! "$PKGDEST" -ef "${startdir}" ]]; then - ln -sf "${pkg_file}" "${pkg_file/$PKGDEST/$startdir}" + rm -f "${pkg_file/$PKGDEST/$startdir}" + ln -s "${pkg_file}" "${pkg_file/$PKGDEST/$startdir}" ret=$? fi @@ -1169,7 +1171,8 @@ create_srcpackage() { fi if (( ! ret )) && [[ ! "$SRCPKGDEST" -ef "${startdir}" ]]; then - ln -sf "${pkg_file}" "${pkg_file/$SRCPKGDEST/$startdir}" + rm -f "${pkg_file/$SRCPKGDEST/$startdir}" + ln -s "${pkg_file}" "${pkg_file/$SRCPKGDEST/$startdir}" ret=$? fi diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in index 02ab389c..3d58d857 100644 --- a/scripts/repo-add.sh.in +++ b/scripts/repo-add.sh.in @@ -525,8 +525,9 @@ if (( success )); then [[ -f $tmpdir/$filename ]] && mv "$tmpdir/$filename" "$REPO_DB_FILE" dblink="${REPO_DB_FILE%.tar.*}" target=${REPO_DB_FILE##*/} - ln -sf "$target" "$dblink" 2>/dev/null || \ - ln -f "$target" "$dblink" 2>/dev/null || \ + rm -f "$dblink" + ln -s "$target" "$dblink" 2>/dev/null || \ + ln "$target" "$dblink" 2>/dev/null || \ cp "$REPO_DB_FILE" "$dblink" else msg "$(gettext "No packages modified, nothing to do.")" -- cgit v1.2.3 From e0f41e0fb4ec9eb7d1e2c54744e6dbcd4d61a713 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 9 Aug 2011 19:15:04 -0500 Subject: 3.5.4 release preparation Signed-off-by: Dan McGee --- NEWS | 9 +++++++++ configure.ac | 4 ++-- doc/index.txt | 2 ++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index b525b104..62b46305 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,14 @@ VERSION DESCRIPTION ----------------------------------------------------------------------------- +3.5.4 - fix display of lists on non-TTYs and other output fixes + - fix group selection entry for large inputs (FS#24253) + - fix divide by zero when downloading zero length files + - flush terminal input before reading response (FS#20538) + - allow files to be replaced by directories (FS#24904) + - makepkg: fix filenames with spaces and noextract (FS#25100) + - scripts: remove ln -f option for POSIX compliance (FS24893) + - various small documentation updates + - minor translation updates: de, fi 3.5.3 - segfault when creating lock in non-existent dir (FS#24292) - segfault when uninstalling broken backed-up symlink (FS#24230) - --print should not enable --noconfirm (FS#24287) diff --git a/configure.ac b/configure.ac index f6d5a2c3..16993807 100644 --- a/configure.ac +++ b/configure.ac @@ -42,12 +42,12 @@ AC_PREREQ(2.62) # pacman_version_micro += 1 m4_define([lib_current], [6]) -m4_define([lib_revision], [3]) +m4_define([lib_revision], [4]) m4_define([lib_age], [0]) m4_define([pacman_version_major], [3]) m4_define([pacman_version_minor], [5]) -m4_define([pacman_version_micro], [3]) +m4_define([pacman_version_micro], [4]) m4_define([pacman_version], [pacman_version_major.pacman_version_minor.pacman_version_micro]) diff --git a/doc/index.txt b/doc/index.txt index c04ca8a9..8d3481b9 100644 --- a/doc/index.txt +++ b/doc/index.txt @@ -63,6 +63,8 @@ Releases `------------`------- Date Version --------------------- +2011-08-10 v3.5.4 +2011-06-07 v3.5.3 2011-04-18 v3.5.2 2011-03-23 v3.5.1 2011-03-16 v3.5.0 -- cgit v1.2.3 From 05608ee57e89c1f55a573377f90c8025afd7c618 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 9 Aug 2011 19:52:15 -0500 Subject: Fix stupid typo in NEWS file updates Signed-off-by: Dan McGee --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 62b46305..005c789f 100644 --- a/NEWS +++ b/NEWS @@ -6,7 +6,7 @@ VERSION DESCRIPTION - flush terminal input before reading response (FS#20538) - allow files to be replaced by directories (FS#24904) - makepkg: fix filenames with spaces and noextract (FS#25100) - - scripts: remove ln -f option for POSIX compliance (FS24893) + - scripts: remove ln -f option for POSIX compliance (FS#24893) - various small documentation updates - minor translation updates: de, fi 3.5.3 - segfault when creating lock in non-existent dir (FS#24292) -- cgit v1.2.3 From c493eef643ecb3a54c79083c51a8975f816ed9de Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 28 Jun 2011 22:47:35 +1000 Subject: makepkg: fix removing symbolic link The path was not being stripped from $file before prefixing with $srcdir resulting in the attempted removal of a very weird filename. Signed-off-by: Allan McRae Signed-off-by: Dan McGee (cherry picked from commit e92905a2c8c14c7855e2841f44d3c139aa40844c) --- scripts/makepkg.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 3ace9450..b0b08823 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -509,7 +509,7 @@ download_sources() { local file=$(get_filepath "$netfile" || true) if [[ -n "$file" ]]; then msg2 "$(gettext "Found %s")" "${file##*/}" - rm -f "$srcdir/$file" + rm -f "$srcdir/${file##*/}" ln -s "$file" "$srcdir/" continue fi -- cgit v1.2.3