SliTaz SliTaz Forum

You are not logged in.

#1 2016-07-21 08:58:41

AnhHuynh
Member
Registered: 2016-07-08
Posts: 23

slitaz-5: tazpkg remove doesn't accept pipe input

In [c]slitaz-40[/c], I can cancel a package removal by

[c]

echo N | tazpkg remove htop

# Removal is cancelled.

[/c]

In [c]slitz-50[/c], this doesn't work anymore.

[c]

bash-4.3# tazpkg remove htop

Remove package "htop" (2.0.0)? (y/N) N

Uninstallation of package "htop" cancelled.

bash-4.3# echo N | tazpkg remove htop

Removing package "htop"

================================================================================

Removing all files installed...                                       [ Done ]

Update system databases...                                            [ Done ]

Removing package receipt...                                           [ Done ]

================================================================================

Package "htop" (2.0.0) removed.

[/c]

Offline

#2 2016-07-21 20:25:31

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: slitaz-5: tazpkg remove doesn't accept pipe input

Sorry, I see no point in this exercise.

http://hg.slitaz.org/tazpkg/file/d36dc9257f15/modules/remove#l125

TazPkg module 'remove' asks you for confirmation only [in interactive mode] and [option '--auto' is absent].

If you are not in interactive mode, then TazPkg believes you can't interactively answer to its questions and makes its own default decisions.

If option '--auto' is provided, it also skip the confirmations.

What are you REALLY want?

If you don't want to delete the package, you can just not to execute the command you share.

Offline

#3 2016-07-21 22:27:21

AnhHuynh
Member
Registered: 2016-07-08
Posts: 23

Re: slitaz-5: tazpkg remove doesn't accept pipe input

Basically, if a program can read from STDIN, then [c]echo N | tazpkg remove ...[/c] often works. It works in [c]slitaz-4.0[/c], but not in [c]slitaz-5.0[/c].

As I understand, [c]tazpkg[/c] assumes [c]yes[/c] to all answers in non-interactive mode. But what if users want to assume [c]no[/c]? Users can't answer to applications, but that doesn't mean they just want [c]yes[/c]. In other package managers (Debian, Arch), users must provide [c]--noconfirm[/c] option explicitly.

Offline

#4 2016-07-22 07:17:33

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: slitaz-5: tazpkg remove doesn't accept pipe input

Please update "slitaz-base-files" package to version 309, as well as update "tazpkg" package to version 913.

Changesets:

[*]http://hg.slitaz.org/slitaz-base-files/rev/1dd292a4b72b

[*]http://hg.slitaz.org/tazpkg/rev/92509572ed28

.

Cooking logs with the download package option:

[*]http://cook.slitaz.org/cooker.cgi?pkg=slitaz-base-files

[*]http://cook.slitaz.org/cooker.cgi?pkg=tazpkg

As option, check your selected mirror here: http://mirror1.slitaz.org/check/

When your selected mirror will upgraded to at least 2016-07-22 07:07 (UTC), these new packages will be available on your selected mirror, and you would upgrade aforementioned packages in the usual way (tazpkg recharge/upgrade).

Now, wherever requested confirmation, you can use the option for automatic acknowledgment:

[*]--yes for positive answer;

[*]--noconfirm for negative answer.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.016 seconds, 7 queries executed - Memory usage: 1.53 MiB (Peak: 1.77 MiB) ]