From df970846d15afad574014d9bb00212035d1cc4f7 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Sun, 26 Aug 2012 23:05:43 +0000 Subject: (_installed_req_and_unreq_and_update_unrequested_list) only write the unrequested package list file if the list actually changed (mga#7167) --- NEWS | 1 + urpm/orphans.pm | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index f351f945..58c01d07 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ - unrequested package list management (for orphans) (mga#7167): o do not wrongly tell we updated the unrequested package list when we didn't (eg: when not having the proper rights such as running urpmq as !root) + o only write the unrequested package list file if the list actually changed Version 7.4 - 24 August 2012 diff --git a/urpm/orphans.pm b/urpm/orphans.pm index 9399f9e4..8f2553a6 100644 --- a/urpm/orphans.pm +++ b/urpm/orphans.pm @@ -100,8 +100,11 @@ sub _installed_req_and_unreq_and_update_unrequested_list { my ($unreq, $req) = partition { $unrequested->{$_->name} } @$pkgs; # update the list (to filter dups and now-removed-pkgs) + my @old = keys %$unrequested; my @new = map { $_->name } @$unreq; - _write_unrequested_list__file($urpm, \@new); + if (@new != @old) { + _write_unrequested_list__file($urpm, \@new); + } ($req, $unreq, $unrequested); } -- cgit v1.2.1