Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 510952 - sys-apps/util-linux-2.24.1-r2 - agetty fails with '-L8' works with '-L -8'
Summary: sys-apps/util-linux-2.24.1-r2 - agetty fails with '-L8' works with '-L -8'
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-21 15:21 UTC by Another Mortal
Modified: 2014-11-13 05:00 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Another Mortal 2014-05-21 15:21:43 UTC
After updating to sys-apps/util-linux-2.24.1-r2, console access
to a number of boxes got lost.  The culprit seems to be agetty’s
option handling code, which seems to choke on ‘-L8’, but accepts
‘-L -8’ just fine.  Weird...

Reproducible: Always
Comment 1 Another Mortal 2014-05-21 15:32:56 UTC
OK.  So, the change that allows the -L option to have an optional argument,
breaks my old command line.  Wonderful…

-               {  "local-line",     no_argument,        0,  'L'  },
+               {  "local-line",     optional_argument,  0,  'L'  },

I suppose this is a bug to file upstream…

                case 'L':
-                       op->flags |= F_LOCAL;
+                       /* -L and -L=always have the same meaning */
+                       op->clocal = CLOCAL_MODE_ALWAYS;
+                       if (optarg) {
+                               if (strcmp(optarg, "=always") == 0)
+                                       op->clocal = CLOCAL_MODE_ALWAYS;
+                               else if (strcmp(optarg, "=never") == 0)
+                                       op->clocal = CLOCAL_MODE_NEVER;
+                               else if (strcmp(optarg, "=auto") == 0)
+                                       op->clocal = CLOCAL_MODE_AUTO;
+                               else
+                                       log_err(_("invalid argument of --local-line"));
+                       }
                        break;
Comment 2 Another Mortal 2014-05-21 16:05:09 UTC
Wow.. after a little more digging,
this seems to be an issue with getopt itself.

Let’s just forget this.
Although a warning in the ebuild
about possible breakage due to
the change in how the -L option
is handled would be _really_ nice.
Comment 3 SpanKY gentoo-dev 2014-11-13 05:00:39 UTC
yes, this is behaving as intended by upstream