summaryrefslogtreecommitdiffstats
path: root/abs/core/pacman/pacman.install
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2015-07-05 16:26:59 (GMT)
committerBritney Fransen <brfransen@gmail.com>2015-07-05 16:26:59 (GMT)
commitd39f95aa83e0f76ab255322fbfcd35b23236f0a7 (patch)
treef3bac057b4f3ab7a7c5b19cb7afe8aa81e9d5088 /abs/core/pacman/pacman.install
parentd3910d114d7c89f95c39765fc0e716f8ecae7b84 (diff)
downloadlinhes_pkgbuild-d39f95aa83e0f76ab255322fbfcd35b23236f0a7.zip
linhes_pkgbuild-d39f95aa83e0f76ab255322fbfcd35b23236f0a7.tar.gz
linhes_pkgbuild-d39f95aa83e0f76ab255322fbfcd35b23236f0a7.tar.bz2
pacman: update to 4.2.1
Diffstat (limited to 'abs/core/pacman/pacman.install')
-rw-r--r--abs/core/pacman/pacman.install65
1 files changed, 2 insertions, 63 deletions
diff --git a/abs/core/pacman/pacman.install b/abs/core/pacman/pacman.install
index 42b2808..2c599c3 100644
--- a/abs/core/pacman/pacman.install
+++ b/abs/core/pacman/pacman.install
@@ -2,76 +2,15 @@
# arg 1: the new package version
# arg 2: the old package version
post_upgrade() {
- # one time stuff for md5sum issue with older pacman versions
- if [ "$(vercmp $2 3.0.2)" -lt 0 ]; then
- _resetbackups
- fi
- if [ "$(vercmp $2 3.5.0)" -lt 0 ]; then
+ if [ "$(vercmp $2 4.2.0)" -lt 0 ]; then
_warnupgrade
fi
- if [ ! -f "etc/pacman.d/gnupg/pubring.gpg" ] || [ "$(vercmp $2 4.0.3-2)" -lt 0 ]; then
- _check_pubring
- fi
sed -i '/^# If upgrades are available/d' /etc/pacman.conf
sed -i '/^SyncFirst/d' /etc/pacman.conf
}
-post_install() {
- _check_pubring
-}
-
-_check_pubring() {
- echo " >>> Run \`pacman-key --init; pacman-key --populate archlinux\`"
- echo " >>> to import the data required by pacman for package verification."
- echo " >>> See: https://www.archlinux.org/news/having-pacman-verify-packages"
-}
-
_warnupgrade() {
- echo ">>> The pacman database format has changed as of pacman 3.5.0."
+ echo ">>> The pacman database format has changed as of pacman 4.2.0."
echo ">>> You will need to run \`pacman-db-upgrade\` as root."
echo ">>>"
}
-
-_resetbackups() {
- echo ">>> Performing one-time reset of NoUpgrade md5sums. After this reset"
- echo ">>> you are able to remove all NoUpgrade lines of already protected"
- echo ">>> files from pacman.conf."
- echo ">>>"
-
- # path variables
- pacconf="/etc/pacman.conf"
- dbpath="/var/lib/pacman/local"
-
- # get a list of NoUpgrade files from the user's pacman.conf
- echo ">>> Retrieving pacman.conf NoUpgrade list..."
- config=$(grep "^NoUpgrade" $pacconf | cut -d'=' -f2)
- # add the standard list of files, even if they are already above
- config="$config \
- etc/passwd etc/group etc/shadow etc/sudoers \
- etc/fstab etc/raidtab etc/ld.so.conf \
- etc/rc.conf etc/rc.local \
- etc/modprobe.conf etc/modules.conf \
- etc/lilo.conf boot/grub/menu.lst"
-
- # blank md5sum for use in sed expression
- zeroes='00000000000000000000000000000000'
-
- for file in $config; do
- echo ">>> -> finding owner of /$file..."
- line=$(LC_ALL=C LANG=C pacman -Qo /$file 2>/dev/null)
- # if file is owned by a package, go find its incorrectly stored sum
- if [ ! -z "$line" ]; then
- # get the name and version of the package owning file
- name=$(echo $line | awk '{print $5}')
- version=$(echo $line | awk '{print $6}')
- # set the path to the backup array holding the md5sum
- path="$dbpath/$name-$version/files"
- # run a sed on the path to reset the line containing $file
- # NOTE: literal tab characters in sed expression after $file
- echo ">>> -> resetting sum of /$file..."
- sed -i "s#$file [0-9a-fA-F]*#$file $zeroes#" $path
- else
- echo ">>> -> $file is unowned."
- fi
- done
-}