mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-25 19:58:37 +01:00
Merge branch 'develop'
This commit is contained in:
commit
86f2bd220b
7 changed files with 20 additions and 5 deletions
|
@ -1,3 +1,7 @@
|
|||
3.9.4 - 26/03/2022
|
||||
BugFix:
|
||||
- Check if a virtual environment exists before run
|
||||
|
||||
3.9.3 - 13/02/2022
|
||||
Updated:
|
||||
- Fix installation crash no TESTING file
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# slpkg 3.9.3
|
||||
# slpkg 3.9.4
|
||||
|
||||
Slpkg is a powerful software package manager that installs, updates, and removes packages on
|
||||
[Slackware](http://www.slackware.com/) based systems. It automatically computes dependencies and
|
||||
|
|
|
@ -33,11 +33,12 @@ Slpkg is a user-friendly package manager for Slackware installations
|
|||
"""
|
||||
|
||||
from slpkg.main import main
|
||||
from slpkg.superuser import s_user
|
||||
from slpkg.superuser import s_user, virtual_env
|
||||
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
s_user()
|
||||
virtual_env()
|
||||
main()
|
||||
except KeyboardInterrupt:
|
||||
print()
|
||||
|
|
|
@ -76,7 +76,7 @@ class MetaData:
|
|||
|
||||
__all__ = "slpkg"
|
||||
__author__ = "dslackw"
|
||||
__version_info__ = (3, 9, 3)
|
||||
__version_info__ = (3, 9, 4)
|
||||
__version__ = "{0}.{1}.{2}".format(*__version_info__)
|
||||
__license__ = "GNU General Public License v3 (GPLv3)"
|
||||
__email__ = "d.zlatanidis@gmail.com"
|
||||
|
|
|
@ -30,7 +30,8 @@ from slpkg.slack.slack_version import slack_ver
|
|||
|
||||
def header():
|
||||
"""help header message"""
|
||||
print(f"slpkg - version {_meta_.__version__} | Slackware release: {_meta_.slack_rel} - {slack_ver()}\n")
|
||||
print(f"slpkg - version {_meta_.__version__} | Slackware release: "
|
||||
f"{_meta_.slack_rel} - {slack_ver()}\n")
|
||||
|
||||
|
||||
def options():
|
||||
|
|
|
@ -101,4 +101,4 @@ class Graph:
|
|||
"""Remove .dot files
|
||||
"""
|
||||
if os.path.isfile(f"{self.image}.dot"):
|
||||
os.remove(f"{self.image}.dot")
|
||||
os.remove(f"{self.image}.dot")
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
import os
|
||||
import getpass
|
||||
|
||||
|
||||
|
@ -31,3 +32,11 @@ def s_user():
|
|||
if getpass.getuser() != "root":
|
||||
print("\nslpkg: Error: Must have root privileges\n")
|
||||
raise SystemExit(1)
|
||||
|
||||
|
||||
def virtual_env():
|
||||
"""Check if a virtual enviroment exists
|
||||
"""
|
||||
if "VIRTUAL_ENV" in os.environ.keys():
|
||||
print("\nslpkg: Error: Please exit from virtual environment first\n")
|
||||
raise SystemExit(1)
|
||||
|
|
Loading…
Add table
Reference in a new issue