You are not logged in.

#1 2014-05-10 02:54:25

amish
Member
Registered: 2014-05-10
Posts: 513

pacman default as NO?

Sorry if this is already asked. I searched for "pacman default no" in Google but could not find answer.

When one runs 'pacman -Syu'

At end it asks:
:: Proceed with installation? [Y/n]

What I want is that default answer should be NO insted of Yes.
i.e. simply pressing enter (or anything other than Y) should be treated as NO.

How can I do that?

Thanks in advance.

PS: I wonder why N is not default? I think people normally dont upgrade directly. First they just check what pakages are in upgrade queue and if there is important update only then they upgrade it. Otherwise people upgrade only at say end OR beginning of the day. (Thats what I do)

Last edited by amish (2014-05-10 03:00:56)

Offline

#2 2014-05-10 02:59:39

Jristz
Member
From: America/Santiago
Registered: 2011-06-11
Posts: 1,048

Re: pacman default as NO?

I think this is a security flaw, I mean if somecontrol of pacman can force it to accept untrhusted packages with sign or nothing as an local intall with a simple "enter"

Someone (*cof* Allal *cof*) know if any but concerning this is open or if the next pacman release will have a NO by default??


Lenovo ThinkPad L420 modified
:: Intel i7 2560QM :: 8 GB RAM :: SSD 256 GB ::
:: DVD read+Writter :: 3 USB 3.0 Expresa Card ::
:: a Favulous 1 mins lasting Io-Li battery ::cry::

Offline

#3 2014-05-10 03:03:02

amish
Member
Registered: 2014-05-10
Posts: 513

Re: pacman default as NO?

Yes I agree its a BIG flaw in my opinion. But there may be reason for doing this (which I am unaware of).

Even if they prefer to keep default as YES, I still feel there should atleast be option in pacman.conf to set default as NO.

Offline

#4 2014-05-10 03:03:16

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: pacman default as NO?

That's hard coded. They only way to change it is to change the code and rebuild.

A security flaw? You have to be root to do anything. If you're worried about the security of someone who has root access, you have far bigger problems.

PS: I wonder why N is not default? I think people normally dont upgrade directly. First they just check what pakages are in upgrade queue and if there is important update only then they upgrade it. Otherwise people upgrade only at say end OR beginning of the day. (Thats what I do)

No, this is not what most people do and it is very wrong. Read up on why using pacman -Sy alone is bad. You're doing effectively the same thing.

Last edited by Scimmia (2014-05-10 03:06:33)

Offline

#5 2014-05-10 03:10:13

Ziusudra
Member
Registered: 2014-04-19
Posts: 120

Re: pacman default as NO?

Besides having to be root to make any changes there is also SigLevel, see man pacman.conf. (SigLevel = Required TrustedOnly)

Offline

#6 2014-05-10 03:21:09

amish
Member
Registered: 2014-05-10
Posts: 513

Re: pacman default as NO?

@Scimmia
Umm, thats not helpful answer.

That can be answer to any query here. "You want something, go change code."

You have different opinion and I have mine.

pacman -Su alone is bad if you are not careful. (Not otherwise). For example if I had run pacman -Syu just 5 minutes back, its most likely that there is no need to refresh again (I have slow internet I can not afford to wait everytime by using -y option)

Sometimes you know in advance that certain update in pacman -Syu is broken. (For example latest squid is breaking for me)

So I when I run pacman -Syu I first check if NEW squid is available. If yes I will upgrade if no then I hand pick the updates. (Using pacman -S)

(I do not want to put squid in IgnorePkg option)

There are other reasons as well.

Last edited by amish (2014-05-10 03:26:03)

Offline

#7 2014-05-10 03:27:24

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: pacman default as NO?

And there is it. You want this to help you do partial updates.

https://wiki.archlinux.org/index.php/Pa … nsupported

If you want this changed, you have to make a case. False security flaws and partial updates are not going to get it done.

Offline

#8 2014-05-10 03:32:10

amish
Member
Registered: 2014-05-10
Posts: 513

Re: pacman default as NO?

Please read the reason why "Partial upgrades are not supported". In most cases, its not supported when there is change in "Library".

Arch is "Do it yourself" so I am free to decide when to upgrade and what to upgrade. Just that I have to be careful that I dont break anything.

Plus I did not say I want partial upgrade. I just said that, I want N as default option.

I just want to see what is available, if anything is important, I upgrade immediately and if not then I will upgrade later at end of the day. (or may be 2-3 days)

Last edited by amish (2014-05-10 03:33:43)

Offline

#9 2014-05-10 03:36:34

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: pacman default as NO?

Everyone thinks their way is the best way, even if it's really screwed up: http://xkcd.com/1172/

Offline

#10 2014-05-10 03:39:13

amish
Member
Registered: 2014-05-10
Posts: 513

Re: pacman default as NO?

Right, "Everyone thinks their way is the best way!"

Thats why they came up with conf files.

Set your own choice.

PS: I did not ask to change the default, I just asked allow me to change the default. Dont hardcode it.

Last edited by amish (2014-05-10 03:40:29)

Offline

#11 2014-05-10 03:40:37

circleface
Member
Registered: 2012-05-26
Posts: 639

Re: pacman default as NO?

Keep in mind, if you do partial upgrades, you won't be able to recieve any help from the forums.

Offline

#12 2014-05-10 03:42:42

amish
Member
Registered: 2014-05-10
Posts: 513

Re: pacman default as NO?

Hmm, again, I am NOT favoring partial upgrades.

Offline

#13 2014-05-10 03:47:50

amish
Member
Registered: 2014-05-10
Posts: 513

Re: pacman default as NO?

Ok now another related point.

Lets say I am removing a package... pacman -R XXX

What worries me is this:
:: Do you want to remove these packages? [Y/n]

Here too default is YES.

It is so dangerous. Atleast here user should be asked to be VERY SPECIFIC, that "YES, I really want to remove package". Simply pressing enter should be treated as NO atleast in package removal case.

I hope you guys atleast agree on this.

Last edited by amish (2014-05-10 03:48:50)

Offline

#14 2014-05-10 03:49:41

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: pacman default as NO?

So dangerous...if you're paying no attention at all.

FYI: https://bugs.archlinux.org/task/14724

Offline

#15 2014-05-10 03:55:02

amish
Member
Registered: 2014-05-10
Posts: 513

Re: pacman default as NO?

Please click "add vote", to those who want this feature.

OR to those who believe that default should be left as YES, but others should be allowed to change this behaviour via pacman.conf


Just noticed that the "feature request" is closed! Saying will not be implemented.

Fail to understand whats wrong in giving option in pacman.conf.

Last edited by amish (2014-05-10 03:57:45)

Offline

#16 2014-05-10 04:02:24

HalosGhost
Forum Fellow
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,097
Website

Re: pacman default as NO?

Aside from making your life barely any easier at all, is there a valid reason for this change to happen?

All the best,

-HG

Offline

#17 2014-05-10 04:26:09

amish
Member
Registered: 2014-05-10
Posts: 513

Re: pacman default as NO?

Any feature added to any software is to make life easier right? So thats the perfect reason.

Infact mostly that is the only reason people ask for a feature.

And when you have two different types of people, you add a configuration option.

And I am not alone. There are others who want this feature.

Btw, I have already started checking code to add a patch to pacman which will NOT change anything what is current. (So you should be happy). It will simply add option in pacman.conf

If all is well patch will be ready by my evening.(in about 5-8 hours) (Unless i get busy doing something more important)

I will just hope that people dont start objecting to patch when I submit it.

Thanks everyone for their views.

Last edited by amish (2014-05-10 04:35:07)

Offline

#18 2014-05-10 05:07:05

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: pacman default as NO?

/usr/bin/checkupdates

Offline

#19 2014-05-10 09:21:44

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: pacman default as NO?

amish wrote:

I wonder why N is not default? I think people normally dont upgrade directly. First they just check what pakages are in upgrade queue and if there is important update only then they upgrade it. Otherwise people upgrade only at say end OR beginning of the day. (Thats what I do)

BS. 'pacman' is used to update the system. If you don't want to update but just check what updates are available - use 'checkupdates'.
No patches needed.

Offline

#20 2014-05-10 10:15:49

amish
Member
Registered: 2014-05-10
Posts: 513

Re: pacman default as NO?

No offense but please do not swear. Just because your view is different. Thank you.

Original bug report closing comment was to make "patch". So I have made the patch.

You can see the patch and its description at:
https://bugs.archlinux.org/task/14724

Last edited by amish (2014-05-10 10:16:23)

Offline

#21 2014-05-10 10:18:27

amish
Member
Registered: 2014-05-10
Posts: 513

Re: pacman default as NO?

Its not just about checkupdates. Its also about -R. -U, -S option. Also about accidentally replacing upgraded version with downgraded version.

So if you think the checkupdates is the answer. It is not.

Hope you understand why I need this thing. Thank you.

Offline

#22 2014-05-10 10:21:21

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,174
Website

Re: pacman default as NO?

Personally, I believe that the pacman default of [Y/n] is perfectly fine. As pointed out above, there are other ways of checking for updates without invoking the package manager. In addition, the very nature of ArchLinux requires you to pay attention, so you shouldn't be blindly running pacman and accepting the defaults without thinking about it.

EDIT: Also, you need to be root to run pacman as it is. As pointed out the first time you run sudo, running things with root comes with great responsibility and it is assumed you are careful enough to know what you are doing.

EDIT2 (see a couple of comments down):

amish wrote:

Why do people do, "alias rm='rm -i'"? When you are going to pay attention. Why have that alias or why even have that option in rm?

I've been using Linux for years and I've never heard of alias-ing...

Last edited by clfarron4 (2014-05-10 18:26:26)


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#23 2014-05-10 10:44:09

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,019

Re: pacman default as NO?

I think I press enter when I want pacman to continue and Ctrl-C when I don't. Hm, seems you have to press enter after pressing y or n anyway. Much keypressing!

Offline

#24 2014-05-10 10:55:51

amish
Member
Registered: 2014-05-10
Posts: 513

Re: pacman default as NO?

It requires you to pay attention. Fine. I agree.

But is it always possible to have attention? Accidents do happen no matter how much you try.

My approach is, if something is going to change the system (esp. alter packages), better "be specific, yes I want to add/remove etc."

Why do people do, "alias rm='rm -i'"? When you are going to pay attention. Why have that alias or why even have that option in rm?

Offline

#25 2014-05-10 12:18:43

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,459
Website

Re: pacman default as NO?

Amish, I can't help but suspect that much of the tension in this thread ultimately comes from your faulty assumptions about what "people" normally do.

amish wrote:

PS: I wonder why N is not default? I think people normally dont upgrade directly. First they just check what pakages are in upgrade queue and if there is important update only then they upgrade it. Otherwise people upgrade only at say end OR beginning of the day. (Thats what I do)

You thought wrong.  This is not at all a normal use of pacman.  It is an explicitly unsupported use of pacman.  But this might be OK.  If you had started your thread noting that what you want is not the norm, but you'd like help achieving it, then you may have received a warmer welcome in this thread.  There would still probably be lots of warnings and comments about how this could lead to major issues.  But it might also lead to solutions.

These forums are generally quite amenable to helping users scratch their own personal itches and configure things in their own unique  ways.  But when one comes in prescribing what should be done - especially when what is prescribed is specifically unsupported - then you can't expect a kiind reception.

On the issue at hand, however, I believe Scimmia is right: there is no built in option for this.  Saying the code must be revised is not a way of dismissing your issue, it *is* likely the only option.  Config files can only modify aspects of a tool that were designed to be configured.

Last edited by Trilby (2014-05-10 12:20:47)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB