Antwort: Re: [Cooker] Re: rpmdrake unusable?

2000-07-07 Thread alexander . skwar



okay, thx.  will give it a try




Pixel <[EMAIL PROTECTED]> on 06.07.2000 16:41:09

An:   [EMAIL PROTECTED]
Kopie:[EMAIL PROTECTED] (Blindkopie: Alexander Skwar/de/delphiauto)
Thema:    Re: [Cooker] Re: rpmdrake unusable?



"Alexander Skwar" <[EMAIL PROTECTED]> writes:

> Where's the difference (haven't yet looked at it)?  Did you simply change
> the wget definition to
>
> $WGET="LC_ALL=C LANGUAGE=C wget --passive-ftp"

yep, in fact LANGUAGE=C is enough for wget...








Re: [Cooker] Re: rpmdrake unusable?

2000-07-06 Thread Alexander Skwar

On Thu, Jul 06, 2000 at 04:41:09PM +0200, Pixel wrote:
> "Alexander Skwar" <[EMAIL PROTECTED]> writes:
> 
> > Where's the difference (haven't yet looked at it)?  Did you simply change 
> > the wget definition to
> > 
> > $WGET="LC_ALL=C LANGUAGE=C wget --passive-ftp"
> 
> yep, in fact LANGUAGE=C is enough for wget...

Okay, I haven't tried it, but I actually don't like changing the language of
a program, so I created a small reg exp that extracts the byte number
printed by wget.

Assuming that line with filesize is something like

Länge: 123,456 (unmaßgeblich)

or

Länge: 654,321 [application/x-rpm]

or

Length: 987.654.321 (whatever)

this statement will return the byte size, if the line is stored in $line:

echo $line | perl -pe 'use locale;s?^\w+:\s([\d,.]+)\s[[(][\w/-]+[])]$?$+?'

This thingy works if the line begins with a number of word characters (like
a,b,c,Ä,Ö,Ü,ç ...) followed by a colon (:) followed by a white space
character, followed by any number of digit characters or comma (,) or dot
(.) followed again by a whitespace which is followed by either ( or [ which
must be followed by a number of word chars or / or - and must be ended by
either ] or ).  It will then return the last matching braced term, which is
the number of bytes.

Don't know how you'd integrate that in grpmi.pm, but I bet that there's a
way :]  Oh, and if you don't use "use locale", \w would not match "special"
characters like ä,ö,ü,ç.

Although WGET="LANGUAGE=C wget" also works (tried it now), I still like my
solution more :]

Alexander Skwar
-- 
Homepage:   http://www.digitalprojects.com
Sichere Mail?   Mail an [EMAIL PROTECTED] fuer GnuPG Keys
ICQ:7328191

 PGP signature


Re: [Cooker] Re: rpmdrake unusable?

2000-07-06 Thread Pixel

"Alexander Skwar" <[EMAIL PROTECTED]> writes:

> Where's the difference (haven't yet looked at it)?  Did you simply change 
> the wget definition to
> 
> $WGET="LC_ALL=C LANGUAGE=C wget --passive-ftp"

yep, in fact LANGUAGE=C is enough for wget...




Re: [Cooker] Re: rpmdrake unusable?

2000-07-06 Thread Alexander Skwar

>Precedence: list
>
>Alexander Skwar <[EMAIL PROTECTED]> writes:
>
> > --QQNwO3VdVfodZayb
> > Content-Type: text/plain; charset=us-ascii
> > Content-Transfer-Encoding: quoted-printable
> >
> > On Wed, Jul 05, 2000 at 10:59:51PM +0200, Pixel wrote:
> > > oups, can you try with no i18n?
> >
> > Yep, now it works.
> >
> > >
> > > aka, rm -f/usr/share/locale/*/LC_MESSAGES/wget.mo
> >
> > Worked
> >
> > >
> > > or LANG=C LC_ALL=C LANG=C gurpmi sag
> >
> > Did not work!
>
>yep, sorry, in fact should be "LANGUAGE=C gurpmi sag"
>
>
>i don't understand why it's not there :(
>
>uploading a new one now.

Where's the difference (haven't yet looked at it)?  Did you simply change 
the wget definition to

$WGET="LC_ALL=C LANGUAGE=C wget --passive-ftp"

Or did you do any other changes?

This is the package MandrakeUpdate, isn't it?

Thanks!


Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com




Re: [Cooker] Re: rpmdrake unusable?

2000-07-06 Thread Pablo Saratxaga

Kaixo!

On Thu, Jul 06, 2000 at 12:33:19PM +0200, Pixel wrote:

> > This is a search in the output from wget. However as wget is localized it does
> > not always return the word "Length". 
> > The solution is to force wget to be localized to english, thus ensuring that
> > the script works. This can be done by adding: "export LC_ALL=en_UK;" to the 
> > line that calls wget. 
> > Line 3 then becomes:
> > ***
> > $WGET = "export LC_ALL=en_UK;wget --passive-ftp";
> 
> thanks, done and uploaded in cooker.
> (at least i do $WGET = "LC_ALL=C wget --passive-ftp";)

LC_ALL=C will "unlocalize" strings get from the standard libc functions
(time format, number formats, etc); for actual translations done trough
gettext you alos need LANGUAGE=C

In other words, all automatic scripts must define

LC_ALL=C
LANGUAGE=C

any time they need to ensure a known state when running an external program
and reading back its output.

Note also that if such script interacts in some way with the user (printing
messages to him etc) it must not be completly unlocalized, so not

export LC_ALL=C
export LANGUAGE=C

but rather some

.
  system("LC_ALL=C LANGUAGE=C foobar parameters");



Note also that even if the output is just numeric the "unlocalization" must
be done too; some locales may format numeric output differently (well, 
currently that isn't really very used; but with the outcome of glibc 2.2
it will finally happen)

-- 
Ki ça vos våye bén,
Pablo Saratxaga

http://www.srtxg.easynet.be/PGP Key available, key ID: 0x8F0E4975




Re: [Cooker] Re: rpmdrake unusable?

2000-07-06 Thread Pixel

Alexander Skwar <[EMAIL PROTECTED]> writes:

> --QQNwO3VdVfodZayb
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: quoted-printable
> 
> On Wed, Jul 05, 2000 at 10:59:51PM +0200, Pixel wrote:
> > oups, can you try with no i18n?
> 
> Yep, now it works.
> 
> > 
> > aka, rm -f/usr/share/locale/*/LC_MESSAGES/wget.mo 
> 
> Worked
> 
> > 
> > or LANG=C LC_ALL=C LANG=C gurpmi sag
> 
> Did not work!

yep, sorry, in fact should be "LANGUAGE=C gurpmi sag"


i don't understand why it's not there :(

uploading a new one now.


Here is an old mail (10/99) :


Jørgen Hermanrud Fjeld <[EMAIL PROTECTED]> writes:

> Name: grpmi 
> Version : 0.9
> Release : 1mdk 
> 
> MandrakeUpdate rely upon grpmi which fails on line 15 in the file
> /usr/X11R6/bin/grpmi.pm
> excerpt line 15 with emphasis on error
> ***
> ($size) = /^Length: (.+?) / and last;
> ^^
> ***
> This is a search in the output from wget. However as wget is localized it does
> not always return the word "Length". 
> The solution is to force wget to be localized to english, thus ensuring that
> the script works. This can be done by adding: "export LC_ALL=en_UK;" to the 
> line that calls wget. 
> Line 3 then becomes:
> ***
> $WGET = "export LC_ALL=en_UK;wget --passive-ftp";

thanks, done and uploaded in cooker.
(at least i do $WGET = "LC_ALL=C wget --passive-ftp";)

cu Pixel.





Re: [Cooker] Re: rpmdrake unusable?

2000-07-06 Thread Pixel

Alexander Skwar <[EMAIL PROTECTED]> writes:

> > oups, can you try with no i18n?
> 
> Yep, now it works.

[...]

> So, I mv'ed wget.mo to some "safe" spot.  But I don't really want to do
> this.  Could you come up with a solution that does not make me delete the
> german localization of wget?


yeah, i thought i already did it once, i don't see why it's not there :-/

will see dig in cvs to know to find what happened,


thanks, cu Pixel.




Re: [Cooker] Re: rpmdrake unusable?

2000-07-05 Thread Alexander Skwar

On Wed, Jul 05, 2000 at 10:59:51PM +0200, Pixel wrote:
> oups, can you try with no i18n?

Yep, now it works.

> 
> aka, rm -f/usr/share/locale/*/LC_MESSAGES/wget.mo 

Worked

> 
> or LANG=C LC_ALL=C LANG=C gurpmi sag

Did not work!

So, I mv'ed wget.mo to some "safe" spot.  But I don't really want to do
this.  Could you come up with a solution that does not make me delete the
german localization of wget?

Alexander Skwar
-- 
Homepage:   http://www.digitalprojects.com
Sichere Mail?   Mail an [EMAIL PROTECTED] fuer GnuPG Keys
ICQ:7328191

 PGP signature


Re: [Cooker] Re: rpmdrake unusable?

2000-07-05 Thread Pixel

Alexander Skwar <[EMAIL PROTECTED]> writes:

> Verbindungsaufbau zu localhost:3128... verbunden!
> Proxy Anforderung gesendet, warte auf Antwort... 200 OK
> Länge: 131,828 [application/x-rpm]

oups, can you try with no i18n?

aka, rm -f/usr/share/locale/*/LC_MESSAGES/wget.mo 

or LANG=C LC_ALL=C LANG=C gurpmi sag




Re: [Cooker] Re: rpmdrake unusable?

2000-07-05 Thread Alexander Skwar

On Wed, Jul 05, 2000 at 12:06:43PM +0200, Pixel wrote:
> Alexander Skwar <[EMAIL PROTECTED]> writes:
> 
> > $WGET = "wget --passive-ftp";
> > 
> 
> maybe there is some change in wget output,
> could give me the output you get?

Sure, there are 3 attachments to this mail:

file=ftp://sunsite.uio.no/pub/unix/Linux/Mandrake-devel/cooker/Mandrake/RPMS//sag-0.7.0-2mdk.noarch.rpm

- wget-normal   : Output of 'wget $file'
- wget-passive  : Output of 'wget --passive-ftp $file'
- wget-no-proxy : Output of 'wget -Y off $file'

> because grpmi.pm gives some info to grpmi via stdout. Your "hi" makes everything
> explode nicely ;p

Ah!  Well, but why does it install sag when grpmi explodes?

Alexander Skwar
-- 
Homepage:   http://www.digitalprojects.com
Sichere Mail?   Mail an [EMAIL PROTECTED] fuer GnuPG Keys
ICQ:7328191


--17:57:30--  
ftp://sunsite.uio.no:21/pub/unix/Linux/Mandrake-devel/cooker/Mandrake/RPMS/sag-0.7.0-2mdk.noarch.rpm
   => `sag-0.7.0-2mdk.noarch.rpm.1'
Verbindungsaufbau zu localhost:3128... verbunden!
Proxy Anforderung gesendet, warte auf Antwort... 200 OK
Länge: 131,828 [application/x-rpm]

0K -> .. .. .. .. .. [ 38%]
   50K -> .. .. .. .. .. [ 77%]
  100K -> .. ..  [100%]

17:57:30 (7.40 MB/s) - »sag-0.7.0-2mdk.noarch.rpm.1« gesichert [131828/131828]



--17:57:48--  
ftp://sunsite.uio.no:21/pub/unix/Linux/Mandrake-devel/cooker/Mandrake/RPMS/sag-0.7.0-2mdk.noarch.rpm
   => `sag-0.7.0-2mdk.noarch.rpm.2'
Verbindungsaufbau zu localhost:3128... verbunden!
Proxy Anforderung gesendet, warte auf Antwort... 200 OK
Länge: 131,828 [application/x-rpm]

0K -> .. .. .. .. .. [ 38%]
   50K -> .. .. .. .. .. [ 77%]
  100K -> .. ..  [100%]

17:57:48 (11.43 MB/s) - »sag-0.7.0-2mdk.noarch.rpm.2« gesichert [131828/131828]



--17:57:58--  
ftp://sunsite.uio.no:21/pub/unix/Linux/Mandrake-devel/cooker/Mandrake/RPMS/sag-0.7.0-2mdk.noarch.rpm
   => `sag-0.7.0-2mdk.noarch.rpm.3'
Verbindungsaufbau zu sunsite.uio.no:21... verbunden!
Einloggen als anonymous ... Eingeloggt!
==> TYPE I ... fertig.  ==> CWD pub/unix/Linux/Mandrake-devel/cooker/Mandrake/RPMS ... 
fertig.
==> PORT ... fertig.==> RETR sag-0.7.0-2mdk.noarch.rpm ... fertig.
Länge: 131,828 (unmaßgeblich)

0K -> .. .. .. .. .. [ 38%]
   50K -> .. .. .. .. .. [ 77%]
  100K -> .. ..  [100%]

18:00:28 (1.20 KB/s) - »sag-0.7.0-2mdk.noarch.rpm.3« gespeichert [131828]


 PGP signature


Re: [Cooker] Re: rpmdrake unusable?

2000-07-05 Thread Pixel

Alexander Skwar <[EMAIL PROTECTED]> writes:

> $WGET = "wget --passive-ftp";
> 

maybe there is some change in wget output,
could give me the output you get?

[...]

> But why in the world does gurpmi now install the package when I have the
> line 'print("hi");' inserted, and does not install the package but only
> fetches it and stores it in /tmp when I do not have that line?

because grpmi.pm gives some info to grpmi via stdout. Your "hi" makes everything
explode nicely ;p


thanks, cu Pixel.




Re: [Cooker] Re: rpmdrake unusable?

2000-07-04 Thread Alexander Skwar

On Wed, Jul 05, 2000 at 12:06:30AM +0200, Pixel wrote:
> Alexander Skwar <[EMAIL PROTECTED]> writes:
> 
> > Died at /usr/X11R6/bin/grpmi.pm line 17,  line 12.
> 
> try with gurpmi instead of urpmi, does it fails?

Yes, I get the same error when I use gurpmi directly.

Okay, now I'm totally baffled.  I fiddled a bit with
/usr/X11R6/bin/grpmi.pm.  The first 7 lines now read

---
#!/usr/bin/perl

$WGET = "wget --passive-ftp";

print("hi");

chdir "/tmp";
--

I inserted the line 'print("hi");'.  Now gurpmi installs the package all the
time (meaning, I can rm /tmp/sag*rpm ; rpm -e sag and install sag with
gurpmi sag again).  gurpmi still dies:

Died at /usr/X11R6/bin/grpmi.pm line 19,  line 14.

Gtk-CRITICAL **: file gtkprogress.c: line 518 (gtk_progress_set_percentage): assertion 
`percentage >= 0 && percentage <= 1.0' failed.

lines 19 and 14 I posted earlier (these are the old lines 17 and 12).

But why in the world does gurpmi now install the package when I have the
line 'print("hi");' inserted, and does not install the package but only
fetches it and stores it in /tmp when I do not have that line?

Confused,
Alexander Skwar
-- 
Homepage:   http://www.digitalprojects.com
Sichere Mail?   Mail an [EMAIL PROTECTED] fuer GnuPG Keys
ICQ:7328191

 PGP signature


[Cooker] Re: rpmdrake unusable?

2000-07-04 Thread Pixel

Alexander Skwar <[EMAIL PROTECTED]> writes:

> Died at /usr/X11R6/bin/grpmi.pm line 17,  line 12.

try with gurpmi instead of urpmi, does it fails?
(rpmdrake uses gurpmi so it *should* fail)




[Cooker] Re: rpmdrake unusable?

2000-07-04 Thread Alexander Skwar

On Tue, Jul 04, 2000 at 08:42:21PM +0200, Pixel wrote:
> works nicely for me (i didn't use rpmdrake though, used urpmi directly)
> 
> pixel@leia:~> urpmi sag
> installing 
>ftp://sunsite.uio.no/pub/unix/Linux/Mandrake-devel/cooker/Mandrake/RPMS/sag-0.7.0-2mdk.noarch.rpm
> 

Okay, urpmi works here as well, but rpmdrake doesn't, so my subject is
correct.  I tried to install sag (407 MB :]), and this simply stops with the
error message I posted earlier.  Further I get this error on stdout or
stderr (don't know):

Died at /usr/X11R6/bin/grpmi.pm line 17,  line 12.

Line 17 is:

unless ($size) { print_int(-1); die; }

Line 12:

open F, "$WGET -c $ARGV[0] 2>&1 |";

Does it not find wget?  It is in /usr/bin.  Does passive FTP work with a
Squid ftp proxy?  /tmp is chmod  (drwsrwsrwt).

Who is responsible for rpmdrake?  I mailed this originally to Pixel (and the
list) because Pixel is the packager of the RPM.

Alexander Skwar
-- 
Homepage:   http://www.digitalprojects.com
Sichere Mail?   Mail an [EMAIL PROTECTED] fuer GnuPG Keys
ICQ:7328191

 PGP signature


Re: [Cooker] Re: rpmdrake unusable?

2000-07-04 Thread Pixel

Alexander Skwar <[EMAIL PROTECTED]> writes:

[...]

> > Ok ack, I misread this, this works from the CLI but not from rpmdrake
> 
> Nice, I'm not the only one being unable to use rpmdrake.  This is another
> point that doesn't work with rpmdrake.  And the sizes are a "little" bit of,
> the sag package is supposed to be about 400 MB in size.

wow, nice one!




Re: [Cooker] Re: rpmdrake unusable?

2000-07-04 Thread Alexander Skwar

On Tue, Jul 04, 2000 at 02:40:29PM -0500, Bryan Paxton wrote:
> Ok ack, I misread this, this works from the CLI but not from rpmdrake

Nice, I'm not the only one being unable to use rpmdrake.  This is another
point that doesn't work with rpmdrake.  And the sizes are a "little" bit of,
the sag package is supposed to be about 400 MB in size.

Alexander Skwar
-- 
Homepage:   http://www.digitalprojects.com
Sichere Mail?   Mail an [EMAIL PROTECTED] fuer GnuPG Keys
ICQ:7328191

 PGP signature


Re: [Cooker] Re: rpmdrake unusable?

2000-07-04 Thread Bryan Paxton

Ok ack, I misread this, this works from the CLI but not from rpmdrake

On Tue, 04 Jul 2000, you wrote:
> Bryan Paxton <[EMAIL PROTECTED]> writes:
> 
> > urpmi.addmedia free 
>ftp://ftp.free.fr/pub/Distributions_Linux/Mandrake/7.1/Mandrake/RPMS
> 
> should be:
> 
> urpmi.addmedia free 
>ftp://ftp.free.fr/pub/Distributions_Linux/Mandrake/7.1/Mandrake/RPMS with 
>../base/hdlist.cz2
-- 
Bryan Paxton

"How should I know if it works? That's what beta testers are for. I
  only coded it."
 -- Linus Torvalds.

Public key can be found at http://speedbros.org/Bryan_Paxton.asc




Re: [Cooker] Re: rpmdrake unusable?

2000-07-04 Thread Bryan Paxton

I wish that were so, but it's not going ; )
>From the CLI or from rpmdrake.

I mean from the CLI exactly how should it be ? 
And from rpmdrake, well I really have no control over that(unless I go in and hackle 
the src)


On Tue, 04 Jul 2000, you wrote:
> Bryan Paxton <[EMAIL PROTECTED]> writes:
> 
> > urpmi.addmedia free 
>ftp://ftp.free.fr/pub/Distributions_Linux/Mandrake/7.1/Mandrake/RPMS
> 
> should be:
> 
> urpmi.addmedia free 
>ftp://ftp.free.fr/pub/Distributions_Linux/Mandrake/7.1/Mandrake/RPMS with 
>../base/hdlist.cz2
-- 
Bryan Paxton

"How should I know if it works? That's what beta testers are for. I
  only coded it."
 -- Linus Torvalds.

Public key can be found at http://speedbros.org/Bryan_Paxton.asc




Re: [Cooker] Re: rpmdrake unusable?

2000-07-04 Thread Guillaume Rousse

Bryan Paxton a écrit :
> 
> On Tue, 04 Jul 2000, Pixel wrote:
> > Alexander Skwar <[EMAIL PROTECTED]> writes:
> > try "urpmi.update -a" and then installing sag agin.
> >
> > works nicely for me (i didn't use rpmdrake though, used urpmi directly)
> >
> > pixel@leia:~> urpmi sag
> > installing 
>ftp://sunsite.uio.no/pub/unix/Linux/Mandrake-devel/cooker/Mandrake/RPMS/sag-0.7.0-2mdk.noarch.rpm
> --
> 
> Hum I can't even get ftp mirrors to add : )
> 
> urpmi.addmedia free 
>ftp://ftp.free.fr/pub/Distributions_Linux/Mandrake/7.1/Mandrake/RPMS
> usage: urpmi.addmedia  
> where  is one of
> file://
> ftp://:@/ with 
> ftp:/// with 
> http:/// with 
> removable__://
>   `with' missing for ftp media
> 
> Same error when trying to add this through rpmdrake...
> Am I doing something wrong here ? : )
what U need is
urpmi.addmedia free
ftp://ftp.free.fr/pub/Distributions_Linux/Mandrake/7.1/Mandrake/RPMS
with ../base/hdlist.cz2

I never achieved this using rpmdrake too

-- 
Guillaume Rousse
Iremia - Université de la Réunion

Sleep doesn't exists. Just lack of cafeine.




Re: [Cooker] Re: rpmdrake unusable?

2000-07-04 Thread Pixel

Bryan Paxton <[EMAIL PROTECTED]> writes:

> urpmi.addmedia free 
>ftp://ftp.free.fr/pub/Distributions_Linux/Mandrake/7.1/Mandrake/RPMS

should be:

urpmi.addmedia free 
ftp://ftp.free.fr/pub/Distributions_Linux/Mandrake/7.1/Mandrake/RPMS with 
../base/hdlist.cz2




Re: [Cooker] Re: rpmdrake unusable?

2000-07-04 Thread Bryan Paxton

On Tue, 04 Jul 2000, Pixel wrote:
> Alexander Skwar <[EMAIL PROTECTED]> writes:
> try "urpmi.update -a" and then installing sag agin.
> 
> works nicely for me (i didn't use rpmdrake though, used urpmi directly)
> 
> pixel@leia:~> urpmi sag
> installing 
>ftp://sunsite.uio.no/pub/unix/Linux/Mandrake-devel/cooker/Mandrake/RPMS/sag-0.7.0-2mdk.noarch.rpm
-- 

Hum I can't even get ftp mirrors to add : )

urpmi.addmedia free 
ftp://ftp.free.fr/pub/Distributions_Linux/Mandrake/7.1/Mandrake/RPMS
usage: urpmi.addmedia  
where  is one of
file://
ftp://:@/ with 
ftp:/// with 
http:/// with 
removable__://
  `with' missing for ftp media

Same error when trying to add this through rpmdrake...
Am I doing something wrong here ? : )



-- 
Bryan Paxton

"How should I know if it works? That's what beta testers are for. I
  only coded it."
 -- Linus Torvalds.

Public key can be found at http://speedbros.org/Bryan_Paxton.asc




[Cooker] Re: rpmdrake unusable?

2000-07-04 Thread Pixel

Alexander Skwar <[EMAIL PROTECTED]> writes:

> How do I use rpmdrake?  I removed the listings for cdrom[1-4] and added the
> an FTP url for cooker to rpmdrake.  Next I wanted to install a package
> (sag).  After a shortwhile an error message popped up, saying: "Fehler beim
> holen von sag".  (Error while fetching sag).  What did I do wrong?  The sag
> package is available at the mirror I entered (sunsite.uio.no).

maybe the package changed in between?
try "urpmi.update -a" and then installing sag agin.

works nicely for me (i didn't use rpmdrake though, used urpmi directly)

pixel@leia:~> urpmi sag
installing 
ftp://sunsite.uio.no/pub/unix/Linux/Mandrake-devel/cooker/Mandrake/RPMS/sag-0.7.0-2mdk.noarch.rpm