Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Müdür yapılandırması başarısız oluyor #20

Open
ertugerata opened this issue Sep 13, 2019 · 1 comment
Open

Müdür yapılandırması başarısız oluyor #20

ertugerata opened this issue Sep 13, 2019 · 1 comment
Assignees

Comments

@ertugerata
Copy link

ertugerata commented Sep 13, 2019

Configuring mudur package
DEBUG: Registering System.PackageHandler comar script
DEBUG: Registering System.Service comar script
DEBUG: Registering System.Package comar script
DEBUG: Registering System.Settings comar script
DEBUG: Registering Disk.Manager comar script
DEBUG: Calling post install handlers
DEBUG: Running package's post install script
Program terminated.
Script error: tr.org.pardus.comar.UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 106: ordinal not in range(128)
Please use 'pisi help' for general help.

2019-09-13 18:02:44 (2741) Listening for connections...
2019-09-13 18:02:46 (2880) [bus:1.391] ERROR: Exception: UnicodeDecodeError - 'ascii' codec can't decode byte 0xc2 in position 106: ordinal not in range(128)
2019-09-13 18:02:46 (2880) [bus:1.391] ERROR:     File /var/db/comar3/scripts/System.Package/mudur.py, line 10, in postInstall()
2019-09-13 18:02:46 (2880) [bus:1.391] ERROR:     File /var/db/comar3/scripts/System.Package/mudur.py, line 10, in <listcomp>()
2019-09-13 18:02:46 (2880) [bus:1.391] ERROR:     File /usr/lib/python3.6/encodings/ascii.py, line 26, in decode()


@ertugerata
Copy link
Author

ilgili package.py dosyası aşağıdaki gibi


#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import re
import shutil

def postInstall(fromVersion, fromRelease, toVersion, toRelease):
    shutil.copyfile("/etc/fstab", "/etc/fstab.bak")
    new = []
    for line in [line.strip() for line in open("/etc/fstab.bak")]:
        if re.search("\s+\/(run|dev\/shm)\s+", line): continue
        new.append(line)
    new.append("tmpfs                   /run                    tmpfs   nodev,nosuid,size=10%,mode=755    0 0\n")
    with open("/etc/fstab", "w") as f: f.write("\n".join(new))

@safaariman safaariman added bug Something isn't working and removed bug Something isn't working labels Dec 19, 2019
@safaariman safaariman self-assigned this Dec 19, 2019
@safaariman safaariman changed the title mudur yapılandırması başarısız oluyor Müdür yapılandırması başarısız oluyor Dec 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants