Re: [PATCH] Re: deb-support-without-dpkg.patch was Re: AMC patches ported to mc-2006-02-03-13.tar.gz
On Thu, 9 Mar 2006, Leonard den Ottolander wrote: On Thu, 2006-03-09 at 10:45 +0200, Pavel Tsekov wrote: The \? is GNU extension Is it? From the GNU sed info manual: `\?' As `*', but only matches zero or one. It is a GNU extension. ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [PATCH] Re: deb-support-without-dpkg.patch was Re: AMC patches ported to mc-2006-02-03-13.tar.gz
On Thu, 9 Mar 2006, Leonard den Ottolander wrote: On Wed, 2006-03-08 at 17:50 +0200, Pavel Tsekov wrote: 2005 control.tar.gz It appears ar is the app which uses 4 field dates that I was looking for ;-s . Please try the following patch against vfs/extfs/uar. It removes the fourth date field from the ls output. The patch behaves well on Linux (with GNU tools), but not on Solaris for example. + thisyear=$(date +%Y) This should be changed to: thisyear=`date +%Y` Why is this necessary: + $XAR tv $1 | sed 's,^,-,;s, , 1 ,;s,/, ,' | sed -e s/\(.\?\)\([0-2][0-9]\:[0-5][0-9] \)\(${thisyear} \)\(.*\)/\1\2\4/ | sed -e s/\(.\?\)\([0-2][0-9]\:[0-5][0-9] \)\([0-2][0-9][0-9][0-9] \)\(.*\)/\1\3\4/ ^^^ The \? is GNU extension and I don't really understand why that construct is necessary (I am not a regex guru though) so can you explain ? Since it is impossible to distinguish between 3 and 4 field dates and the implementation of a separate path for 3 and 4 field dates is not trivial the approach should always be to strip down 4 field dates to 3 fields. I agree. Determining the date format could be achieved but it is not a trivial task and I am not really sure that it is so important after all. ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [PATCH] Re: deb-support-without-dpkg.patch was Re: AMC patches ported to mc-2006-02-03-13.tar.gz
Hi Pavel, On Thu, 2006-03-09 at 10:45 +0200, Pavel Tsekov wrote: thisyear=`date +%Y` I assumed the $(command) was portable. If not I need to restore the backticks in mc.wrapper.sh as well. The \? is GNU extension and I don't really understand why that construct is necessary (I am not a regex guru though) so can you explain ? The .* matches greedily, so a file name containing a time would be matched instead of the actual time. This is why I used the '?'. Is there a non GNU equivalent for a non greedy match? I'm no regex guru either, so input on how to do this better is appreciated. By the way, instead of a pipe the second expression should only be used if the first didn't match. The current construct strips the year of a file with a name that starts with a year and has a date in this year (i.e. 01:23 2006 2005 bla). I agree. Determining the date format could be achieved but it is not a trivial task and I am not really sure that it is so important after all. I'll document the fact that dates being passed to vfs_parse_ls_lga() need to be parsed back to 3 fields. Leonard. -- mount -t life -o ro /dev/dna /genetic/research ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [PATCH] Re: deb-support-without-dpkg.patch was Re: AMC patches ported to mc-2006-02-03-13.tar.gz
Hi Pavel, On Thu, 2006-03-09 at 10:45 +0200, Pavel Tsekov wrote: The \? is GNU extension Is it? Leonard. -- mount -t life -o ro /dev/dna /genetic/research ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: deb-support-without-dpkg.patch was Re: AMC patches ported to mc-2006-02-03-13.tar.gz
On Wed, 8 Mar 2006, Pavel Tsekov wrote: On Mon, 6 Feb 2006, Pavel Tsekov wrote: deb-support-without-dpkg.patch For systems withoput dpkg (almost any non-debian OS). It handles .deb files as regular .ar archives, as they are in reality. This would be nice addition. Only if we could avoid the 'O' option of gnu tar... Does anyone know of a way to avoid it ? In any case I think this patch is worth adding. I've played with this patch again and I found a problem. In fact it is a problem in uar... When I press enter on either a .deb file or .a file I get directory listing containing file names like this: [excerpt from libc.a] 2005 C-address.o 2005 C-collate.o 2005 C-ctype.o [excerpt from mc_4.6.1-1_i386.deb] 2005 control.tar.gz 2005 data.tar.gz 2005 debian-binary This may be blamed to vfs_parse_ls_lga() too since it processes the output of the extfs list command. Oh, well... ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: deb-support-without-dpkg.patch was Re: AMC patches ported to mc-2006-02-03-13.tar.gz
Hello Pavel, On Wed, 2006-03-08 at 17:50 +0200, Pavel Tsekov wrote: rw-r--r-- 250/250 50188 Nov 4 04:56 2005 C-ctype.o It is obvious that the list command of uar doesn't process the output properly and produces bad filenames. This is most probably caused by the fact that I removed the optional parsing of a fourth date field in vfs_parse_file_date() in utilvfs.c. Please do *not* restore the old behaviour as it is incapable of distinguishing between 3 and 4 field dates reliable. Instead a new function vfs_parse_file_date_4() should be created that is called explicitly for dates that are known to have four date fields. The old function can then be used for dates with three fields. I'm quite willing to implement this function (it's mostly a duplicate of the existing one), but please give me until next weekend. Thanks. Leonard. -- mount -t life -o ro /dev/dna /genetic/research ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: deb-support-without-dpkg.patch was Re: AMC patches ported to mc-2006-02-03-13.tar.gz
Hi, On Wed, 2006-03-08 at 17:35 +0100, Leonard den Ottolander wrote: On Wed, 2006-03-08 at 17:50 +0200, Pavel Tsekov wrote: rw-r--r-- 250/250 50188 Nov 4 04:56 2005 C-ctype.o Instead a new function vfs_parse_file_date_4() should be created that is called explicitly for dates that are known to have four date fields. The old function can then be used for dates with three fields. Hm. Still leaves the fact that vfs_parse_ls_lga() should be capable to distinguish between 3 and 4 field dates. This would require a rewrite of that function to distinguish between 3 and 4 field dates. Not trivial. The easier approach probably is to filter the output of ar through sed and get rid of the time field (simple but somewhat destructive) or to get rid of either the time field or the year field based on the current year... Leonard. -- mount -t life -o ro /dev/dna /genetic/research ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel