Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   ArchLinux Pacman Development (http://www.linux-archive.org/archlinux-pacman-development/)
-   -   makepkg: simplify su/sudo calling logic (http://www.linux-archive.org/archlinux-pacman-development/388022-makepkg-simplify-su-sudo-calling-logic.html)

Andres P 06-19-2010 06:48 AM

makepkg: simplify su/sudo calling logic
 
On Sat, Jun 19, 2010 at 1:59 AM, Allan McRae <allan@archlinux.org> wrote:
> On 19/06/10 10:50, Andres P wrote:
>>
>> Note that this still has the "using su fucks up the terminal" bug present
>> in
>> 3.4.
>
> Still has? *This is the first I am hearing of it... *Is there a bug report
> about this?

Not afaik, I just experienced it with >=3.4 (I had not tested pacman-git until
it was released in testing).

>> I can reproduce outside of makepkg:
>> $ fakeroot bash -c "su -c 'pacman -Q foo'"
>
> I can not see anything wrong when using that.
>

Hmm, but you do confirm that makepkg falling back to su screws up the terminal?

Andres P

Allan McRae 06-19-2010 07:54 AM

makepkg: simplify su/sudo calling logic
 
On 19/06/10 16:48, Andres P wrote:

On Sat, Jun 19, 2010 at 1:59 AM, Allan McRae<allan@archlinux.org> wrote:

On 19/06/10 10:50, Andres P wrote:


Note that this still has the "using su fucks up the terminal" bug present
in
3.4.


Still has? This is the first I am hearing of it... Is there a bug report
about this?


Not afaik, I just experienced it with>=3.4 (I had not tested pacman-git until
it was released in testing).


I can reproduce outside of makepkg:
$ fakeroot bash -c "su -c 'pacman -Q foo'"


I can not see anything wrong when using that.



Hmm, but you do confirm that makepkg falling back to su screws up the terminal?


No... I do not know what you mean by this. Can you post some output or
a screenshot?


Allan

Andres P 06-19-2010 08:33 AM

makepkg: simplify su/sudo calling logic
 
On Sat, Jun 19, 2010 at 3:24 AM, Allan McRae <allan@archlinux.org> wrote:
>
> No... *I do not know what you mean by this. *Can you post some output or a
> screenshot?

It'd be kind of difficult since the problem is mostly about what doesn't show
up.

It's like when you turn on flow control with ^S, type 'ls; echo foo' and press
enter, then press ^Q.

Except that I'm free to press enter and see the feedback on my scrollback
buffer from the commands that I press, whithout seeing a "preview" of it to the
right of my $PS1.


I've now isolated the problem and it does not happen with every su
operation, only
when cancelling the su password prompt.

Here's what I'm doing:

1. I uninstall asciidoc
2. curl http://aur.archlinux.org/packages/pacman-git/pacman-git.tar.gz | tar xz
3. cd pacman-git; makepkg -s
4. When it shows the su password prompt, I hit ^C

What I type is now invisible until I `reset`. Does not happen with sudo nor
from regular calls like `su -c ls` from my shell.



btw, I cannot get master nor latest tag to pipe files named after versioned
deps to $startdir; e.g. $startdir/4. makepkg falling back to su still calls
pacman -T correctly.

Andres P

Allan McRae 06-19-2010 08:54 AM

makepkg: simplify su/sudo calling logic
 
On 19/06/10 18:33, Andres P wrote:

On Sat, Jun 19, 2010 at 3:24 AM, Allan McRae<allan@archlinux.org> wrote:


No... I do not know what you mean by this. Can you post some output or a
screenshot?


It'd be kind of difficult since the problem is mostly about what doesn't show
up.

It's like when you turn on flow control with ^S, type 'ls; echo foo' and press
enter, then press ^Q.

Except that I'm free to press enter and see the feedback on my scrollback
buffer from the commands that I press, whithout seeing a "preview" of it to the
right of my $PS1.


I've now isolated the problem and it does not happen with every su
operation, only
when cancelling the su password prompt.

Here's what I'm doing:

1. I uninstall asciidoc
2. curl http://aur.archlinux.org/packages/pacman-git/pacman-git.tar.gz | tar xz
3. cd pacman-git; makepkg -s
4. When it shows the su password prompt, I hit ^C

What I type is now invisible until I `reset`. Does not happen with sudo nor
from regular calls like `su -c ls` from my shell.


ah... I can replicate. This is weird. Perhaps some sort of pipe is
still capturing the output?



btw, I cannot get master nor latest tag to pipe files named after versioned
deps to $startdir; e.g. $startdir/4. makepkg falling back to su still calls
pacman -T correctly.


1. update ABS
2. cp /var/abs/community-testing/pacman-contrib/* .
3. adjust dependencies to be depends=('pacman>4')
4. makepkg -s, type in your password. It will reinstall pacman from the
repos and then bail because on missing deps

5. notice file named "4" in you directory containing pacman output...

Andres P 06-19-2010 09:48 AM

makepkg: simplify su/sudo calling logic
 
On Sat, Jun 19, 2010 at 4:24 AM, Allan McRae <allan@archlinux.org> wrote:
> 1. update ABS
> 2. cp /var/abs/community-testing/pacman-contrib/* .
> 3. adjust dependencies to be *depends=('pacman>4')
> 4. makepkg -s, type in your password. *It will reinstall pacman from the
> repos and then bail because on missing deps
> 5. notice file named "4" in you directory containing pacman output...
>

Yep, now i see:

pacman-contrib $ cat 4
warning: downgrading package pacman (3.4.0-1 => 3.3.3-5)
resolving dependencies...
looking for inter-conflicts...

Targets (1): pacman-3.3.3-5

Total Download Size: 0.00 MB
Total Installed Size: 2.09 MB

checking package integrity...
checking for file conflicts...
upgrading pacman...

However, this is no longer an issue after my patch and can confirm
that there's no $startdir/4.

$ printf %q
"pacman>4"
pacman>4

Andres P


All times are GMT. The time now is 05:07 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.