Bug 28889 - printconf-gui will not take printer names where a number is the first character
printconf-gui will not take printer names where a number is the first character
Product: Red Hat Linux
Classification: Retired
Component: printconf (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Crutcher Dunnavant
Depends On:
  Show dependency treegraph
Reported: 2001-02-22 12:55 EST by Seth Vidal
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-02-26 01:29:26 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Seth Vidal 2001-02-22 12:55:38 EST

make a new printer
name it 12345 - select anything you want for the other printer settings.

press ok.

It will fail with this error information on the console.
** CRITICAL **: file alchemist.c: line 3242 (AdmList_addChild): assertion
`_adm_valid_name(name)' failed.
Traceback (innermost last):
  File "/usr/lib/python1.5/site-packages/libglade.py", line 28, in __call__
    ret = apply(self.func, a)
  File "/usr/sbin/printconf-gui", line 880, in handle_new_button
    queue = new_queue(name)
  File "/usr/sbin/printconf-gui", line 142, in new_queue
    queue = dynamic_ctx.getDataByPath('/' + namespace +
'/print_queues').addChild(Alchemist.Data.ADM_TYPE_LIST, name)
  File "/usr/lib/python1.5/site-packages/Alchemist.py", line 134, in
Alchemist.ListError: addChild failed

Additionally printconf-gui should be accessible from the gnome system menu.
Comment 1 Glen Foster 2001-02-23 16:51:42 EST
We (Red Hat) should really try to resolve this before next release.
Comment 2 Crutcher Dunnavant 2001-02-25 20:26:23 EST
Yeah, the underlying encoding wont allow this.
I can't change this, but I can throw a check into printconf-gui.
Comment 3 Seth Vidal 2001-02-26 01:29:18 EST
why can't you change it? I know lprng supports it - is it the xml backend that
doesn't support it or the xml->printcap processor that can't handle it.

Moreover why is a string starting with a number as a name a hard thing to deal
with? This seems like an odd arbitrary limitation.

I'm just curious what the problem here is.
Comment 4 Crutcher Dunnavant 2001-02-28 03:15:04 EST
yes it is arbitrary, yes I am unhappy about it.

This is the reason:
It is not valid to start an XML element with an integer.

At one point in the design process, a conflict in encoding arrose,
and the majority decided to encode the name of an alchemist data object
as the name of the XML element that encoded it, thus limiting valid
object names to valid XML names. we further limited it to the pattern
/[-_a-zA-Z][-_a-zA-Z0-9]?/, because we had to do validation on some pattern.

I chose to store printer names as the name of the parent list for the printer,
because this gives me access to tree merge collides, which is the whole point of
the alchemist.

So, you can't do it because I want the system to be able to cleanly merge
configurations from multiple sources at the alchemist layer. (Think a
departmental printer config with local machine overrides.) The code is all
there, but I need a secure network client to feel safe about exposing the

The check is in, this is as fixed as it's gonna get.
Comment 5 David Morse 2001-02-28 16:19:40 EST
> Additionally printconf-gui should be accessible from the gnome system menu.

Is this going to be added?  In RH 6.x, printtool was available from control-
panel.  In RH 7.1 (7.0 too?), a user has to know to type printconf-gui from a 
console window in X.

Note You need to log in before you can comment on or make changes to this bug.