#8 feat: update patch for dnf5
Merged 2 years ago by filiperosset. Opened 2 years ago by ankursinha.
rpms/ ankursinha/byobu feat-dnf5  into  rawhide

file added
+25
@@ -0,0 +1,25 @@ 

+ === modified file 'usr/lib/byobu/updates_available'

+ --- usr/lib/byobu/updates_available	2019-05-26 19:15:34 +0000

+ +++ usr/lib/byobu/updates_available	2022-03-14 10:11:43 +0000

+ @@ -54,6 +54,9 @@

+  	elif eval $BYOBU_TEST apt-get >/dev/null; then

+  		# If apt-get exists, use it

+  		flock -xn "$flock" apt-get -s -o Debug::NoLocking=true upgrade | grep -c ^Inst >$mycache 2>/dev/null &

+ +	elif eval $BYOBU_TEST dnf >/dev/null; then

+ +		# If dnf exists, use it

+ +		flock -xn "$flock" dnf list --upgrades -q -y | grep -vc "Available Upgrades" >$mycache 2>/dev/null &

+  	elif eval $BYOBU_TEST pkcon >/dev/null; then

+  		# use packagekit to show list of packages

+  		LC_ALL=C flock -xn "$flock" pkcon get-updates -p | awk '/^Results:$/ { start=NR }; /^Security/ { security++ }; END { if (!/There are no updates available at this time./) { print NR-start, security }}' > "$mycache" 2>/dev/null &

+ @@ -103,6 +106,10 @@

+  		else

+  			return 1

+  		fi

+ +	elif [ -e "/var/cache/libdnf5" ]; then

+ +		NEWEST=$(ls -td /var/cache/libdnf5/*/ | head -1)

+ +		[ "$NEWEST" -nt "$mycache" ]

+ +		return $?

+  	elif [ -e "/var/lib/PackageKit/transactions.db" ]; then

+  		[ "/var/lib/PackageKit/transactions.db" -nt "$mycache" ]

+  		return $?

+ 

file modified
+13 -3
@@ -6,7 +6,7 @@ 

  

  Name:		byobu

  Version:	6.12

- Release:	3%{?dist}

+ Release:	4%{?dist}

  Summary:	Light-weight, configurable window manager built upon GNU screen

  

  # Automatically converted from old format: GPLv3 - review is highly recommended.
@@ -18,7 +18,9 @@ 

  

  # prefer dnf when installed

  # sent upstream: https://code.launchpad.net/~sanjay-ankur/byobu/byobu/+merge/415959

- Patch0:		byobu-use-dnf.patch

+ Patch:		byobu-use-dnf.patch

+ # for F41+ where we have dnf5

+ Patch:		byobu-use-dnf5.patch

  

  BuildArch:	noarch

  BuildRequires:  automake
@@ -41,7 +43,12 @@ 

  such as toggle-able system status notifications.

  

  %prep

- %autosetup -p0

+ %autosetup -N

+ %if 0%{?fedora} >= 41

+ %autopatch -p0 1

+ %else

+ %autopatch -p0 0

+ %endif

  

  # remove swap file

  if [ -e "usr/bin/.byobu-status-print.swp" ]; then rm usr/bin/.byobu-status-print.swp
@@ -128,6 +135,9 @@ 

  %config(noreplace) %{_sysconfdir}/%{name}/*

  

  %changelog

+ * Tue Nov 26 2024 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 6.12-4

+ - Update patch for dnf5

+ 

  * Mon Jul 29 2024 Miroslav Suchý <[email protected]> - 6.12-3

  - convert license to SPDX

  

For F41+ since dnf5 no longer uses /var/cache/dnf/packages.db. So now we compare against the newest folder instead.

Updated patch not sent upstream yet---testing it out for a bit first.

rebased onto 1560749

2 years ago

Updated this to use a conditional so that it works for all Fedora versions

Pull-Request has been merged by filiperosset

2 years ago
Metadata