[apt-get] The option -f, --fix-broken does not work in LM17 x64

Bug #1341611 reported by Tomás F. L.
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
New
Undecided
Unassigned

Bug Description

Linux Mint 17 Quiana 64 bits (ISO v2)

Like root:
apt-get -f autoclean
E: No se conoce la opción de línea de órdenes «f» [de -f].

apt-get --fix-broken autoclean
E: No se entiende la opción de línea de órdenes --fix-broken

I verified it in a portable and in a virtual machine, always with the same error:
E: There is not known the option of line of orders "f" [of -f].
E: There is not understood the option of line of orders - fix-broken

The above mentioned option appears in the apt-get man:
    -f, --fix-broken
    Fix; attempt to correct a system with broken dependencies in place.

Revision history for this message
Gwendal LE BIHAN (gwendal-lebihan-dev) wrote :

As mentioned in the man page, the --fix-broken (or -f) flag can only be used with the install or remove commands, and not with the autoclean one.

Changed in linuxmint:
status: New → Invalid
Revision history for this message
Tomás F. L. (v17564) wrote :

I am sorry to differ.

Where it says that it is can option "only" be used with "install/remove"?. In the man it say: when used with
    This option, when used with install/remove, can omit any packages to permit APT to deduce a likely solution.

If he is like you he says, then the writing of the man is incorrect and its corresponding translation to Spanish also:
    Si se usa esta opción junto a «install»/«remove» se puede omitir cualquier paquete para permitir a APT deducir una posible solución.

-f, --fix-broken
           Fix; attempt to correct a system with broken dependencies in place.
           This option, when used with install/remove, can omit any packages
           to permit APT to deduce a likely solution. If packages are
           specified, these have to completely correct the problem. The option
           is sometimes necessary when running APT for the first time; APT
           itself does not allow broken package dependencies to exist on a
           system. It is possible that a system's dependency structure can be
           so corrupt as to require manual intervention (which usually means
           using dpkg --remove to eliminate some of the offending packages).
           Use of this option together with -m may produce an error in some
           situations. Configuration Item: APT::Get::Fix-Broken.

In LM13 Maya x64 the command "apt-get -f autoclean" works fine:

apt-get -f autoclean
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias
Leyendo la información de estado... Hecho

Changed in linuxmint:
status: Invalid → New
Revision history for this message
Gwendal LE BIHAN (gwendal-lebihan-dev) wrote :

It does say clearly : when used with install/remove

Nowhere in the man page it is mentioned that you can use it with any other command, and indeed you can't.

Changed in linuxmint:
status: New → Invalid
Revision history for this message
Tomás F. L. (v17564) wrote :

The option ", when used with install/remove," does not mean that "only" can be used with the options "install/remove".

", when used with install/remove," is different from ", only used with install/remove,"

Greetings.

Changed in linuxmint:
status: Invalid → New
Revision history for this message
Gwendal LE BIHAN (gwendal-lebihan-dev) wrote :

Is there anywhere else in the manual where is mentions that it can be used with another command ?
No there isn't, hence it can't.

I don't even see what you're trying to accomplish in the first place, but this is definitely not a bug.

Changed in linuxmint:
status: New → Invalid
Revision history for this message
Tomás F. L. (v17564) wrote :
Download full text (4.1 KiB)

From man:

apt-get [-sqdyfmubV] [-o= config_string ] [-c= config_file ]
               [-t= target_release] [-a= default_architecture] {update |
               upgrade | dselect-upgrade | dist-upgrade |
               install pkg [ { =pkg_version_number | /target_release } ] ...
               | remove pkg... | purge pkg... |
               source pkg [ { =pkg_version_number | /target_release } ] ... |
               build-dep pkg... | check | clean | autoclean | autoremove |
               {-v | --version} | {-h | --help}}

The opcon "f" is a general purpose follows the comand like all of these [ -sqdyfmubV] and therefore can be used with all commands such as "update, upgrade, autoclean, etc".

The specific section for the orders "install/remove" does not specify "any particular option" for these orders. You can use the symbols +, - , = , /,etc and package name, version, etc but, I repeat, "no option specifies". Check out the man:

               install pkg [ { =pkg_version_number | /target_release } ] ...
               | remove pkg... | purge pkg... |

 install
           install is followed by one or more packages desired for
           installation or upgrading. Each package is a package name, not a
           fully qualified filename (for instance, in a Debian GNU/Linux
           system, libc6 would be the argument provided, not
           libc6_1.9.6-2.deb). All packages required by the package(s)
           specified for installation will also be retrieved and installed.
           The /etc/apt/sources.list file is used to locate the desired
           packages. If a hyphen is appended to the package name (with no
           intervening space), the identified package will be removed if it is
           installed. Similarly a plus sign can be used to designate a package
           to install. These latter features may be used to override decisions
           made by apt-get's conflict resolution system.

           A specific version of a package can be selected for installation by
           following the package name with an equals and the version of the
           package to select. This will cause that version to be located and
           selected for install. Alternatively a specific distribution can be
           selected by following the package name with a slash and the version
           of the distribution or the Archive name (stable, testing,
           unstable).

           Both of the version selection mechanisms can downgrade packages and
           must be used with care.

           This is also the target to use if you want to upgrade one or more
           already-installed packages without upgrading every package you have
           on your system. Unlike the "upgrade" target, which installs the
           newest version of all currently installed packages, "install" will
           install the newest version of only the package(s) specified. Simply
           provide the name of the package(s) you wish to upgrade, and if a
           newer version is available, it (and its dependencies, as described
           above) will be downloaded and installed.

           Finally, the apt_preferences(5) mechanism ...

Read more...

Changed in linuxmint:
status: Invalid → New
Vlad Orlov (monsta)
affects: linuxmint → apt (Ubuntu)
Revision history for this message
Jarno Suni (jarnos) wrote :

Option -f seems to be accepted only for commands that may involve installing or removing packages. E.g. command "autoclean" merely deletes some .deb files in cache; that has nothing to do with package dependencies. SYNOPSIS in man page does not tell that though. That is not the only inaccuracy of the synopsis: E.g. it does not tell about any options that are defined only as long options, e.g. " --purge".

Tomás F. L., is there any reason you want to use -f with command autoclean?

Revision history for this message
Tomás F. L. (v17564) wrote :

Hello Jarno Suni.

I use the program Bleachbit for cleaning the system of unnecessary files. When that program detected a fault, this indicated me that i would use that command to fix the fault.

In LM13 works without problems but in LM17 fails and/or is the wrong command or the manual.

The operation of the command has changed with the change of version, LM13 to LM17, but the manual is the same and therefore something must be wrong, don't you think so?

This was a year ago and now I no longer use Linux Mint, i changed to Manjaro OpenRC because I don't like systemD.

Thanks.

Revision history for this message
Tomás F. L. (v17564) wrote :

Hello Jarno Suni.

If the operation is as you say, that [-f | --fix-broken] only work with install, remove or purge, the manual should be as follows.

[-f] removed from common options [-sqdymubV] and moved to like this:

apt-get [-sqdymubV] [-o= config_string ] [-c= config_file ]
               [-t= target_release] [-a= default_architecture] {update |
               upgrade | dselect-upgrade | dist-upgrade |

               { [ { -f | --fix-broken } ] install pkg [ { =pkg_version_number | /target_release } ] ...
               | remove pkg... | purge pkg... | }

               source pkg [ { =pkg_version_number | /target_release } ] ... |
               build-dep pkg... | check | clean | autoclean | autoremove |
               {-v | --version} | {-h | --help}}

With this [-f] only affects to install, remove and purge, no? And check, clean, autoclean, etc isn't affect. It's an example.

Correct?

Revision history for this message
Jarno Suni (jarnos) wrote :

Hello Tomás F. L.

I don't know why they changed it.
I think you can do the same by two commands:
apt-get --fix-broken install
apt-get autoclean

As for your fixed synopsis, I meant that -f works with also commands upgrade, dist-upgrade and autoremove, as they may install/remove packages, too. But otherwise your synopsis looks good for the -f option.

By the way,
option -s does works only with commands upgrade, dist-upgrade, install, remove, purge, check, clean, autoclean and autoremove.

The manual is not perfect as for autoremove: Bug #1052864
The respective Debian bug was reported on 2009 and is still not fixed.

Revision history for this message
Tomás F. L. (v17564) wrote :

I really don't think that it's so difficult to correct the manual. Is to put a line as you has written, at the beginning of each entry in the manual.

-s Option -s does works only with commands upgrade, dist-upgrade, install, remove, purge, check, clean, autoclean and autoremove. ...

-f Option -f does works only with ...

Thank you for your attention.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.