Can't update cups

I’m tried to update cups from both main oss and printing repos. Both failed:


Installing: cups-1.5.4-5.2.1 .....................................................................................[error]
Installation of cups-1.5.4-5.2.1 failed:
(with --nodeps --force) Error: Subprocess failed. Error: RPM failed: error: unpacking of archive failed on file /usr/share/cups/fonts: cpio: rename failed - Is a directory
error: cups-1.5.4-5.2.1.i586: install failed


Installing: cups-1.5.4-136.1 .....................................................................................[error]
Installation of cups-1.5.4-136.1 failed:
(with --nodeps --force) Error: Subprocess failed. Error: RPM failed: error: unpacking of archive failed on file /usr/share/cups/fonts: cpio: rename failed - Is a directory
error: cups-1.5.4-136.1.i586: install failed

Given that there is no threads about on forums nor reports on bugzilla I suspect that something is wrong on my end.

Any ideas?

Are you trying to install via the RPM command? You should show us the command you are using. If so, why are you not using the package manager (to take care of dependencies etc)?

You asked for it :slight_smile:

You did not reveal to us which version of openSUSE you use.

And as already said above, you did not show us what command(s) you used, nor from where, nor as whome. You should copy the prompt, the command, the output (the only pasrt you did), and the next prompt all in one sweep between the code tags.

Remove the directory /usr/share/cups/fonts before you try to install cups.

The package tries to create a symlink with that name, but on your system a directory already exists. RPM can’t cope with that.

On 01/16/2014 07:06 AM, wolfi323 pecked at the keyboard and wrote:
> D_E;2616486 Wrote:
> Code:
> --------------------
> > >
> > Installing: cups-1.5.4-5.2.1 …[error]
> > Installation of cups-1.5.4-5.2.1 failed:
> > (with --nodeps --force) Error: Subprocess failed. Error: RPM failed: error: unpacking of archive failed on file /usr/share/cups/fonts: cpio: rename failed - Is a directory
> > error: cups-1.5.4-5.2.1.i586: install failed
> >
> --------------------
> Remove the directory /usr/share/cups/fonts before you try to install
> cups.
>
> The package tries to create a symlink with that name, but on your system
> a directory already exists. RPM can’t cope with that.
>
>

That is a workaround, not a fix. Marcus has already acknowledged that
there was a packaging error that I think has been fixed.

On 2014-01-16 09:26, D E wrote:

> Given that there is no threads about on forums nor reports on bugzilla I
> suspect that something is wrong on my end.

There is another report on the mail list.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

My bad. I’ve gathered all this info for bugzilla, but decided to check here first.

de@localhost:~> cat /etc/issue
Welcome to openSUSE 12.3 "Dartmouth" - Kernel \r (\l).


de@localhost:~> 

de@localhost:~> sudo zypper up
Loading repository data...
Reading installed packages...

The following package is going to be upgraded:
  cups 

1 package to upgrade.
Overall download size: 7,2 MiB. No additional space will be used or freed after the operation.
Continue? [y/n/? shows all options] (y): y
(1/1) Installing: cups-1.5.4-136.1 .....................................................................................[error]
Installation of cups-1.5.4-136.1 failed:
(with --nodeps --force) Error: Subprocess failed. Error: RPM failed: error: unpacking of archive failed on file /usr/share/cups/fonts: cpio: rename failed - Is a directory
error: cups-1.5.4-136.1.i586: install failed
error: cups-1.5.4-134.1.i586: erase skipped


Abort, retry, ignore? [a/r/i] (a): 
Problem occured during or after installation or removal of packages:
Installation aborted by user

Please see the above error message for a hint.
There are some running programs that use files deleted by recent upgrade. You may wish to restart some of them. Run 'zypper ps' to list these programs.
de@localhost:~> 

Yes, of course it is a workaround, for RPM’s inability to change an existing directory to a symlink or vice versa.
But it should allow to install the package.

And yes, it has been fixed already in the package in the Printing repo, by renaming the directory before creating the symlink:

But the fix does not help in this case if that directory /usr/share/cups/fonts/ is already present in the system (which it shouldn’t be, but maybe you installed the “broken” package first?).

So you have the “bad” package installed, which contains a directory /usr/share/cups/fonts instead of a symlink (as 136.1 has again).
Again, remove that directory and all should be fine.

Thanx. Removing directory solved the issue.

On 01/16/2014 02:46 PM, wolfi323 pecked at the keyboard and wrote:
> D_E;2616603 Wrote:
>> (1/1) Installing: cups-1.5.4-136.1
>> …[error]
>> Installation of cups-1.5.4-136.1 failed:
>> (with --nodeps --force) Error: Subprocess failed. Error: RPM failed:
>> error: unpacking of archive failed on file /usr/share/cups/fonts: cpio:
>> rename failed - Is a directory
>> error: cups-1.5.4-136.1.i586: install failed
>> error: cups-1.5.4-134.1.i586: erase skipped
>>
> So you have the “bad” package installed, which contains a directory
> /usr/share/cups/fonts instead of a symlink (as 136.1 has again).
> Again, remove that directory and all should be fine.
>
>

It’s the only way to proceed since no one wishes to fix the rpm by
adding a “pre” script to the job the right way.

<sarcasm>
Why should one person fix the rpm when thousands can use the work a round.
</sarcasm>

Ken

Well, no “official” package ever contained that “bug” (it’s no package bug really, actually this is a long-standing bug/limitation in rpm itself), it was just a short-lived glitch in the devel repo. So I doubt that many people are affected.
But I agree, they could have added an “rm” to the %pre script or similar. OTOH, that could also remove things that shouldn’t be removed I guess. (another package might have put stuff into /usr/share/cups/fonts/ as well)

I deleted

/usr/share/cups/fonts

and then created a new symlink and the update has installed successfully.

You shouldn’t have to create a symlink yourself. The package does that anyway.

I have similar problem - see “Installation aborted by user”

When you have a ‘similar’ problem, you do not have the same problem (else you could have used the solution above). But when yiu have a similar problem, please start a thread for that problem. With a good title that tells in a few keywords about it. Do not hang your similar problem at the end of a thread. Meany people will not see it. And you want to advertise to an audience as large as possible your problem, because you want help.