blob: e8682613d11aa152e0971968769d790a87487f4d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
From 28d424bdd838821c38170fe9120b9ceec809e8da Mon Sep 17 00:00:00 2001
From: Henrik Riomar <henrik.riomar@gmail.com>
Date: Fri, 19 May 2017 17:22:17 +0200
Subject: [PATCH] apk: handle packages installed with Repository_pinning
If the package is pinned the last element of the version
line will contain @<pin name>, strip that before getting the
version number.
https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management#Repository_pinning
---
apk/apt-dater-host | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/apk/apt-dater-host b/apk/apt-dater-host
index e0c9b65..cc0a1eb 100755
--- a/apk/apt-dater-host
+++ b/apk/apt-dater-host
@@ -10,7 +10,7 @@
# Henrik Riomar <henrik.riomar@gmail.com>
#
# Copyright Holder:
-# 2016,2017 (C) Henrik Riomar
+# 2016, 2017 (C) Henrik Riomar
#
# License:
# This program is free software; you can redistribute it and/or modify
@@ -71,7 +71,7 @@ get_pkg_stat()
$APK_CMD info | while read -r pkg
do
line=$(grep -E "^${pkg}-[0-9]" $tmp)
- new_ver=$(echo $line | awk '{print $NF}')
+ new_ver=$(echo $line | sed 's/ @.\+$//' | awk '{print $NF}')
cur_ver=$(echo $line | awk '{print $1}' | sed "s/$pkg-//")
if [ x"$new_ver" = x"$cur_ver" ]; then
echo "STATUS: $pkg|$cur_ver|i"
--
2.13.0
|