[pacman-dev] Use noextract with pacman-conf NoExtract

Message ID 20200401152958.290051-1-eschwartz@archlinux.org
State Accepted, archived
Headers show
Series
  • [pacman-dev] Use noextract with pacman-conf NoExtract
Related show

Commit Message

Eli Schwartz April 1, 2020, 3:29 p.m. UTC
From: Earnestly <zibeon@googlemail.com>

Current code accidently uses noupgrade for the NoExtract directive.

https://medium.com/@Code_Analysis/the-last-line-effect-7b1cb7f0d2a1

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
---

Previously fixed in
https://github.com/andrewgregory/pacutils/commit/64c7d0aca1a3aa3be5b7789f10ee1e5c9e0d7471
but the unfixed version got merged here. :/

 src/pacman/pacman-conf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andrew Gregory April 1, 2020, 4:15 p.m. UTC | #1
On 04/01/20 at 11:29am, Eli Schwartz wrote:
> From: Earnestly <zibeon@googlemail.com>
> 
> Current code accidently uses noupgrade for the NoExtract directive.
> 
> https://medium.com/@Code_Analysis/the-last-line-effect-7b1cb7f0d2a1
> 
> Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
> ---

ACK
Allan McRae April 13, 2020, 7:02 a.m. UTC | #2
On 2/4/20 1:29 am, Eli Schwartz wrote:
> From: Earnestly <zibeon@googlemail.com>
> 
> Current code accidently uses noupgrade for the NoExtract directive.
> 
> https://medium.com/@Code_Analysis/the-last-line-effect-7b1cb7f0d2a1

Ack.  But we don't need links to irrelevant websites in the commit
message...

> 
> Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
> ---
> 
> Previously fixed in
> https://github.com/andrewgregory/pacutils/commit/64c7d0aca1a3aa3be5b7789f10ee1e5c9e0d7471
> but the unfixed version got merged here. :/
> 
>  src/pacman/pacman-conf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/pacman/pacman-conf.c b/src/pacman/pacman-conf.c
> index 939cbdbd..f67ec21f 100644
> --- a/src/pacman/pacman-conf.c
> +++ b/src/pacman/pacman-conf.c
> @@ -348,7 +348,7 @@ static int list_directives(void)
>  		} else if(strcasecmp(i->data, "NoUpgrade") == 0) {
>  			show_list_str("NoUpgrade", config->noupgrade);
>  		} else if(strcasecmp(i->data, "NoExtract") == 0) {
> -			show_list_str("NoExtract", config->noupgrade);
> +			show_list_str("NoExtract", config->noextract);
>  
>  
>  		} else if(strcasecmp(i->data, "Architecture") == 0) {
>
Eli Schwartz April 13, 2020, 7:14 a.m. UTC | #3
On 4/13/20 3:02 AM, Allan McRae wrote:
> On 2/4/20 1:29 am, Eli Schwartz wrote:
>> From: Earnestly <zibeon@googlemail.com>
>>
>> Current code accidently uses noupgrade for the NoExtract directive.
>>
>> https://medium.com/@Code_Analysis/the-last-line-effect-7b1cb7f0d2a1
> 
> Ack.  But we don't need links to irrelevant websites in the commit
> message...

I've directly reposted the patch on Earnestly's behalf, and that is
where the website link came from. Personally, I'm fine with simply
dropping that line. Feel free to do so when pulling the patch.

Patch

diff --git a/src/pacman/pacman-conf.c b/src/pacman/pacman-conf.c
index 939cbdbd..f67ec21f 100644
--- a/src/pacman/pacman-conf.c
+++ b/src/pacman/pacman-conf.c
@@ -348,7 +348,7 @@  static int list_directives(void)
 		} else if(strcasecmp(i->data, "NoUpgrade") == 0) {
 			show_list_str("NoUpgrade", config->noupgrade);
 		} else if(strcasecmp(i->data, "NoExtract") == 0) {
-			show_list_str("NoExtract", config->noupgrade);
+			show_list_str("NoExtract", config->noextract);
 
 
 		} else if(strcasecmp(i->data, "Architecture") == 0) {