pardus / pardus-package-installer

Install, uninstall or view deb packages.
https://apps.pardus.org.tr/app/pardus-package-installer
GNU General Public License v3.0
5 stars 3 forks source link

change 'apt' with 'apt-get' command #2

Closed misile00 closed 1 year ago

misile00 commented 1 year ago

Use apt-get instead of apt in back-end. This will resolve the "WARNING: apt does not have a stable CLI interface. Use with caution in scripts." error.

It can be seen in the installation logs or when run in the terminal.

pardus-apt

fthaltun commented 1 year ago

We prefer apt in our projects because it is newer and more functional.

misile00 commented 1 year ago

apt is just a front-end. As far as I can see, all of the commands used in the project can work with apt-get. In addition, using apt also damages the logs It may be confusing for users.

xeome commented 1 year ago

@fthaltun According to apt man page, apt is not guaranteed to be backwards compatible, its recommended to use apt-get for scripts and application managers like this project. Apt is not more functional, but its recommended for end users.

SCRIPT USAGE AND DIFFERENCES FROM OTHER APT TOOLS
       The apt(8) commandline is designed as an end-user tool and it may change behavior between versions. While it tries not to break backward compatibility this is
       not guaranteed either if a change seems beneficial for interactive use.

       All features of apt(8) are available in dedicated APT tools like apt-get(8) and apt-cache(8) as well.  apt(8) just changes the default value of some options
       (see apt.conf(5) and specifically the Binary scope). So you should prefer using these commands (potentially with some additional options enabled) in your
       scripts as they keep backward compatibility as much as possible.
fthaltun commented 1 year ago

apt has some new features (although we are not using them in the project yet) and the main aim of apt is to provide an efficient way of handling package in a way “pleasant for end users”.

We can't ignore that apt is getting more and more popular. Since the commands we use are not the commands that will cause problems, we prefer the new one.

most distributions and users now do their docs with apt and go that way.

I would also like to say that we will switch to python-apt, which is the best. (at a suitable free time )