On 10-04-2015 23:32, Ken Moffat wrote:
> On Fri, Apr 10, 2015 at 09:49:39PM -0300, Fernando de Oliveira wrote:
>> On 10-04-2015 19:57, Ken Moffat wrote:
>>> second attempt - I keep forgetting that only my lfs address is
>>> subscribed to -book, but I probably ought to send this to -dev
>>> anyway, so I'll take the opportunity to change the subject.
>>>
>>> On Sat, Apr 04, 2015 at 06:27:12PM -0300, Fernando de Oliveira wrote:
>>>> On 04-04-2015 15:02, Chris Staub wrote:
>>>>> On 04/04/2015 01:43 PM, Chris Staub wrote:
>>>>>> On 04/04/2015 12:39 PM, [email protected] wrote:
>>>>>>> -        translations/source| cut -d/ -f4 | uniq</command>.
>>>>>>> +        translations/source| cut -d/ -f4 | uniq | sort</command> .
>>>>>>
>>>>>> I believe sort should be run before uniq, though it would likely be even
>>>>>> better to replace the whole "uniq | sort" construct with just "sort -u".
>>>>>
>>>>> Actually, this might be even better:
>>>>>
>>>>> tar -tf ../libreoffice-translations-4.4.2.2.tar.xz | awk -F/
>>>>> '/translations\/source/ {print $4}' | sort -u
>>>>
>>>> Thanks, Chris,
>>>>
>>>> Just the fact that two people learned the existence of that command,
>>>> introduced by Andy or Ken or someone else, today makes me feel that it
>>>> deserves to stay as is.
>>>>
>>> Just coming back to this, (wanting to confirm what happens with this
>>> new version if I continue to not install openldap, before I propose
>>> a slight rewording of the dep). Umm, I don't think it was me that
>>> came up with that command, and I had not previously noted it.  But
>>> for me it does not work!
>>
>> If it is for decreasing the number of recommended, it is very welcome, I
>> have already started doing as you told recently. This time I haven't
>> installed the red's and probably neither some others.
> 
> I took particular exception to openldap.  I think I already omitted
> one or two others, but I know for a fact that I only build a few
> other things because of LO and I'm not in any rush to drop things
> which are simple to build and with active maintainers who are
> friendly.
>>
>>> I think there have been changes in recent coreutils, but maybe it
>>> was in tar itself. For the translations, the owner and group from
>>> tar -tf on LFS-7.7 show up as 'cloph/users' with a '/' dividing
>>> them.
>>
>> $ porg coreutils tar
>> coreutils-8.23
>> tar-1.28
>>
>>> For me, -f5 instead of -f4 is now needed. Does the current version
>>> still work for anybody on LFS-7.7 (I guess that it _might_
>>> conceivably be a new locale issue) ?

>> ĸen, they works for me:

s/works/work/

>> tar -tf libreoffice-translations-4.4.2.2.tar.xz | \
>> awk -F/ '/translations\/source/ {print $4}' | \
>> third line

Only now, I noticed that I didn't use the two first lines from the book.

> I had remembered there was some discussion, tried the command in the
> Note (I'd overlooked it recently), and found that what the book said
> didn't work for me.  Yes, that command looks good and is even-more
> educational.

Sorry that it doesn't work for you. Can't understand, though.

Consider

tar -tf libreoffice-translations-4.4.2.2.tar.xz | \
grep translations/source

First line is

libreoffice-4.4.2.2/translations/source/

cut -d/ -f4

gives an empty line, here.

Second line until last one are:

libreoffice-4.4.2.2/translations/source/<lang-i>/(empty or something
else) where i ∈ {1, 2, ..., 119}

cut -d/ -f4 gives each <language> in sequence:

lang-1
lang-1
...
lang-2
lang-2
...
lang-119
lang-119
...

where lang-i ≠ lang-j, if i ≠ j.

but unsorted. Thus, the "uniq" will merge correctly all the duplicates,
no need to sort before.

I only included the "sort" command after, just to facilitate the
inspection now in alphabetical order. Didn't includ a "space" to
separate "source|" into "source |", because wanted to keep the original
form by Andy or somebody else, who, now I know, is not you.  :-)






Ah, now I think I know:

Are you using "tar -tf" or 'tar -vtf"? Perhaps an "alias" tar = "tar -v"?

With "tar -vtf", I got something like

drwxr-xr-x cloph/users       0 2015-03-26 08:51

for directories, or

-rw-r--r-- cloph/users   12829 2015-03-26 08:51

for files.

before the lines I described above, and this would explain your problem.
Or new version of tar includes "-v" by default?

-- 
[]s,
Fernando
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to