Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix three VFSs that use obolete dates: hp48, uace, uarc. #3729

Closed
mc-butler opened this issue Nov 23, 2016 · 28 comments
Closed

Fix three VFSs that use obolete dates: hp48, uace, uarc. #3729

mc-butler opened this issue Nov 23, 2016 · 28 comments
Assignees
Labels
area: vfs Virtual File System support prio: low Minor problem or easily worked around
Milestone

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/3729
Reporter mooffie (@mooffie)

(Forking from #3696.)

These VFSs use the "Mon DD YYYY hh:mm" format, which since 2006 is no longer supported.

Note

Original attachments:

@mc-butler
Copy link
Author

Changed by mooffie (@mooffie) on Nov 23, 2016 at 14:00 UTC (comment 1)

  • Blocked by set to #3730

It will be very easy to fix these once we have #3730 in.

@mc-butler
Copy link
Author

Changed by mooffie (@mooffie) on Dec 16, 2016 at 14:05 UTC (comment 2)

(Just wanted to say that I've had the patches ready for a couple of days. I'll post them soon. The tester in #3730 indeed makes things easy.)

@mc-butler
Copy link
Author

Changed by mooffie (@mooffie) on Dec 20, 2016 at 1:14 UTC (comment 3)

I'm marking this "blocked by #3744". The tickets are unrelated but both touch Makefile.am and will therefore result in merge conflict unless ordered.

@mc-butler
Copy link
Author

Changed by mooffie (@mooffie) on Dec 23, 2016 at 8:55 UTC (comment 4)

Here are the patches. They include tests.

But wait till #3744 gets committed.

Notes:

  • You don't need to wait 5 years for somebody to review these patches. Those days are over. You can commit them asap: the accompanying tests will tell you if everything is ok.
  • The patches also fix a few other minor bugs in the helpers. It was a necessity: It's not possible to write tests without first making the helpers work.
  • (The commit messages begin with "Ticket #3729:" only in the 3 patches that fix the date format.)

@mc-butler
Copy link
Author

Changed by mooffie (@mooffie) on Dec 23, 2016 at 8:59 UTC

@mc-butler
Copy link
Author

Changed by mooffie (@mooffie) on Dec 23, 2016 at 9:00 UTC

@mc-butler
Copy link
Author

Changed by mooffie (@mooffie) on Dec 23, 2016 at 9:00 UTC

@mc-butler
Copy link
Author

Changed by mooffie (@mooffie) on Dec 23, 2016 at 9:00 UTC

@mc-butler
Copy link
Author

Changed by mooffie (@mooffie) on Dec 23, 2016 at 9:00 UTC

@mc-butler
Copy link
Author

Changed by mooffie (@mooffie) on Dec 23, 2016 at 9:00 UTC

@mc-butler
Copy link
Author

Changed by mooffie (@mooffie) on Dec 23, 2016 at 9:01 UTC

@mc-butler
Copy link
Author

Changed by mooffie (@mooffie) on Dec 23, 2016 at 9:01 UTC

@mc-butler
Copy link
Author

Changed by mooffie (@mooffie) on Dec 23, 2016 at 9:01 UTC

@mc-butler
Copy link
Author

Changed by mooffie (@mooffie) on Dec 23, 2016 at 9:01 UTC

@mc-butler
Copy link
Author

Changed by mooffie (@mooffie) on Dec 23, 2016 at 9:01 UTC

@mc-butler
Copy link
Author

Changed by mooffie (@mooffie) on Dec 23, 2016 at 9:01 UTC

@mc-butler
Copy link
Author

Changed by mooffie (@mooffie) on Dec 23, 2016 at 9:02 UTC

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Dec 24, 2016 at 11:38 UTC (comment 5)

  • Owner set to zaytsev
  • Milestone changed from Future Releases to 4.8.19
  • Status changed from new to accepted

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Dec 24, 2016 at 12:33 UTC (comment 6)

  • Branch state changed from no branch to on review

Branch: 3729_vfs_date_fixes
Initial changeset: [9dac3f2669c8f3f3f1be302a3bfe7c536bec4731].

Awesome, I'm very impressed, especially by the hp48 fixes :-)

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Dec 24, 2016 at 13:01 UTC (comment 7)

Looking at the Travis build log:

Testing /home/travis/build/MidnightCommander/mc/distrib/mc-f1ef3702948950b65da87ef8442a6dc2e6f52ac2/build-default/../tests/src/vfs/extfs/helpers-list/data/u7z.complex.input

/home/travis/build/MidnightCommander/mc/distrib/mc-f1ef3702948950b65da87ef8442a6dc2e6f52ac2/build-default/../tests/src/vfs/extfs/helpers-list/data/u7z.complex.output /tmp/u7z.actual-parsed-output.UZf4llQ9 differ: byte 1908, line 21

ERROR: u7z has produced output that's different than the expected output.

...

w00t? Here is the answer:

tar: mc-f1ef3702948950b65da87ef8442a6dc2e6f52ac2/tests/src/vfs/extfs/helpers-list/data/u7z.missing-size-and-date.env_vars: file name is too long (max 99); not dumped

Not nice :-( time to switch to at least tar-ustar? First need to fix #3603 though. In the mean time, trying to work around it by adding --always to git describe.

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Dec 25, 2016 at 5:58 UTC (comment 8)

  • Branch state changed from on review to approved
  • Votes set to andrew_b

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Dec 25, 2016 at 6:13 UTC (comment 9)

  • Resolution set to fixed
  • Branch state changed from approved to merged
  • Status changed from accepted to testing
  • Votes changed from andrew_b to committed-master

Merged to master: [f40caa3].

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Dec 25, 2016 at 6:13 UTC (comment 10)

  • Status changed from testing to closed

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Dec 27, 2016 at 7:58 UTC (comment 11)

Well, I got an error in hp48+ test:

--- hp48+.actual-parsed-output.hDRkf1Mr	2016-12-27 10:54:57.459848035 +0300
+++ hp48+.actual-output.yAx9c3Ry	2016-12-27 10:54:57.457848045 +0300
@@ -1,3 +1,3 @@
--rw-r--r--   1        0        0          0 /YEN
--rw-r--r--   1        0        0          0 /JYTLIGHT
--rw-r--r--   1        0        0          0 /IOPAR
+-rw-r--r--   1 0        0               0 12-27-2016 10:54 /YEN
+-rw-r--r--   1 0        0               0 12-27-2016 10:54 /JYTLIGHT
+-rw-r--r--   1 0        0               0 12-27-2016 10:54 /IOPAR

@mc-butler
Copy link
Author

Changed by mooffie (@mooffie) on Dec 27, 2016 at 8:45 UTC (comment 11.12)

Replying to andrew_b:

Well, I got an error in hp48+ test:

+-rw-r--r--   1 0        0               0 12-27-2016 10:54 /YEN
+-rw-r--r--   1 0        0               0 12-27-2016 10:54 /JYTLIGHT
+-rw-r--r--   1 0        0               0 12-27-2016 10:54 /IOPAR


The filesize column in your output is all zero.

The helper converts fractional file sizes ("30.5", "21848.5", etc.) into integer ones ("30", "21848", etc.) using a printf trick which may not be portable and which may be the reason all the filesizes in your output are zero. (Don't ask me why the filesizes the calculator reports have fractions: I don't know.)

What's the output of the following command on your system?

$ /bin/sh -c 'printf %d 30.5 2>/dev/null'

(The purpose of the "/bin/sh" is to use the builtin (or otherwise) printf of the shell which will actually run the helper, and not the builtin printf of your interactive shell.)

If nothing is printed: what kind of shell is /bin/sh on your system? Now remove the "2>/dev/null" part and tell us what it says. I'll soon check the standard to see if that printf trick is portable.

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Dec 27, 2016 at 10:51 UTC (comment 12.13)

Replying to mooffie:

If nothing is printed: what kind of shell is /bin/sh on your system?

$ sh --version
GNU bash, version 3.2.57(1)-release (x86_64-alt-linux-gnu)
Copyright (C) 2007 Free Software Foundation, Inc.

/bin/sh is the independent executable file, the restricted version of bash. It is built specially for non-interactive usage.

Now remove the "2>/dev/null" part and tell us what it says.

$ /bin/sh -c 'printf %d 30.5 2>/dev/null'
0

$ LC_ALL=C /bin/sh -c 'printf %d 30.5'
/bin/sh: line 0: printf: 30.5: invalid number

But if I use %f instead of %d, I have the result that seems correct:

$ LC_ALL=C /bin/sh -c 'printf %.0f 30.5'
30

$ LC_ALL=C /bin/sh -c 'printf %.1f 30.5'
30.5

$ LC_ALL=C /bin/sh -c 'printf %.2f 30.5'
30.50

@mc-butler
Copy link
Author

Changed by mooffie (@mooffie) on Dec 27, 2016 at 12:13 UTC (comment 14)

Thanks for the information.

I opened a new ticket for this problem: #3747.

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Feb 22, 2025 at 11:51 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: vfs Virtual File System support prio: low Minor problem or easily worked around
Development

No branches or pull requests

2 participants