You are not logged in.
Personally I find NONE distracting.
And next time we have a poll, people will complain about the lack of NONE, because they feel the lack of a standard mathmatical concept disturbing.
Offline
karol wrote:12. Compression tool: is 'tar' the same thing as 'bsdtar' for the purpose of this survey?
I added bsdtar as my other since they are different tools and I want for naught when using it.
All the best,
-HG
DItto. I alias tar to bsdtar these days, ever since the Manpage Revelations. If I can't man it, and there's a drop-in replacement that I can man, then it can geeeeeet out.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
The problem is exacerbated by the fact that you just add a repo to your pacman.conf and away you go. You never actually have to learn how to use makepkg, therefore you just treat AUR like the official repos. This isn't, IMO, helpful nor smart.
It's an interesting hypothesis that I must learn about delicacies of all the tools that I use to get work done. I have had a hard time justifying that with limited time I have.
Offline
It's an interesting hypothesis that I must learn about delicacies of all the tools that I use to get work done. I have had a hard time justifying that with limited time I have.
I understand why people think this, but if that's the case, then I would recommend using something other than Arch. This is not to be offensive or unkind. Rather, it is because Arch expects you to be able to maintain your own system. If you do not understand the tools needed to do this, then should you ever run into a stability issue, you may find yourself in a serious spot of trouble without the knowledge to fix it.
All the best,
-HG
Offline
donniezazen wrote:It's an interesting hypothesis that I must learn about delicacies of all the tools that I use to get work done. I have had a hard time justifying that with limited time I have.
I understand why people think this, but if that's the case, then I would recommend using something other than Arch. This is not to be offensive or unkind. Rather, it is because Arch expects you to be able to maintain your own system. If you do not understand the tools needed to do this, then should you ever run into a stability issue, you may find yourself in a serious spot of trouble without the knowledge to fix it.
All the best,
-HG
That can happen to you on any platform. it would be really hard to keep track of all the tools that I use. Roughly my system should be comprised of a few hundred pieces of software. Logically anyone of those software could end up messing your system. It would require several hours to read about them and maintain those software personally. There are always trade-offs in life. One of those involves trusting Arch Linux packagers and community.
Offline
jasonwryan wrote:The problem is exacerbated by the fact that you just add a repo to your pacman.conf and away you go. You never actually have to learn how to use makepkg, therefore you just treat AUR like the official repos. This isn't, IMO, helpful nor smart.
It's an interesting hypothesis that I must learn about delicacies of all the tools that I use to get work done. I have had a hard time justifying that with limited time I have.
It breaks without fail everytime there'a a major pacman upgrade. There's no harm in using it but one should know what to do when it doesn't work.
Edit: Took the survey. I made a mistake and didn't select all the monitors I use. Oh well. Also, can't believe there was nothing for teminal multiplexers. Tmux represent!
Last edited by fsckd (2014-04-18 16:54:33)
aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies
Offline
I am using the yaourt-package too, but only because of pacdiffviewer. It's such a comfortable way to find and merge/edit/delete new config files, I don't want to miss it! :-)
Offline
Calling an AUR package a yaourt-package on the Arch bbs is like using only male neutral forms in written publications on most German unis.
Offline
I am using the yaourt-package too, but only because of pacdiffviewer. It's such a comfortable way to find and merge/edit/delete new config files, I don't want to miss it! :-)
How is it different from e.g. pacdiff?
Offline
$ diff -aur $(which pacdiffviewer) $(which pacdiff)
--- /usr/bin/pacdiffviewer 2013-05-21 00:20:32.000000000 +0100
+++ /usr/bin/pacdiff 2013-12-24 21:26:47.000000000 +0000
@@ -1,275 +1,155 @@
-#!/bin/bash
+#!/usr/bin/bash
+# pacdiff : a simple pacnew/pacorig/pacsave updater
#
-# pacdiffviewer : manage/backup/clean/merge pac* files
+# Copyright (c) 2007 Aaron Griffin <aaronmgriffin@gmail.com>
+# Copyright (c) 2013 Pacman Development Team <pacman-dev@archlinux.org>
#
-# Copyright (c) 2008-2010 Julien MISCHKOWITZ <wain@archlinux.fr>
-# Copyright (c) 2010-2012 tuxce <tuxce.net@gmail.com>
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Library General Public License as published
-# by the Free Software Foundation; either version 2, or (at your option)
-# any later version.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-export TEXTDOMAINDIR='/usr/share/locale'
-export TEXTDOMAIN=yaourt
-NAME='pacdiffviewer'
-VERSION='1.3'
+declare -r myname='pacdiff'
+declare -r myver='4.1.2'
-. '/usr/lib/yaourt/util.sh'
+diffprog=${DIFFPROG:-vimdiff}
+diffsearchpath=${DIFFSEARCHPATH:-/etc}
+locate=0
+USE_COLOR='y'
-ROOTDIR=
-SAVEDIR='/var/lib/yaourt/backupfiles'
-LOCATE=0
-SEARCH_REP=(/etc/ /boot/ /var/lib/archbuild/extra-x86_64/root/ /var/lib/archbuild/multilib-x86_64/root/ /opt/ /usr/)
-QUIET=0
-[[ -d "$SAVEDIR" ]] && MERGE=1 || MERGE=0
-tmp_file=$(mktemp)
-cleanup_add rm "$tmp_file"
+plain() {
+ (( QUIET )) && return
+ local mesg=$1; shift
+ printf "${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&1
+}
-usage() {
- echo "$NAME $VERSION"
- [[ "$1" = "-v" ]] && exit 0
- echo -e "\t-c $(gettext 'Delete all *.pac* found')"
- echo -e "\t-b $(gettext 'Save all packages backup files for a later merge')"
- echo -e "\t-q $(gettext 'Use with backup to not output messages')"
- echo -e "\t-s $(gettext 'Sequential listing')"
- echo -e "\t-d $(gettext 'Display diff')"
- echo -e "\t-h $(gettext 'This help')"
- echo -e "\t-v $(gettext 'Show version')"
- exit 0
+msg() {
+ (( QUIET )) && return
+ local mesg=$1; shift
+ printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&1
}
-# Save files marked as backup in packages for a possible later merge
-backup_files() {
- local _file _md5sum _version pkgname pkgver backupdir currentfile
- pkgquery -Qf '%n - %v\n%B' --csep '\n' |
- while read _file _md5sum _version
- do
- # no backups
- [[ "$_file" = "-" ]] && pkgname="" && continue
- # _md5sum = "-" -> on name/version line
- [[ "$_md5sum" = "-" ]] && pkgname="$_file" && pkgver="$_version" &&\
- continue
- [[ ! -f "$ROOTDIR/$_file" ]] && continue
- backupdir="$SAVEDIR/$pkgname/$pkgname-$pkgver"
- [[ -f "$backupdir/$_file" ]] && continue
- currentfile="$_file.pacnew"
- [[ -f "$ROOTDIR/$currentfile" ]] || currentfile="$_file"
- if echo "$_md5sum $ROOTDIR/$currentfile" |
- md5sum --status -c - &>/dev/null; then
- (( ! QUIET )) && echo "-> $(gettext 'saving') $ROOTDIR/$currentfile"
- mkdir -p "$(dirname "$backupdir/$_file")" || return 1
- cp -a "$ROOTDIR/$currentfile" "$backupdir/$_file" || return 1
- fi
- done
+msg2() {
+ (( QUIET )) && return
+ local mesg=$1; shift
+ printf "${BLUE} ->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&1
}
-# Create pacnew/pacsave/pacorig db
-# PACOLD=() -> all pacnew/pacsave files which package is not installed
-# PACNEW=() -> rest of pacnew files
-# PACSAVE=() -> rest of pacsave files
-# PACORIG=() -> pacorig files
-create_db() {
- unset PACOLD PACNEW PACSAVE
- local pacfiles _file ext
- IFS=$'\n'
- if (( LOCATE )); then
- pacfiles=($(locate -eb "*.pacorig" "*.pacsave" "*.pacnew"))
- else
- pacfiles=($(find "${SEARCH_REP[@]}" \( -name "*.pacorig" \
- -o -name "*.pacsave" -o -name "*.pacnew" \)))
- fi
- unset IFS
- for _file in "${pacfiles[@]}"; do
- for ext in .pacnew .pacsave .pacorig; do
- [[ ${_file%$ext} != $_file ]] && break
- done
- [[ ! -f "${_file%$ext}" ]] && PACOLD+=("${_file}") && continue
- [[ "$ext" = ".pacnew" ]] && PACNEW+=("${_file}")
- [[ "$ext" = ".pacsave" ]] && PACSAVE+=("${_file}")
- [[ "$ext" = ".pacorig" ]] && PACORIG+=("${_file}")
- done
- echo "${#PACORIG[@]} .pacorig $(gettext 'found')"
- echo "${#PACNEW[@]} .pacnew $(gettext 'found')"
- echo "${#PACSAVE[@]} .pacsave $(gettext 'found')"
- echo "${#PACOLD[@]} $(gettext 'files are orphans')"
- echo
+ask() {
+ local mesg=$1; shift
+ printf "${BLUE}::${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}" "$@" >&1
}
-# Return previous version file if we had backup it
-# usage: previous_version ($file)
-# return previous file or ""
-previous_version() {
- [[ $1 ]] || return
- local file=$1 pkgname pkgver
- read pkgname pkgver < <(pacman_parse -Qo "$file" |
- awk '{print $(NF-1)" "$NF}' 2>/dev/null)
- [[ $pkgname ]] || return
- [[ -d "$SAVEDIR/$pkgname/" ]] || return
- pushd "$SAVEDIR/$pkgname/" &> /dev/null
- local pkgver_prev="" _rep
- for _rep in $(ls -Ad *-*); do
- [[ "$_rep" = "$pkgname-$pkgver" || ! -f "${_rep}${file}" ||
- $(vercmp $pkgver ${_rep#$pkgname-}) -lt 0 ]] && continue
- if [[ -z "$pkgver_prev" || \
- $(vercmp $pkgver_prev ${_rep#$pkgname-}) -lt 0 ]]; then
- pkgver_prev="${_rep#$pkgname-}"
- fi
- done
- popd &> /dev/null
- [[ ! "$pkgver_prev" ]] && return
- echo "$SAVEDIR/$pkgname/$pkgname-$pkgver_prev/$file"
+warning() {
+ local mesg=$1; shift
+ printf "${YELLOW}==> $(gettext "WARNING:")${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
}
-# Search if we can merge a .pac{save,new} with a current file
-# usage: is_mergeable ($file)
-# return: 0 on success
-is_mergeable() {
- (( ! MERGE )) && return 1
- [[ $1 ]] || return 1
- local file=$1
- local ext=${2:-.pacnew}
- local file_prev=$(previous_version "$file")
- [[ $file_prev ]] || return 1
- diff -aBbu "$file_prev" "${file}${ext}" > $tmp_file
- (( $? != 1 )) && return 1
- patch --dry-run -sp0 "$file" -i "$tmp_file" &> /dev/null || return 1
- return 0
+error() {
+ local mesg=$1; shift
+ printf "${RED}==> $(gettext "ERROR:")${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
}
-# Remove .pac* files
-suppress() {
- local pacfiles=(${PACOLD[@]})
- [[ "$1" = "all" ]] && \
- pacfiles+=("${PACNEW[@]}" "${PACSAVE[@]}" "${PACORIG[@]}")
- (( ! ${#pacfiles[@]} )) && return
- msg "$(gettext 'The following files have no original version.')"
- echo_wrap 4 "${pacfiles[*]}"
- echo
- prompt "$(gettext 'Do you want to delete these files ?') $(\
- yes_no 2) $(gettext '(S: no confirm)')"
- local answer=$(userinput "YNS" "N")
- [[ "$answer" = "N" ]] && return
- local _opt=""
- [[ "$answer" = "Y" ]] && _opt="-i"
- rm $_opt "${pacfiles[@]}"
-}
+# check if messages are to be printed using color
+unset ALL_OFF BOLD BLUE GREEN RED YELLOW
+if [[ -t 2 && ! $USE_COLOR = "n" ]]; then
+ # prefer terminal safe colored and bold text when tput is supported
+ if tput setaf 0 &>/dev/null; then
+ ALL_OFF="$(tput sgr0)"
+ BOLD="$(tput bold)"
+ BLUE="${BOLD}$(tput setaf 4)"
+ GREEN="${BOLD}$(tput setaf 2)"
+ RED="${BOLD}$(tput setaf 1)"
+ YELLOW="${BOLD}$(tput setaf 3)"
+ else
+ ALL_OFF="\e[1;0m"
+ BOLD="\e[1;1m"
+ BLUE="${BOLD}\e[1;34m"
+ GREEN="${BOLD}\e[1;32m"
+ RED="${BOLD}\e[1;31m"
+ YELLOW="${BOLD}\e[1;33m"
+ fi
+fi
+readonly ALL_OFF BOLD BLUE GREEN RED YELLOW
-# Manage .pac* file
-# Called by manage()
-manage_file() {
- local ext=$1; shift
- local _time=${1%% *}
- local _file="${1#* }"
- local same loop=0
- while true; do
- local _msg="$ext: ${_file%$ext}"
- local _prompt="Action: [E]dit, [R]eplace, [S]uppress,"
- local _prompt_action="ERSCA"
- diff -abBu "${_file%$ext}" "$_file" &> /dev/null && \
- _msg+=" $(gettext '**same file**')" && same=1 || same=0
- if is_mergeable "${_file%$ext}" "$ext"; then
- _prompt+=" [M]erge,"
- _prompt_action+="M"
- _msg+=" $(gettext '**automerge**')"
- fi
- ((DIFF && !same && !loop++)) && diff -abBu "${_file%$ext}" "$_file"
- msg "$_msg"
- # gettext "Action: [E]dit, [R]eplace, [S]uppress, [C]ontinue (default), [A]bort ?"
- # gettext "Action: [E]dit, [R]eplace, [S]uppress, [M]erge, [C]ontinue (default), [A]bort ?"
- # gettext "ERSCA"
- # gettext "ERSCAM"
- prompt "$(gettext "$_prompt [C]ontinue (default), [A]bort ?")"
- local answer=$(userinput "$_prompt_action" "C")
- case "$answer" in
- A) break 2;; # break manage() loop
- C) break;;
- E) $DIFFEDITCMD "${_file%$ext}" "$_file" ;;
- R) mv "$_file" "${_file%$ext}"; return 1;;
- S) rm "$_file"; return 1 ;;
- M) echo
- msg "$(gettext 'Patch: ')"
- cat "$tmp_file"
- echo
- prompt2 "$(gettext 'Apply ?') $(yes_no 1)"
- useragrees || continue;
- patch -sp0 "${_file%$ext}" -i "$tmp_file"
- (( $? )) && error "$(gettext 'patch returned an error!')"
- rm "$_file"
- break;;
- esac
- done
-}
-
-# Manage list of .pac* files
-manage() {
- echo
- local ext=$1; shift
- [[ $@ ]] || return
- local pacfiles i _line
- readarray -t pacfiles < <(stat -c "%Y %n" "$@" |
- sort |
- awk '{printf ("%s %s\n", strftime("%x %X",$1), substr ($0, length($1)+1))}')
- if (( ! SEQUENTIAL )); then
- while true; do
- echo
- list_select "${pacfiles[@]}"
- prompt2 "$(gettext 'Enter n° : ')"
- read -e i
- (( ! i )) && break
- (( --i>=0 && i < ${#pacfiles[@]} )) || continue
- manage_file "$ext" "${pacfiles[$i]}"
- if (( $? )); then
- unset pacfiles[$i]
- pacfiles=("${pacfiles[@]}")
- (( ${#pacfiles[@]} )) || break;
- fi
- done
+
+usage() {
+ echo "$myname : a simple pacnew/pacorig/pacsave updater"
+ echo "Usage : $myname [-l]"
+ echo " -l/--locate makes $myname use locate rather than find"
+ echo " DIFFPROG variable allows to override the default vimdiff"
+ echo " DIFFSEARCHPATH allows to override the default /etc path"
+ echo "Example : DIFFPROG=meld DIFFSEARCHPATH=\"/boot /etc /usr\" $myname"
+}
+
+version() {
+ printf "%s %s\n" "$myname" "$myver"
+ echo 'Copyright (C) 2007 Aaron Griffin <aaronmgriffin@gmail.com>'
+ echo 'Copyright (C) 2013 Pacman Development Team <pacman-dev@archlinux.org>'
+}
+
+cmd() {
+ if [ $locate -eq 1 ]; then
+ locate -0 -e -b \*.pacnew \*.pacorig \*.pacsave
else
- i=0
- for _line in "${pacfiles[@]}"; do
- (( i++ ))
- msg "$i/${#pacfiles[@]}:"
- manage_file "$ext" "$_line"
- done
+ find $diffsearchpath \( -name \*.pacnew -o -name \*.pacorig -o -name \*.pacsave \) -print0
fi
}
-init_color
-action=""
-explode_args "$@"
-set -- "${OPTS[@]}"
-unset OPTS
-while [[ $1 ]]; do
- case "$1" in
- -q) QUIET=1;;
- -s) SEQUENTIAL=1;;
- -d) DIFF=1;;
- --backup|-b) action=backup;;
- -c) action=clean;;
- -*) usage $1;;
+if [ $# -gt 0 ]; then
+ case $1 in
+ -l|--locate)
+ locate=1;;
+ -V|--version)
+ version; exit 0;;
+ -h|--help)
+ usage; exit 0;;
+ *)
+ usage; exit 1;;
esac
- shift
-done
+fi
+
+# see http://mywiki.wooledge.org/BashFAQ/020
+while IFS= read -u 3 -r -d '' pacfile; do
+ file="${pacfile%.pac*}"
+ file_type="pac${pacfile##*.pac}"
+
+ msg "%s file found for %s" "$file_type" "$file"
+ if [ ! -f "$file" ]; then
+ warning "$file does not exist"
+ rm -iv "$pacfile"
+ continue
+ fi
+
+ if cmp -s "$pacfile" "$file"; then
+ msg2 "Files are identical, removing..."
+ rm -v "$pacfile"
+ else
+ ask "(V)iew, (S)kip, (R)emove %s, (O)verwrite with %s: [v/s/r/o] " "$file_type" "$file_type"
+ while read c; do
+ case $c in
+ r|R) rm -v "$pacfile"; break ;;
+ o|O) mv -v "$pacfile" "$file"; break ;;
+ v|V)
+ $diffprog "$pacfile" "$file"
+ rm -iv "$pacfile"; break ;;
+ s|S) break ;;
+ *) ask "Invalid answer. Try again: [v/s/r/o] "; continue ;;
+ esac
+ done
+ fi
+done 3< <(cmd)
+
+exit 0
-case "$action" in
- backup) backup_files;;
- clean) create_db; suppress all;;
- *) create_db
- manage .pacsave "${PACSAVE[@]}"
- manage .pacnew "${PACNEW[@]}"
- manage .pacorig "${PACORIG[@]}"
- suppress
- ;;
-esac
-# vim: set ts=4 sw=4 noet:
+# vim: set ts=2 sw=2 noet:
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
$ diff -aur $(which pacdiffviewer) $(which pacdiff) --- /usr/bin/pacdiffviewer 2013-05-21 00:20:32.000000000 +0100 +++ /usr/bin/pacdiff 2013-12-24 21:26:47.000000000 +0000 @@ -1,275 +1,155 @@
Ah, so it's more or less the same ;P
I don't want to drag the thread OT, but I did install yaourt before asking here and tried pacdiffviewer out, but I didn't see anything special about it.
Offline
Well, registering here was a bit of journey. Anyway, I have recently started actively using github and watching repositories, so my email get messed up and I've decided to switch from "None" to "some-gmail-client". As I use such programs like canto-curses for rrs, irssi + bitlbee for irc and twitter and etc, I'd like to find some really useful and fast terminal-based email client to work with gmail. Currently I'm interested in sup client as I have found some interesting articles across the web about sap+arch=minimalistic and useful. Any suggestions?
Offline
@ewancoder
Have you already looked at mutt?
I hear many people talking passionately about it. I use Thunderbird myself but also Geary sounds very promising. However, both are no terminal clients.
Offline
@ewancoder
Have you already looked at mutt?
I hear many people talking passionately about it. I use Thunderbird myself but also Geary sounds very promising. However, both are no terminal clients.
Well, I have not looked at anything yet so now I'm going to look at mutt. And a pair words about thunderbird: WHY do so much people use it? It's just standard and gnome and wide and big and other non-archway stuff including rss+twitter+allother features.. anyway, what do you guys think about Vmail?
Offline
Well, I have not looked at anything yet so now I'm going to look at mutt. And a pair words about thunderbird: WHY do so much people use it? It's just standard and gnome and wide and big and other non-archway stuff including rss+twitter+allother features.. anyway, what do you guys think about Vmail?
This is not the thread for that type of discussion. Please refrain from hijacking the thread. You can start another thread in an appropriate forum for discussion.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline